Last active
October 30, 2017 00:31
-
-
Save gildotdev/1447239 to your computer and use it in GitHub Desktop.
Revisions
-
gildotdev revised this gist
Nov 2, 2014 . 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 @@ -33,3 +33,5 @@ ffmpeg -i original.mp4 -f srt -i subtitle.srt -c:v copy -c:a copy -c:s mov_text ## convert first audio track to 2 channel aac and copy first audio track to second audio track ffmpeg -i original.mkv -map 0:0 -map 0:1 -map 0:1 -c:v copy -c:a:0 libfaac -b:a:0 192k -ac 2 -c:a:1 copy new.mp4 ## create animated gif ffmpeg -i original.mp4 -s wxh -pix_fmt rgb24 -r 24 -f gif - | gifsicle --optimize=3 --delay=3 > new.gif -
gildotdev revised this gist
Jan 29, 2014 . 1 changed file with 5 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 @@ -28,4 +28,8 @@ ffmpeg -i foo.flv -vcodec copy -acodec copy bar.mp4 ffmpeg -i foo.flv -vcodec copy -acodec aac -aq 200 bar.mp4 ## add subtitles to mp4 from srt ffmpeg -i original.mp4 -f srt -i subtitle.srt -c:v copy -c:a copy -c:s mov_text new.mp4 ## convert first audio track to 2 channel aac and copy first audio track to second audio track ffmpeg -i original.mkv -map 0:0 -map 0:1 -map 0:1 -c:v copy -c:a:0 libfaac -b:a:0 192k -ac 2 -c:a:1 copy new.mp4 -
Gil Creque revised this gist
Dec 11, 2013 . 1 changed file with 6 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 @@ -19,12 +19,13 @@ ffmpeg -i foo.mp4 -ab 64k -ar 44100 -f flv bar.flv ## convert folder full of .m4a to .mp3 for f in *.m4a; do ffmpeg -i "$f" -acodec mp3 -ab 256k "${f%.m4a}.mp3"; done ## convert .flv to .mp4 ## assuming a/v codecs in the flv are what you want (i.e. h264 and aac) ffmpeg -i foo.flv -vcodec copy -acodec copy bar.mp4 ## convert .flv to .mp4 (with aac audio) ## assuming video codec in the flv is what you want (i.e. h264) ffmpeg -i foo.flv -vcodec copy -acodec aac -aq 200 bar.mp4 ## add subtitles to mp4 from srt ffmpeg -i original.mp4 -f srt -i subtitle.srt -c:v copy -c:a copy -c:s mov_text new.mp4 -
gildotdev revised this gist
Mar 5, 2013 . 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 @@ -10,6 +10,9 @@ ffmpeg -i foo.mp3 -acodec aac -ab 128k -strict experimental bar.aac ## extract single frame as image from .mp4 ffmpeg -i foo.mp4 -ss 0 -vframes 1 -vcodec mjpeg -f image2 bar.jpg ## convert movie to image sequence ffmpeg -i foo.mp4 bar%d.png ## convert .mp4 to .flv ffmpeg -i foo.mp4 -ab 64k -ar 44100 -f flv bar.flv -
gildotdev revised this gist
Sep 10, 2012 . 1 changed file with 4 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 @@ -18,8 +18,10 @@ for f in *.m4a; do ffmpeg -i "$f" -acodec mp3 -ab 256k "${f%.m4a}.mp3"; done ##convert .flv to .mp4 ##assuming a/v codecs in the flv are what you want (i.e. h264 and aac) ffmpeg -i foo.flv -vcodec copy -acodec copy bar.mp4 ##convert .flv to .mp4 (with aac audio) ##assuming video codec in the flv is what you want (i.e. h264) ffmpeg -i foo.flv -vcodec copy -acodec aac -aq 200 bar.mp4 -
gildotdev revised this gist
Sep 6, 2012 . 1 changed file with 9 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 @@ -14,4 +14,12 @@ ffmpeg -i foo.mp4 -ss 0 -vframes 1 -vcodec mjpeg -f image2 bar.jpg ffmpeg -i foo.mp4 -ab 64k -ar 44100 -f flv bar.flv ## convert folder full of .m4a to .mp3 for f in *.m4a; do ffmpeg -i "$f" -acodec mp3 -ab 256k "${f%.m4a}.mp3"; done ##convert .flv to .mp4 ##assuming a/v codecs in the flv are what you want (i.e. h264 and aac) fmpeg -i foo.flv -vcodec copy -acodec copy bar.mp4 ##convert .flv to .mp4 (with aac audio) ##assuming video codec in the flv is what you want (i.e. h264) ffmpeg -i foo.flv -vcodec copy -acodec aac -aq 200 bar.mp4 -
gildotdev revised this gist
Jul 24, 2012 . 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 @@ -11,4 +11,7 @@ ffmpeg -i foo.mp3 -acodec aac -ab 128k -strict experimental bar.aac ffmpeg -i foo.mp4 -ss 0 -vframes 1 -vcodec mjpeg -f image2 bar.jpg ## convert .mp4 to .flv ffmpeg -i foo.mp4 -ab 64k -ar 44100 -f flv bar.flv ## convert folder full of .m4a to .mp3 for f in *.m4a; do ffmpeg -i "$f" -acodec mp3 -ab 256k "${f%.m4a}.mp3"; done -
gildotdev created this gist
Dec 8, 2011 .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,14 @@ ## extract audio from .avi as .aac (conversion from another audio codec) ffmpeg -i foo.avi -acodec aac -ab 128k -strict experimental bar.aac ## extract audio from .avi as .mp3 (no conversion, just copy) ffmpeg -i foo.avi -acodec copy bar.mp3 ## convert .mp3 to .aac ffmpeg -i foo.mp3 -acodec aac -ab 128k -strict experimental bar.aac ## extract single frame as image from .mp4 ffmpeg -i foo.mp4 -ss 0 -vframes 1 -vcodec mjpeg -f image2 bar.jpg ## convert .mp4 to .flv ffmpeg -i foo.mp4 -ab 64k -ar 44100 -f flv bar.flv