Member-only story
ffmpeg Cheat Sheet
Commonly used ffmpeg commands
2 min readMay 25, 2020
Converting Video
$ ffmpeg -i input.mov output.mp4
Video to GIF
#Usage
$ ./gifCreator.sh saveas.mp4 anim.gif
Downloading Video
Browser ➡ WebPage ➡ Inspect ➡ Network ➡ search for video/audio file format like m3u8, mp4 etc
$ ffmpeg -i "<video URL>" -c:v libx264 -preset slow -crf 22 "<save-as>"
______________________________$ ffmpeg -i "https://cnnios-f.akamaihd.net/i/cnn/big/us/2020/05/24/myrtle-beach-memorial-day-weekend-chen-nr-sot-vpx.cnn_3239527_ios_,440,650,840,1240,3000,5500,.mp4.csmil/index_5_av.m3u8" -c:v libx264 -preset slow -crf 22 "saveas.mp4"
Creating Thumbnail
$ ffmpeg -i <video-file-Path> -vframes 1 -an -s 400x222 -ss 30 <image-file-Path>__________________________________
$ ffmpeg -i saveas.mp4 -vframes 1 -an -s 400x222 -ss 30 thumb.jpg
Extracting Audio
“-vn” ➡ No video
$ ffmpeg -i <video-file-Path> -vn -acodec copy <audio-file-Path>