Last active
March 18, 2019 13:37
-
-
Save portableant/9763fbd147ce0b9d3adbb9dd1f9a6f44 to your computer and use it in GitHub Desktop.
FFMPEG commands used for fitz
This file contains 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 characters
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools | |
Split file based on time: | |
ffmpeg -i filename -ss startInSeconds -t endInSeconds outputfilename | |
eg | |
ffmpeg -i 23-10-2018_22-01-34.mp4 -ss 0 -t 140 part2.mp4 | |
Burn subtitles in permanently from srt file | |
ffmpeg -i tracey.mp4 -vf "subtitles=nino.Eng.srt:force_style='FontName=Arial,FontSize=15'" -c:v h264 -c:a copy output-overlay-subs2.mp4 | |
Convert mov to mp4 hd | |
ffmpeg -i KXSG4152.MOV -preset slow -codec:a libfdk_aac -b:a 128k -codec:v libx264 -pix_fmt yuv420p -b:v 4500k -minrate 4500k -maxrate 9000k -bufsize 9000k -vf scale=-1:1080 tracey.mp4 | |
Add subtitles that are user controlled | |
ffmpeg -i tracey.mp4 -i "nino.Eng.srt" -c copy -c:s -metadata:s:a:0 language=English mov_text subtitled.mp4 | |
Compress | |
ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 | |
Add blurred images at side for vertically shot video: | |
ffmpeg -i input-file.mp4 -filter_complex "[0:v]scale=ih*16/9:-1,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,crop=h=iw*9/16" output-file.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment