Compress videos with ffmpeg in PHP

325 Views Asked by At

I want to reduce the size of a MP4 video.
I call ffmpeg command via PHP with this command:

ffmpeg -i $convertUrl -c:v libx264 -crf 28 $convertUrlTmp 2>&1

But it does not reduce enough the video dimension (31 mb --> 23 mb).
How can I compress more?

1

There are 1 best solutions below

0
On

You can experiment with the x265 or vpx instead of x264. You can also try to reduce the bitrate.

... -b:v $bitrate -bufsize $bitrate ...