Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio preview #31

Open
nonetrix opened this issue Jan 18, 2022 · 5 comments
Open

Audio preview #31

nonetrix opened this issue Jan 18, 2022 · 5 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@nonetrix
Copy link

It would be neat if audio files showed the waves like so
audio

@thimc
Copy link
Owner

thimc commented Jan 21, 2022

From what I've read in the documentation displaying real time previews is not possible in lf.

Sure you could always generate a static preview but then again it all comes down to personal preference.

Feel free to submit a patch if you think it's worth looking in to.

@thimc thimc added enhancement New feature or request wontfix This will not be worked on labels Jan 21, 2022
@xezwary
Copy link

xezwary commented May 24, 2022

You can use FFmpeg for this https://trac.ffmpeg.org/wiki/Waveform

	*.wav|*.mp3|*.flac|*.m4a|*.wma|*.ape|*.ac3|*.og[agx]|*.spx|*.opus|*.as[fx]|*.mka)
		[ ! -f "${CACHE}.jpg" ] && \
			ffmpeg -i "$1" -f lavfi -i color=c=black:s=640x320 -filter_complex "[0:a]aformat=channel_layouts=mono,showwavespic=s=640x320:colors=white[fg];[1:v][fg]overlay=format=auto" -frames:v 1 "$CACHE.jpg"
		image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
		;;

Looks pretty nice when used with both chafa and exiftool
Screenshot_2022-05-25_01-16-26

@nonetrix
Copy link
Author

nonetrix commented May 25, 2022

I'll attempt to make a commit seems the dev has been slightly inactive not that it is abandoned :P

@nonetrix
Copy link
Author

Works great honestly should have just looked into doing this would have figured this out myself most likely
Screenshot from 2022-05-24 21-43-38

@thimc
Copy link
Owner

thimc commented Aug 12, 2022

I'll attempt to make a commit seems the dev has been slightly inactive not that it is abandoned :P

Terribly sorry, I don't use Linux these days which means I'm not able to test each and every diff.
I'm also thinking that a pull request doesn't necessarily need to be merged, the way I see it is that upstream should contain everything to get you going, and depending on what functionality you need you pull the pull requests and merge them. (think suckless)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants