Skip to content

Instantly share code, notes, and snippets.

@smitp
Last active May 27, 2020 10:56
Show Gist options
  • Save smitp/fd38ebb57af568c6f26693fd8b6ba2c8 to your computer and use it in GitHub Desktop.
Save smitp/fd38ebb57af568c6f26693fd8b6ba2c8 to your computer and use it in GitHub Desktop.
FFMpeg Tricks

Inspect file

ffmpeg -i file.mp4

Convert file

This converts file with new bitrates specified. Also makes it stream optimized.

ffmpeg -i input.mp4 -b:v 287k -b:a 64k -c:v libx264 -movflags +faststart output.mp4

Extract audio

This converts file with new bitrates specified. Also makes it stream optimized.

ffmpeg -i input.mp4 -movflags +faststart -vn -c:a copy output.m4a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment