-
-
Save DuongHieuMAI/cc1f0cd3d987507d2862a4b1aceca937 to your computer and use it in GitHub Desktop.
Revisions
-
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> -
Gavin Gamboa revised this gist
Jul 12, 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 @@ -97,9 +97,9 @@ 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> ## Merge Multiple Videos -
Gavin Gamboa revised this gist
Jul 12, 2018 . 1 changed file with 3 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 @@ -96,9 +96,10 @@ 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> ss offset = frame number divided by FPS of video = the decimal (in milliseconds) ffmpeg needs i.e. 130.5)<br> ## Merge Multiple Videos -
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 @@ -96,7 +96,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> (ss offset = get the exact frame number, then divide it by FPS of the video to get the decimal (in milliseconds) ffmpeg is looking for i.e. 130.5)<br> where vf is my custom script as follows:<br> `$ ffmpeg -ss $1 -i $2 -qmin 1 -q:v 1 -qscale:v 2 -frames:v 1 -huffman optimal $3.jpg` -
Gavin Gamboa revised this gist
Jul 12, 2018 . 1 changed file with 7 additions and 5 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 @@ -92,6 +92,13 @@ m4a to mp3 conversion with ffmpeg and lame A batch file version of the same command would be:<br> `for f in *.m4a; do ffmpeg -i "$f" -acodec libmp3lame -ab 256k "${f%.m4a}.mp3"; done` - - - ## Extract Single Image from a Video at Specified Frame `$ vf [ss][filename][outputFileName]`<br> (ss offset=exact frame number divided by FPS of video to get decimal ms ffmpeg is looking for)<br> where vf is my custom script as follows:<br> `$ ffmpeg -ss $1 -i $2 -qmin 1 -q:v 1 -qscale:v 2 -frames:v 1 -huffman optimal $3.jpg` ## Merge Multiple Videos @@ -101,11 +108,6 @@ file names in folder, if they contain spaces, must be properly escaped <br> ## Split a Video into Images `$ ffmpeg -i video.flv image%d.jpg` ## Convert Images into a Video `$ ffmpeg -f image2 -i image%d.jpg imagestovideo.mpg` -
Gavin Gamboa revised this gist
Jul 12, 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 @@ -101,6 +101,11 @@ file names in folder, if they contain spaces, must be properly escaped <br> ## Split a Video into Images `$ ffmpeg -i video.flv image%d.jpg` ## Extract Single Image from a Video at Specified Frame `$ vf [ss][filename][outputFileName]` (ss offset=exact frame number divided by FPS of video to get decimal ms ffmpeg is looking for)<br> where vf is my custom script as follows:<br> `$ ffmpeg -ss $1 -i $2 -qmin 1 -q:v 1 -qscale:v 2 -frames:v 1 -huffman optimal $3.jpg` ## Convert Images into a Video `$ ffmpeg -f image2 -i image%d.jpg imagestovideo.mpg` -
Gavin Gamboa revised this gist
Jun 22, 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 @@ -29,7 +29,7 @@ In HH:MM:SS format<br> `ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac ` `vn` is no video.<br> `acodec` copy says use the same audio stream that's already in there.
NewerOlder