Last active
January 19, 2022 15:05
Revisions
-
charlee revised this gist
Dec 20, 2020 . 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 @@ -58,3 +58,9 @@ ffmpeg -i INPUT.mp4 -acodec copy -f segment -vcodec copy -reset_timestamps 1 -ma ffmpeg -ss 30 -i input_vid.mp4 -t 60 -c copy output_clip.mp4 # all frames ffmpeg -i input_vid.mp4 -ss 30 -t 60 -c copy output_clip.mp4 # Find all keyframes ffmpeg -i .\bloodstained-v.mkv -vf "select=key[a];[a]showinfo=checksum=false" -an -f null - # - or - ffprobe -select_streams v -show_frames -show_entries frame=pkt_pts_time,pict_type -v quiet -of csv .\bloodstained.mkv | grep I -
charlee revised this gist
Jun 11, 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 @@ -18,7 +18,7 @@ ffmpeg -i input.avi -c:v mpeg4 -vtag xvid -b:v 600k -c:a libmp3lame output.avi ffmpeg -i input.avi -c:v libx264 -preset ultrafast -crf 22 -c:a copy output.mp4 # Black detect (0.04 is one frame) ffmpeg -i test.avi -vf blackdetect=d=0.04:pix_th=.01 -f rawvideo -y /NUL # change resolution + cut 20 seconds(0:00-0:20) ffmpeg -i input.avi -ss 0 -t 20 -c:v libx264 -s 640x360 -c:a copy output.mp4 -
charlee revised this gist
Jun 11, 2019 . 1 changed file with 7 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 @@ -51,3 +51,10 @@ ffmpeg -i intro.mov -vf "boxblur=5:1" intro-blur.mov # Split video by keyframe ffmpeg -i INPUT.mp4 -acodec copy -f segment -vcodec copy -reset_timestamps 1 -map 0 OUTPUT%d.mp4 # Cut by keyframes vs. cut by all frames. Note arguemnts are position dependent. # http://www.markbuckler.com/post/cutting-ffmpeg/ # keyframes only ffmpeg -ss 30 -i input_vid.mp4 -t 60 -c copy output_clip.mp4 # all frames ffmpeg -i input_vid.mp4 -ss 30 -t 60 -c copy output_clip.mp4 -
charlee revised this gist
Jun 11, 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 @@ -47,4 +47,7 @@ ffmpeg -i inputvideo.mp4 -f mp3 audio.mp3 ffmpeg -i inputvideo.mp4 -c copy -an video.mp4 # Blur ffmpeg -i intro.mov -vf "boxblur=5:1" intro-blur.mov # Split video by keyframe ffmpeg -i INPUT.mp4 -acodec copy -f segment -vcodec copy -reset_timestamps 1 -map 0 OUTPUT%d.mp4 -
charlee revised this gist
Jun 11, 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 @@ -17,6 +17,9 @@ ffmpeg -i input.avi -c:v mpeg4 -vtag xvid -b:v 600k -c:a libmp3lame output.avi # encode h264 ffmpeg -i input.avi -c:v libx264 -preset ultrafast -crf 22 -c:a copy output.mp4 # Black detect (0.04 is one frame) ffmpeg -i test.avi -vf blackdetect=d=0.04:pix_th=.01 -f rawvideo # change resolution + cut 20 seconds(0:00-0:20) ffmpeg -i input.avi -ss 0 -t 20 -c:v libx264 -s 640x360 -c:a copy output.mp4 -
charlee revised this gist
Dec 16, 2018 . 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 @@ -41,4 +41,7 @@ ffmpeg -i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][watermar # Demux ffmpeg -i inputvideo.mp4 -f mp3 audio.mp3 ffmpeg -i inputvideo.mp4 -c copy -an video.mp4 # Blur ffmpeg -i intro.mov -vf "boxblur=5:1" intro-blur.mov -
charlee revised this gist
Dec 16, 2018 . 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 @@ -37,4 +37,8 @@ ffmpeg –i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][waterm ffmpeg –i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][watermark] overlay=(main_w-overlay_w-10)/2:(main_h-overlay_h-10)/2 [out]" outputvideo.flv # center ffmpeg -i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][watermark] overlay=main_w/2-overlay_w/2:main_h/2-overlay_h/2 [out]" outputvideo.flv # Demux ffmpeg -i inputvideo.mp4 -f mp3 audio.mp3 ffmpeg -i inputvideo.mp4 -c copy -an video.mp4 -
charlee revised this gist
Jun 9, 2013 . 1 changed file with 8 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 @@ -3,6 +3,14 @@ ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4 # concat files with the same format # 1. create a file list file '/path/to/file1' file '/path/to/file2' file '/path/to/file3' # 2. concat ffmpeg -f concat -i mylist.txt -c copy output # encode Xvid ffmpeg -i input.avi -c:v mpeg4 -vtag xvid -b:v 600k -c:a libmp3lame output.avi -
charlee renamed this gist
Mar 9, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
charlee revised this gist
Mar 8, 2013 . 1 changed file with 17 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 @@ -13,4 +13,20 @@ ffmpeg -i input.avi -c:v libx264 -preset ultrafast -crf 22 -c:a copy output.mp4 ffmpeg -i input.avi -ss 0 -t 20 -c:v libx264 -s 640x360 -c:a copy output.mp4 # encode mp4 file for ipad use ffmpeg -i input.mp4 -c:v libx264 -preset medium -b:v 1200k -s 640x360 -c:a libvo_aacenc -b:a 64k output.mp4 # add watermark # top left corner ffmpeg –i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][watermark] overlay=10:10 [out]" outputvideo.flv # Top right corner ffmpeg –i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:10 [out]" outputvideo.flv # Bottom left corner ffmpeg –i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][watermark] overlay=10:main_h-overlay_h-10 [out]" outputvideo.flv # Bottom right corner ffmpeg –i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][watermark] overlay=(main_w-overlay_w-10)/2:(main_h-overlay_h-10)/2 [out]" outputvideo.flv # center ffmpeg -i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][watermark] overlay=main_w/2-overlay_w/2:main_h/2-overlay_h/2 [out]" outputvideo.flv -
charlee revised this gist
Mar 8, 2013 . 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 @@ -10,4 +10,7 @@ ffmpeg -i input.avi -c:v mpeg4 -vtag xvid -b:v 600k -c:a libmp3lame output.avi ffmpeg -i input.avi -c:v libx264 -preset ultrafast -crf 22 -c:a copy output.mp4 # change resolution + cut 20 seconds(0:00-0:20) ffmpeg -i input.avi -ss 0 -t 20 -c:v libx264 -s 640x360 -c:a copy output.mp4 # encode mp4 file for ipad use ffmpeg -i input.mp4 -c:v libx264 -preset medium -b:v 1200k -s 640x360 -c:a libvo_aacenc -b:a 64k output.mp4 -
charlee revised this gist
Jan 17, 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 @@ -8,3 +8,6 @@ ffmpeg -i input.avi -c:v mpeg4 -vtag xvid -b:v 600k -c:a libmp3lame output.avi # encode h264 ffmpeg -i input.avi -c:v libx264 -preset ultrafast -crf 22 -c:a copy output.mp4 # change resolution + cut 20 seconds(0:00-0:20) ffmpeg -i input.avi -ss 0 -t 20 -c:v libx264 -s 640x360 -c:a copy output.mp4 -
charlee revised this gist
Jan 17, 2013 . 1 changed file with 7 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 @@ -1,4 +1,10 @@ # losslessly concat mp4 files ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4 # encode Xvid ffmpeg -i input.avi -c:v mpeg4 -vtag xvid -b:v 600k -c:a libmp3lame output.avi # encode h264 ffmpeg -i input.avi -c:v libx264 -preset ultrafast -crf 22 -c:a copy output.mp4 -
charlee created this gist
Jan 13, 2013 .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,4 @@ # losslessly concat mp4 files ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4