-
-
Save mirfan899/e4058e1c4312392e7b92584a4775b5f7 to your computer and use it in GitHub Desktop.
Revisions
-
protrolium revised this gist
Sep 4, 2020 . 1 changed file with 2 additions and 0 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 @@ -140,7 +140,9 @@ concat demuxer<br> ## Evaluate which ratio to apply for scaling, then scale with the requisite amount of padding `$ ffmpeg -i image-%04d.jpg -c:v libx264 -pix_fmt yuv420p -vf "scale=iw*min(1280/iw\,720/ih):ih*min(1280/iw\,720/ih), pad=1280:720:(1280-iw*min(1280/iw\,720/ih))/2:(720-ih*min(1280/iw\,720/ih))/2" test.mp4` <br> <br> 1920 version<br> <br> `$ ffmpeg -i image-%04d.jpg -c:v libx264 -pix_fmt yuv420p -vf "scale=iw*min(1920/iw\,1080/ih):ih*min(1920/iw\,1080/ih), pad=1920:1080:(1920-iw*min(1920/iw\,1080/ih))/2:(1080-ih*min(1920/iw\,1080/ih))/2" test.mp4` ## Convert .mov (JPEG-A or other codec) to H264 .mp4 -
protrolium revised this gist
Sep 4, 2020 . 1 changed file with 4 additions and 1 deletion.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 @@ -138,7 +138,10 @@ concat demuxer<br> `$ ffmpeg -i image-%04d.jpg -c:v libx264 -pix_fmt yuv420p -vf "scale=720:-2" test.mp4` ## Evaluate which ratio to apply for scaling, then scale with the requisite amount of padding `$ ffmpeg -i image-%04d.jpg -c:v libx264 -pix_fmt yuv420p -vf "scale=iw*min(1280/iw\,720/ih):ih*min(1280/iw\,720/ih), pad=1280:720:(1280-iw*min(1280/iw\,720/ih))/2:(720-ih*min(1280/iw\,720/ih))/2" test.mp4` <br> 1920 version<br> `$ ffmpeg -i image-%04d.jpg -c:v libx264 -pix_fmt yuv420p -vf "scale=iw*min(1920/iw\,1080/ih):ih*min(1920/iw\,1080/ih), pad=1920:1080:(1920-iw*min(1920/iw\,1080/ih))/2:(1080-ih*min(1920/iw\,1080/ih))/2" test.mp4` ## Convert .mov (JPEG-A or other codec) to H264 .mp4 `ffmpeg -i input.mov -vcodec libx264 -pix_fmt yuv420p output.mp4`<br> -
protrolium revised this gist
Sep 4, 2020 . 1 changed file with 3 additions and 0 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 @@ -137,6 +137,9 @@ concat demuxer<br> ## Guarantee aspect ratio from image sequence `$ ffmpeg -i image-%04d.jpg -c:v libx264 -pix_fmt yuv420p -vf "scale=720:-2" test.mp4` ## Evaluate which ratio to apply for scaling, then scale with the requisite amount of padding `$ ffmpeg -i image-%04d.jpg -c:v libx264 -pix_fmt yuv420p -vf "scale=iw*min(1280/iw\,720/ih):ih*min(1280/iw\,720/ih), pad=1280:720:(1280-iw*min(1280/iw\,720/ih))/2:(720-ih*min(1280/iw\,720/ih))/2" test.mp4`gi ## Convert .mov (JPEG-A or other codec) to H264 .mp4 `ffmpeg -i input.mov -vcodec libx264 -pix_fmt yuv420p output.mp4`<br> -
protrolium revised this gist
Sep 4, 2020 . 1 changed file with 3 additions and 0 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 @@ -134,6 +134,9 @@ concat demuxer<br> ## Convert image sequence of many different sizes and conform to specific frame size `$ ffmpeg -i image-%04d.jpg -c:v libx264 -pix_fmt yuv420p -vf "scale=max(1280\,a*720):max(1280\,720/a),crop=1280:720" test.mp4` ## Guarantee aspect ratio from image sequence `$ ffmpeg -i image-%04d.jpg -c:v libx264 -pix_fmt yuv420p -vf "scale=720:-2" test.mp4` ## Convert .mov (JPEG-A or other codec) to H264 .mp4 `ffmpeg -i input.mov -vcodec libx264 -pix_fmt yuv420p output.mp4`<br> -
protrolium revised this gist
Sep 4, 2020 . 1 changed file with 3 additions and 0 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 @@ -131,6 +131,9 @@ concat demuxer<br> ## Convert non-sequentially named Images in a directory `$ ffmpeg -framerate 30 -pattern_type glob -i '*.jpeg' -c:v libx264 -pix_fmt yuv420p gan-1.mov`<br> ## Convert image sequence of many different sizes and conform to specific frame size `$ ffmpeg -i image-%04d.jpg -c:v libx264 -pix_fmt yuv420p -vf "scale=max(1280\,a*720):max(1280\,720/a),crop=1280:720" test.mp4` ## Convert .mov (JPEG-A or other codec) to H264 .mp4 `ffmpeg -i input.mov -vcodec libx264 -pix_fmt yuv420p output.mp4`<br> -
protrolium revised this gist
Aug 21, 2020 . 1 changed file with 3 additions and 0 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 @@ -199,6 +199,9 @@ check for streams that you want (video/audio). be sure to convert/specify DTS 6 ### Add Watermark overlay (png) to the center of a video `ffmpeg -i source.mov -i watermark.png -filter_complex "overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2" output.mp4` <br> ### Concat a video with a reversed copy of itself for ping-pong looping effect `ffmpeg -i input.mp4 -filter_complex "[0:v]reverse,fifo[r];[0:v][r] concat=n=2:v=1 [v]" -map "[v]" output.mp4` - - - more commands<br> http://www.catswhocode.com/blog/19-ffmpeg-commands-for-all-needs -
protrolium revised this gist
Jun 28, 2020 . 1 changed file with 6 additions and 6 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 @@ -110,12 +110,12 @@ ss offset = frame number divided by FPS of video = the decimal (in milliseconds) ## Merge Multiple Videos concat demuxer<br> `$ cat mylist.txt`<br> `file '/path/to/file1'`<br> `file '/path/to/file2'`<br> `file '/path/to/file3'`<br> <br> `$ ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4` ## Split a Video into Images `$ ffmpeg -i video.flv image%d.jpg` -
protrolium revised this gist
Jun 28, 2020 . 1 changed file with 6 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 @@ -109,9 +109,13 @@ where `vf` is a custom bash script as follows:<br> ss offset = frame number divided by FPS of video = the decimal (in milliseconds) ffmpeg needs i.e. 130.5<br> ## Merge Multiple Videos concat demuxer<br> `$ cat mylist.txt file '/path/to/file1' file '/path/to/file2' file '/path/to/file3' $ ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4` ## Split a Video into Images `$ ffmpeg -i video.flv image%d.jpg` -
protrolium revised this gist
Jun 28, 2020 . 1 changed file with 0 additions and 3 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 @@ -113,9 +113,6 @@ ss offset = frame number divided by FPS of video = the decimal (in milliseconds) file names in folder, if they contain spaces, must be properly escaped <br> `ls * | perl -ne 'print "file $_"' | ffmpeg -f concat -i - -c copy merged.mp4` ## Split a Video into Images `$ ffmpeg -i video.flv image%d.jpg` -
protrolium revised this gist
Jun 28, 2020 . 1 changed file with 3 additions and 0 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 @@ -113,6 +113,9 @@ ss offset = frame number divided by FPS of video = the decimal (in milliseconds) file names in folder, if they contain spaces, must be properly escaped <br> `ls * | perl -ne 'print "file $_"' | ffmpeg -f concat -i - -c copy merged.mp4` ## Concatenate with crossfade `ffmpeg -i 1.mp4 -i 2.mp4 -filter_complex xfade=offset=4.5:duration=1 output.mp4` ## Split a Video into Images `$ ffmpeg -i video.flv image%d.jpg` -
protrolium revised this gist
May 30, 2020 . No changes.There are no files selected for viewing
-
protrolium revised this gist
Apr 23, 2020 . 1 changed file with 2 additions and 0 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 @@ -47,6 +47,8 @@ strip audio stream away from video<br> combine the two streams together (new audio with originally exisiting video)<br> `ffmpeg -i 36.MOV -i 36.wav -map 0:v -map 1:a -c copy -y 36-encoded.mov`<br> or add an offset to audio<br> `ffmpeg -i 36.MOV -itsoffset -0.25 -i 36.wav -map 0:v -map 1:a -c copy -y 36-encoded.mov`<br> or<br> `ffmpeg -i INPUT.mp4 -i AUDIO.wav -shortest -c:v copy -c:a aac -b:a 256k OUTPUT.mp4` -
protrolium revised this gist
Apr 23, 2020 . 1 changed file with 2 additions and 0 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 @@ -46,6 +46,8 @@ strip audio stream away from video<br> `ffmpeg -i INPUT.mp4 -codec copy -an OUTPUT.mp4` combine the two streams together (new audio with originally exisiting video)<br> `ffmpeg -i 36.MOV -i 36.wav -map 0:v -map 1:a -c copy -y 36-encoded.mov`<br> or<br> `ffmpeg -i INPUT.mp4 -i AUDIO.wav -shortest -c:v copy -c:a aac -b:a 256k OUTPUT.mp4` - - - -
protrolium revised this gist
Apr 23, 2020 . 1 changed file with 1 addition and 1 deletion.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 @@ -172,7 +172,7 @@ If you want to cut off section from the beginning, simply drop -t 00:00:10 from #### reduce filesize Example:<br> `ffmpeg -i input.mov -vcodec libx264 -crf 24 output.mp4`<br> <br> It reduced a 100mb video to 9mb.. Very little change in video quality. -
protrolium revised this gist
Apr 9, 2020 . 1 changed file with 1 addition and 1 deletion.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 @@ -118,7 +118,7 @@ file names in folder, if they contain spaces, must be properly escaped <br> `$ ffmpeg -r 1/5 -i image-%03d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p test.mp4`<br> ## Convert Single Image into a Video `$ ffmpeg -loop 1 -i image.png -c:v libx264 -t 60 -pix_fmt yuv420p -vf scale=1920:1080 out.mp4`<br> ## Convert non-sequentially named Images in a directory `$ ffmpeg -framerate 30 -pattern_type glob -i '*.jpeg' -c:v libx264 -pix_fmt yuv420p gan-1.mov`<br> -
protrolium revised this gist
Apr 9, 2020 . 1 changed file with 3 additions and 0 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 @@ -117,6 +117,9 @@ file names in folder, if they contain spaces, must be properly escaped <br> `$ ffmpeg -i image-%03d.png -c:v libx264 -pix_fmt yuv420p test.mp4`<br> `$ ffmpeg -r 1/5 -i image-%03d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p test.mp4`<br> ## Convert Single Image into a Video `ffmpeg -loop 1 -i image.png -c:v libx264 -t 60 -pix_fmt yuv420p -vf scale=1920:1080 out.mp4` ## Convert non-sequentially named Images in a directory `$ ffmpeg -framerate 30 -pattern_type glob -i '*.jpeg' -c:v libx264 -pix_fmt yuv420p gan-1.mov`<br> -
protrolium revised this gist
Apr 7, 2020 . 1 changed file with 3 additions and 0 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 @@ -120,6 +120,9 @@ file names in folder, if they contain spaces, must be properly escaped <br> ## Convert non-sequentially named Images in a directory `$ ffmpeg -framerate 30 -pattern_type glob -i '*.jpeg' -c:v libx264 -pix_fmt yuv420p gan-1.mov`<br> ## Convert .mov (JPEG-A or other codec) to H264 .mp4 `ffmpeg -i input.mov -vcodec libx264 -pix_fmt yuv420p output.mp4`<br> ## Convert mp4 to webm `$ ffmpeg -i example.mp4 -f webm -c:v libvpx -b:v 1M -acodec libvorbis example.webm -hide_banner`<br> [more info](http://www.bugcodemaster.com/article/convert-videos-webm-format-using-ffmpeg) -
protrolium revised this gist
Sep 6, 2019 . 1 changed file with 3 additions and 0 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 @@ -117,6 +117,9 @@ file names in folder, if they contain spaces, must be properly escaped <br> `$ ffmpeg -i image-%03d.png -c:v libx264 -pix_fmt yuv420p test.mp4`<br> `$ ffmpeg -r 1/5 -i image-%03d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p test.mp4`<br> ## Convert non-sequentially named Images in a directory `$ ffmpeg -framerate 30 -pattern_type glob -i '*.jpeg' -c:v libx264 -pix_fmt yuv420p gan-1.mov`<br> ## Convert mp4 to webm `$ ffmpeg -i example.mp4 -f webm -c:v libvpx -b:v 1M -acodec libvorbis example.webm -hide_banner`<br> [more info](http://www.bugcodemaster.com/article/convert-videos-webm-format-using-ffmpeg) -
protrolium revised this gist
Sep 5, 2019 . 1 changed file with 3 additions and 0 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 @@ -25,6 +25,9 @@ In seconds<br> In HH:MM:SS format<br> `ffmpeg -i input.mp3 -ss 0:01:00 -t 0:00:30 output.wav` Split an audio stream at specified segment rate (e.g. 3 seconds)<br> `ffmpeg -i somefile.mp3 -f segment -segment_time 3 -c copy out%03d.mp3`<br> ## Extract Audio `ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac ` -
Gavin Gamboa revised this gist
Aug 16, 2019 . 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 @@ -111,8 +111,8 @@ file names in folder, if they contain spaces, must be properly escaped <br> ## Convert Images into a Video `$ ffmpeg -f image2 -i image%d.jpg imagestovideo.mp4`<br> `$ ffmpeg -i image-%03d.png -c:v libx264 -pix_fmt yuv420p test.mp4`<br> `$ ffmpeg -r 1/5 -i image-%03d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p test.mp4`<br> ## Convert mp4 to webm `$ ffmpeg -i example.mp4 -f webm -c:v libvpx -b:v 1M -acodec libvorbis example.webm -hide_banner`<br> -
Gavin Gamboa revised this gist
Aug 16, 2019 . 1 changed file with 3 additions and 1 deletion.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 @@ -110,7 +110,9 @@ file names in folder, if they contain spaces, must be properly escaped <br> `$ ffmpeg -i video.flv image%d.jpg` ## Convert Images into a Video `$ ffmpeg -f image2 -i image%d.jpg imagestovideo.mp4`<br> `ffmpeg -i image-%03d.png -c:v libx264 -pix_fmt yuv420p test.mp4`<br> `ffmpeg -r 1/5 -i image-%03d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p test.mp4`<br> ## Convert mp4 to webm `$ ffmpeg -i example.mp4 -f webm -c:v libvpx -b:v 1M -acodec libvorbis example.webm -hide_banner`<br> -
Gavin Gamboa revised this gist
May 21, 2019 . 1 changed file with 1 addition and 1 deletion.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 @@ -174,7 +174,7 @@ check for streams that you want (video/audio). be sure to convert/specify DTS 6 <br> `ffmpeg -i input.mkv -strict experimental -map 0:0 -map 0:1 -c:v copy -c:a:1 libmp3lame -b:a 192k -ac 6 output.mp4` <br> ### Add Watermark overlay (png) to the center of a video `ffmpeg -i source.mov -i watermark.png -filter_complex "overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2" output.mp4` <br> - - - -
Gavin Gamboa revised this gist
May 21, 2019 . 1 changed file with 4 additions and 1 deletion.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 @@ -173,7 +173,10 @@ make a grayscale version and scale to 640x480 check for streams that you want (video/audio). be sure to convert/specify DTS 6 channel audio stream<br> <br> `ffmpeg -i input.mkv -strict experimental -map 0:0 -map 0:1 -c:v copy -c:a:1 libmp3lame -b:a 192k -ac 6 output.mp4` <br> ### Add Watermark overlay (png) to the center of a video) `ffmpeg -i source.mov -i watermark.png -filter_complex "overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2" output.mp4` <br> - - - more commands<br> http://www.catswhocode.com/blog/19-ffmpeg-commands-for-all-needs -
Gavin Gamboa revised this gist
Nov 28, 2018 . 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 @@ -170,9 +170,9 @@ make a grayscale version and scale to 640x480 ### Convert MKV to MP4 `ffmpeg -i file.mkv`<br> <br> check for streams that you want (video/audio). be sure to convert/specify DTS 6 channel audio stream<br> <br> `ffmpeg -i input.mkv -strict experimental -map 0:0 -map 0:1 -c:v copy -c:a:1 libmp3lame -b:a 192k -ac 6 output.mp4` - - - more commands<br> -
Gavin Gamboa revised this gist
Nov 28, 2018 . 1 changed file with 2 additions and 0 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 @@ -169,7 +169,9 @@ make a grayscale version and scale to 640x480 ### Convert MKV to MP4 `ffmpeg -i file.mkv`<br> <br> check for streams that you want (video/audio)<br> <br> `ffmpeg -i input.mkv -strict experimental -map 0:0 -map 0:2 -c:v copy -c:a aac -b:a 384k output.mp4` - - - -
Gavin Gamboa revised this gist
Nov 28, 2018 . 1 changed file with 5 additions and 0 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 @@ -167,6 +167,11 @@ Example:<br> <br> make a grayscale version and scale to 640x480 ### Convert MKV to MP4 `ffmpeg -i file.mkv`<br> check for streams that you want (video/audio)<br> `ffmpeg -i input.mkv -strict experimental -map 0:0 -map 0:2 -c:v copy -c:a aac -b:a 384k output.mp4` - - - more commands<br> http://www.catswhocode.com/blog/19-ffmpeg-commands-for-all-needs -
Gavin Gamboa revised this gist
Jul 20, 2018 . 1 changed file with 1 addition and 1 deletion.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 @@ -162,7 +162,7 @@ Example:<br> <br> It reduced a 100mb video to 9mb.. Very little change in video quality. Example:<br> `ffmpeg -i video.mov -vf eq=saturation=0 -s 640x480 -c:v libx264 -crf 24 output.mp4`<br> <br> make a grayscale version and scale to 640x480 -
Gavin Gamboa revised this gist
Jul 19, 2018 . 1 changed file with 6 additions and 0 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 @@ -159,8 +159,14 @@ If you want to cut off section from the beginning, simply drop -t 00:00:10 from Example:<br> `ffmpeg -i input.avi -vcodec libx264 -crf 24 output.avi`<br> <br> It reduced a 100mb video to 9mb.. Very little change in video quality. Example:<> `ffmpeg -i video.mov -vf eq=saturation=0 -s 640x480 -c:v libx264 -crf 24 output.mp4`<br> <br> make a grayscale version and scale to 640x480 - - - more commands<br> http://www.catswhocode.com/blog/19-ffmpeg-commands-for-all-needs -
Gavin Gamboa revised this gist
Jul 19, 2018 . 1 changed file with 8 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 @@ -143,18 +143,24 @@ Here's a command line that will slice to 30 seconds without transcoding: Do you need to cut video with re-encoding or without re-encoding mode? You can try to following below command.<br> Synopsis: ffmpeg -i [input_file] -ss [start_seconds] -t [duration_seconds] [output_file] #### use ffmpeg cut mp4 video without re-encoding Example:<br> `ffmpeg -i source.mp4 -ss 00:00:05 -t 00:00:10 -c copy cut_video.mp4`<br> #### use ffmpeg cut mp4 video with re-encoding Example:<br> `ffmpeg -i source.mp4 -ss 00:00:05 -t 00:00:10 -async 1 -strict -2 cut_video.mp4`<br> If you want to cut off section from the beginning, simply drop -t 00:00:10 from the command #### reduce filesize Example:<br> `ffmpeg -i input.avi -vcodec libx264 -crf 24 output.avi`<br> It reduced a 100mb video to 9mb.. Very little change in video quality. - - - more commands<br> http://www.catswhocode.com/blog/19-ffmpeg-commands-for-all-needs -
Gavin Gamboa revised this gist
Jul 12, 2018 . 1 changed file with 1 addition and 1 deletion.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 @@ -97,7 +97,7 @@ A batch file version of the same command would be:<br> ## Extract Single Image from a Video at Specified Frame `$ vf [ss][filename][outputFileName]`<br> where `vf` is a custom bash script as follows:<br> `$ ffmpeg -ss $1 -i $2 -qmin 1 -q:v 1 -qscale:v 2 -frames:v 1 -huffman optimal $3.jpg`<br> <br> ss offset = frame number divided by FPS of video = the decimal (in milliseconds) ffmpeg needs i.e. 130.5<br>
NewerOlder