Figured it out. I now encode way faster with decent settings. Thanks.
OPen the main plugin php file and around line 2790. Careful. This is only for who knows php. Make a copy of the file first!
Can you post the revised FFMPEG settings you’re using?
Kyle, it is a matter of tinkering with quantizing. You need to compress at the right level, but don’t you know FFMPEG? 🙂
The quantizer (in FFMPEG output: Q=20 from the params in your script) should be around 20, which it actually is.
It can be played with but I agree you should add a way to choose video quality in the conversion.
Kyle, I ran some other tests to simplify the settings.
Fundamentally, you need to change three parameters:
1. the vpre flag needs to change from slow to veryfast
2. threads are a really important part of speed, ideally change it to 0 to use all available threads otherwise run tests using 2, 3, 4 threads. This will increase speed on a shaed hosting dramatically.
3. This is the principal parameter for quality> -crf and it can go from 15 (lossless) to 30 really compress and low quality. I use 24 which yields and excellent size quality ratio.
To make the changes simple (because honestly audio should be adjusted too but lets not go there now) I simplified the changes to adding these:
Line 2787: if ( $options[‘ffmpeg_vpre’] == ‘on’ ) { $vpre_flags = ‘-vpre slow -vpre ipod640’; }
Change to:
if ( $options[‘ffmpeg_vpre’] == ‘on’ ) { $vpre_flags = ‘-vpre veryfast threads 0 -crf 24’; }
This will execute if you select the vpre switch in settings on the admin side.
Hope this helps.
PS This is for h264. I have not even looked at webm (which presents specific issues for encoding parameters) and ogg.
Thanks for the tips. I set most of the ffmpeg settings almost two years ago and I haven’t revisited them much since then. I don’t actually use the encoding functions myself (I do all my encoding before I upload) so I don’t spend a lot of time thinking about it.
At the time I remember being concerned about monopolizing system resources on a machine that was simultaneously being used as a web server, which is why I’m only using 1 thread. I think I used the “slow” vpre because it was supposed to take its time and provide better quality compression.
As far as I can tell the default crf for libx264 is 23. Is there a noticeable difference between 23 and 24?
I’ve always meant to allow users to modify encoding settings but I kept forgetting to do it. It’s on my list now and it will be pretty simple to implement.