Skip to content

Instantly share code, notes, and snippets.

@hghazal
Last active December 17, 2019 03:36
Show Gist options
  • Save hghazal/9598b6be42d3b5db5aaa9528a0efd5d6 to your computer and use it in GitHub Desktop.
Save hghazal/9598b6be42d3b5db5aaa9528a0efd5d6 to your computer and use it in GitHub Desktop.
Install ffmpeg with all the codec on mac
brew install ffmpeg --with-libass --with-openssl --with-x265 --with-libvorbis --with-libvpx --with-theora
@hghazal
Copy link
Author

hghazal commented Mar 14, 2018

ffmpeg -i input.mpg -vcodec libx265 -pix_fmt yuv420p -acodec aac output.mp4

@hghazal
Copy link
Author

hghazal commented Mar 14, 2018

ffmpeg -i input.mpg -vcodec h264 -b 1500k -pix_fmt yuv420p -acodec aac output.mp4

@hghazal
Copy link
Author

hghazal commented Dec 12, 2019

ffmpeg -i input.mpg -ss 00:00:00 -vcodec h264 -pix_fmt yuv420p -b:v 1500k -acodec aac -b:a 128k output.mp4

@hghazal
Copy link
Author

hghazal commented Dec 17, 2019

adding letterbox to Abrahim's wedding file

ffmpeg -i ~/Desktop/Eb\ \&\ Cynthia\ Photos\ for\ montage/Abrahim\ \&\ Cynthia.mp4 -c:a copy  -filter:v "pad=width=iw*16/9:height=iw:x=(ow-iw)/2:y=(ow-iw)/2" -ss 00:03:20   -pix_fmt yuv420p ~/Desktop/Eb\ \&\ Cynthia\ Photos\ for\ montage/test.mp4

ffmpeg -i ~/Desktop/Eb\ \&\ Cynthia\ Photos\ for\ montage/Abrahim\ \&\ Cynthia.mp4 -c:a copy  -filter:v "pad=width=iw:height=ih:x=0:y=200" -ss 00:03:20   -pix_fmt yuv420p ~/Desktop/Eb\ \&\ Cynthia\ Photos\ for\ montage/test.mp4

ffmpeg -i ~/Desktop/Eb\ \&\ Cynthia\ Photos\ for\ montage/Abrahim\ \&\ Cynthia.mp4 -c:a copy  -filter:v "pad=width=iw:height=iw:x=0:y=200" -ss 00:03:20   -pix_fmt yuv420p ~/Desktop/Eb\ \&\ Cynthia\ Photos\ for\ montage/test.mp4

ffmpeg -i ~/Desktop/Eb\ \&\ Cynthia\ Photos\ for\ montage/Abrahim\ \&\ Cynthia.mp4 -c:a copy -vf scale=1280:960  -filter:v "pad=width=iw:height=ih+240:x=0:y=240" -ss 00:03:20   -pix_fmt yuv420p ~/Desktop/Eb\ \&\ Cynthia\ Photos\ for\ montage/test.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment