$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
./ffmpeg -i input.mp4 -c:v libx265 -preset ultrafast -crf 28 -c:a aac -b:a 250k output.mp4
This is better for h265, it's fast and should reduce the file size by 50-70% if you want better video, change the ultrafast to fast or change the -crf to a lower number like 24
If you want to change from 4K to 1080P, add -s 1920x1080
after the -i input.mp4
./ffmpeg -i input.mp4 -c:v libx265 -preset ultrafast -crf 28 -c:a aac -b:a 250k output.mp4
This is better for h265, it's fast and should reduce the file size by 50-70% if you want better video, change the ultrafast to fast or change the -crf to a lower number like 24
If you want to change from 4K to 1080P, add
-s 1920x1080
after the-i input.mp4
This worked pretty well for me -- converted a 323 MB Zoom recording to a 81 MB file. without reducing resolution, is there anything more one can do to further shave off the file size?
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!
thanks, it works.
using || -b:v 1000K || ---- from 2MB to 1MB mp4 file