Last active
December 6, 2023 12:47
-
-
Save markuszeller/5416a1851162049e2d1e7177f8ed0f5d to your computer and use it in GitHub Desktop.
ffmpeg Tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://ffmpeg.org/ffmpeg-filters.html#showwaves | |
# loop 20 times | |
ffmpeg -stream_loop 20 -i loop.mp4 -c copy output.mp4 | |
# Oscilloscope | |
ffmpeg -i audio.wav -filter_complex "[0:a]showwaves=s=800x80:mode=p2p:rate=60:draw=full:colors=white,format=rgba[v]" -map "[v]" -map 0:a video.mkv | |
# Oscilloscope with transparent background | |
ffmpeg -i audio.wav -filter_complex "[0:a]showwaves=s=800x80:mode=p2p:rate=60:draw=full:colors=white,format=rgba[v]" -map "[v]" -map 0:a -c:v png video.mp4 | |
# Volume Peek Meter | |
ffmpeg -i audio.wav -filter_complex "[0:a]showvolume=rate=60:t=0:v=0:s=1:f=0.4,format=rgba[v]" -map "[v]" -map 0:a video.mkv | |
# Colorbar Spectograph | |
ffmpeg -i audio.wav -filter_complex "[0:a]showcqt=s=800x80:rate=60:axis=0:bar_h=0:sono_h=0,format=rgba[v]" -map "[v]" -map 0:a video.mkv | |
# Frequency Graph | |
ffmpeg -i audio.wav -filter_complex "[0:a]showfreqs=s=800x80:colors=white,format=rgba[v]" -map "[v]" -map 0:a video.mkv | |
# Scrolling Spectograph | |
ffmpeg -i audio.wav -filter_complex "[0:a]showspectrum=s=800x80:slide=scroll:color=nebulae:fps=60,format=rgba[v]" -map "[v]" -map 0:a video.mkv | |
# convert images to webp | |
find . -name "*.png" -o -name "*.jpg" -exec bash -c 'cwebp "$1" -o "${1%.png}".webp' - {} \; | |
# convert flac to mp3 in parallel | |
parallel "ffmpeg -i {1} -ab 256k {1.}.mp3" ::: **/*.flac; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment