ffmpeg -framerate 15 -pattern_type glob -i '*.jpg' output.mp4
ffmpeg -i input.mp4 -b 1000000 -vf format=yuv420p output_1mbps.mp4
Trancode with 1mbps quality target with scale x=1920 y=(aspect divisible by 2) (can be flipped for y axis or different modulus)
ffmpeg -i input.mp4 -b 1000000 -vf scale=1920:-2 output_1mbps.mp4
ffmpeg -i video.mp4 -i audio.aac -c copy output.mkv
ffmpeg -i input.mp4 -filter:a "volume=1.5" output.mp4
Apply math function to folder of JPGs, eg. output JPG will be mean of all JPGs in folder (useful for image reducing noise with multiple exposures)
ffmpeg convert -evaluate-sequence mean '*.jpg' output.jpg
ffmpeg -i input.mp4 -c:v libx264 -crf 21 -preset faster -pix_fmt yuv420p -maxrate 5000K -bufsize 5000K -vf 'scale=if(gte(iw\,ih)\,min(1920\,iw)\,-2):if(lt(iw\,ih)\,min(1920\,ih)\,-2)' -movflags +faststart -c:a aac -b:a 160k output.mp4
ffmpeg -i input.mp3 -f segment -segment_time 5 -c copy output%04d.mp3
ffmpeg -i input.mp4 -vf fps=10 output%d.png
Save a frame as a PNG every 1 second, but prepend the sequence number with zeros (fps=10 -> 10 every second)
ffmpeg -i input.mp4 -vf fps=10 output%05d.png
Note: Prepended zeros are essential for retaining sequence order in OSes with conventional filename sorting (eg. most Linuxes)
ffmpeg -i DSC00001.JPG -vf scale=640:-1 DSC00001-640px.JPG
Create a copy of every JPG in a directory re-scaled to have width = 1,000px (height = -1 scales to keep aspect ratio)
for f in *.JPG; do ffmpeg -i "$f" -vf scale=1000:-1 "./existing-folder/${f%%.JPG}.JPG"; done