ffmpeg - Serbipunk/notes GitHub Wiki

ffmpeg show video info

ffmpeg -i file.mp4 -hide_banner -f null /dev/null

https://stackoverflow.com/questions/11400248/using-ffmpeg-to-get-video-info-why-do-i-need-to-specify-an-output-file

h265

-vcodec libx265

https://unix.stackexchange.com/a/38380

loop

ffmpeg -stream_loop 3 -i input.mp4 -c copy output.mp4

https://video.stackexchange.com/a/12906

change resolution

ffmpeg -i input.mp4 -vf scale=480:320 output_320.mp4

https://stackoverflow.com/questions/24087249/ffmpeg-change-resolution-of-the-video-with-aspect-ratio

clip video

ffmpeg -i movie.mp4 -ss 00:00:03 -t 00:00:08 -async 1 cut.mp4

https://stackoverflow.com/questions/18444194/cutting-the-videos-based-on-start-and-end-time-using-ffmpeg

video to image

ffmpeg -i input.mp4 -vf fps=1 out%d.png

https://stackoverflow.com/questions/40088222/ffmpeg-convert-video-to-images

image to video

ffmpeg -framerate 15 -pattern_type glob -i "*.png" -c:v libx264 base_line_softlight.mp4

resize image

ffmpeg -i input.jpg -vf scale=320:240 output_320x240.png

https://stackoverflow.com/a/28806881

crop video

ffmpeg -i test.mov -filter:v "crop=1080:1080:0:300" -c:a test.mp4