Last active
October 19, 2022 19:52
-
-
Save peterdalle/0f74a174abc3f47042c93e8698870ff6 to your computer and use it in GitHub Desktop.
Revisions
-
peterdalle revised this gist
Oct 19, 2022 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -9,8 +9,8 @@ Command | Description `ffmpeg -i in.mp4 -vf scale=640:480 out.mp4` | Resize video to 640 x 480 `ffmpeg -i in.mp4 -vf "transpose=1" out.mp4` | Rotate video 90 degrees clockwise (range: 0-3) `ffmpeg -i in.mp4 -vf "transpose=2,transpose=2" out.mp4` | Rotate video 180 degrees `ffmpeg -i in.mp4 out%04d.jpg -hide_banner` | Extract all frames `ffmpeg -i in.mp4 -ss 00:00:10.000 -vframes 1 out.jpg` | Extract only one frame `ffmpeg -i in.mp4 -fps=1 -vsync 0 out%d.png` | Extract one frame per second `ffmpeg -i in.mp4 -vf select='between(t,1,5)+between(t,11,15)' -vsync 0 out%d.png` | Extract frames between 1-5 seconds & 11-15 seconds `ffmpeg -i in.mp4 -vf yadif out.mp4` | Deinterlace -
peterdalle created this gist
Oct 19, 2022 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ # ffmpeg example commands Command | Description :--------- | :---------------------- `ffmpeg -i in.mp4 out.avi` | Convert from one format to another `ffmpeg -i in.mp4 -preset slower -crf 18 out.mp4` | Convert with custom quality: lower crf = higher quality (range: 0-51) `ffmpeg -i in.mkv -c:v copy -c:a copy out.mp4` | Remux MKV file into MP4 (no quality loss) `ffmpeg -i onlyvideo.mp4 -i onlyaudio.mp4 -c copy -map 0:0 -map 1:1 -shortest out.mp4` | Mux video and audio from different videos (no quality loss) `ffmpeg -i in.mp4 -vf scale=640:480 out.mp4` | Resize video to 640 x 480 `ffmpeg -i in.mp4 -vf "transpose=1" out.mp4` | Rotate video 90 degrees clockwise (range: 0-3) `ffmpeg -i in.mp4 -vf "transpose=2,transpose=2" out.mp4` | Rotate video 180 degrees `ffmpeg -i inp.mp4 out%04d.jpg -hide_banner` | Extract all frames `ffmpeg -i inp.mp4 -ss 00:00:10.000 -vframes 1 out.jpg` | Extract only one frame `ffmpeg -i in.mp4 -fps=1 -vsync 0 out%d.png` | Extract one frame per second `ffmpeg -i in.mp4 -vf select='between(t,1,5)+between(t,11,15)' -vsync 0 out%d.png` | Extract frames between 1-5 seconds & 11-15 seconds `ffmpeg -i in.mp4 -vf yadif out.mp4` | Deinterlace Source: https://gist.github.com/peterdalle/27d370fa457e6ec7ba85fb34cf2e6768