Skip to content

Instantly share code, notes, and snippets.

@lukehedger
Last active September 29, 2024 07:26
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
@clairechen7
Copy link

Commands using Linux with ffmpeg to shrinking big MP4 video file to smaller sizes

  • ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 out.mp4
    • 3.6 Gb to 556 Mb, great quality 🥇
  • ffmpeg -i input.mp4 -s 1280x720 -acodec copy -y output.mp4
    • 3.6 Gb to 62 Mb, quality "good enough"/acceptable 👍
  • ffmpeg -i input.mp4 -vcodec h264 -b:v 1000k -acodec mp3 output.mp4
    • 3.6 Gb to 30 Mb, very shitty quality 💩

Thanks for sharing, really helpful!

@AD5GB
Copy link

AD5GB commented Jun 20, 2023

None of these have done anything, but give me a 30-35% INCREASE in size. I'm still determined to find a solution but attempts to compress this video by ANY means results in similar results.....

@cabiste-dev
Copy link

@AD5GB as i said before here, it depends on what video you have, so you need to experiment a bit

@aoi306
Copy link

aoi306 commented Oct 8, 2023

Very good! Using it, reduced 86mb to 64mb. thank you all. I also summarized some other methods, I hope it can help everyone https://vidon.me/compress-mp4

@Wennyanaa
Copy link

Nice! It works! Thanks for sharing you. Also, use this DVD to MP4 Converter to compress your DVD contents.

@nonetrix
Copy link

Myfans
...

We have OnlyFans bots on Github now? Thanks my day is ruined

@IlkaUMR
Copy link

IlkaUMR commented Jan 29, 2024

Thanks for sharing! I've used a programm before and the compressed videos always got pixelated, blurry, or blocky. This one works just fine. I've also found an article introducing people how to convert blu ray to MP4. It might be useful for anyone in need.

@Reynolds556
Copy link

Nice work! Also, check out KeepVid for more amazing video-related tools.

@QiuChristine1025
Copy link

@deroverda
Copy link

Commands using Linux with ffmpeg to shrinking big MP4 video file to smaller sizes

  • ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 out.mp4
    • 3.6 Gb to 556 Mb, great quality 🥇
  • ffmpeg -i input.mp4 -s 1280x720 -acodec copy -y output.mp4
    • 3.6 Gb to 62 Mb, quality "good enough"/acceptable 👍
  • ffmpeg -i input.mp4 -vcodec h264 -b:v 1000k -acodec mp3 output.mp4
    • 3.6 Gb to 30 Mb, very shitty quality 💩

Thanks for sharing, really helpful!

do these commands work just the same way on windows 10?

@Doraa789
Copy link

Doraa789 commented May 6, 2024

Thanks for sharing. I found that StreamFab can help you convert Netflix to MP4, then you can play them on most devices. You can learn more by https://streamfab.com/ .

@Leila9776
Copy link

Great discussion !
By the way if you want some dvd processing tools, theses one are highly recommanded.
https://dvdfab.fr/uhd-copy.htm
https://dvdfab.fr/dvd-copy.htm

@staygold24
Copy link

Read this article published by KeepStreams very helpful

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