@OpenComputeDesign
Nah, like any other powerful command line tool, you just start writing crib notes and add to your knowledge as you go.
Same applies to #imagemagick.
rld@Intrepid:~$ unixnotes grep -B1 ffmpeg |grep -v "^--"
#ffmpeg extract audio track from video without transcoding:
ffmpeg -i video.mp4 -vn -acodec copy audio.aac
#ffmpeg crop video
ffmpeg -i in.mp4 -filter:v "crop=out_w:out_h:x:y" out.mp4
#Like imagemagick's `identify`, but for videos:
ffprobe #(from the ffmpeg package)
#losslessly convert jpegs to mjpeg
ffmpeg -framerate 30 -pattern_type glob -i '*.jpeg' -codec copy vid.mkv
#concatenating videos with ffmpeg
file '/path/to/file3'
$ ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4
#Use ffmpeg to crunch a video
#try a crf of 30
ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4
#use vp9 instead:
#i=input.mp4; o=output.webm; ffmpeg -i "$i" -c:v libvpx-vp9 -b:v 2M -pass 1 -an -f null /dev/null && ffmpeg -i "$i" -c:v libvpx-vp9 -b:v 2M -pass 2 -c:a libopus "$o"
i=input.mp4; o=output.webm; b=2M; ffmpeg -i "$i" -c:v libvpx-vp9 -b:v $b -pass 1 -an -f null /dev/null && ffmpeg -i "$i" -c:v libvpx-vp9 -b:v $b -pass 2 -c:a copy "$o"
#Extracting frames from video
ffmpeg -i file.mpg -r 1/1 frames%03d.png
#ffmpeg trim a video
ffmpeg -ss 00:01:00 -to 00:02:00 -i input.mp4 -c copy output.mp4
#Use ffmpeg to normalize (amplify/compress) audio in a video:
#See: https://ffmpeg.org/ffmpeg-all.html#Examples-72
ffmpeg -i video.mp4 -filter:a "speechnorm=e=12.5:r=0.0001:l=1" -vcodec copy video-normalized.mp4
ffmpeg -i audio.m4a -filter:a "speechnorm=e=50:r=0.0001:l=1" audio-normalized.m4a
#Concatenat and normalize audio files:
ffmpeg -f concat -safe 0 -i list.txt -filter:a "speechnorm=e=12.5:r=0.0001:l=1" -b:a 32k "7 sessions.opus"
#ffmpeg: set audio bitrate when converting:
ffmpeg -i music.opus -filter:a "speechnorm=e=50:r=0.0001:l=1" -b:a 192k music\ -\ normalized.opus
#ffmpeg get audio volume levels
AV_LOG_FORCE_NOCOLOR=true ffmpeg -hide_banner -i audio.opus -filter:a volumedetect -f null /dev/null
#ffmpeg scale a video
ffmpeg -i input.avi -filter:v scale=-1:720 -c:a copy output.mkv
#Source: https://stackoverflow.com/questions/53021266/non-monotonous-dts-in-output-stream-previous-current-changing-to-this-may-result
ffmpeg -safe 0 -f concat -segment_time_metadata 1 -i list.txt -vf select=concatdec_select -af aselect=concatdec_select,aresample=async=1 all-together.wav
rld@Intrepid:~$