Skip to content

Instantly share code, notes, and snippets.

@lukehedger
Last active May 28, 2025 22:43
Show Gist options
  • Save lukehedger/277d136f68b028e22bed to your computer and use it in GitHub Desktop.
Save lukehedger/277d136f68b028e22bed to your computer and use it in GitHub Desktop.
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@Lucifer-Francessa
Copy link

http://v-y2mate.com/
With the useful tool in converting videos from YouTube to MP3 forms

@Dinesh6777
Copy link

Dinesh6777 commented May 24, 2025

Here is the format using latest encoding algorithms h265 and mp3. It's around 15% better than h264.

  • Good quality(reasonable)
    • ffmpeg -i input.mp4 -s 1280x720 -c:v libx265 -preset medium -acodec libmp3lame -y output.mp4
    • 2.45 GB 131MB
  • For Best quality remove scaling paramater "-s"
    • ffmpeg -i input.mp4 -c:v libx265 -preset medium -acodec libmp3lame -y output.mp4

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