dickontoo / omxtx

OpenMAX transcoder for the Raspberry Pi
GNU General Public License v2.0
117 stars 36 forks source link

Constant rate factor #11

Open boxdot opened 10 years ago

boxdot commented 10 years ago

Is there any possibility to use crf (constant rate factor) instead of bitrate. I tried to change this setting via ffmpeg interface

av_opt_set_double(cc->priv_data, "crf", 22.0, 0);

But it does not work. Could it be that I have to modify this parameter over the OpenMAX Il API? Unfortunately I cannot find any specification in the OpenMAX Pdf.

dickontoo commented 10 years ago

What would that do?

boxdot commented 10 years ago

Here is a good description http://slhck.info/crf.html. It is also the default encoding setting in Handbrake.

dickontoo commented 10 years ago

Ah. If you can see anything likely in firmware/documentation/ilcomponents/video_encode.html (you'll have to find a copy of it; there are plenty around) then possibly. I can't ATM, except for one which takes an unspecified uint32_t and is explicitly stated that it's internal only.

boxdot commented 10 years ago

Hmm. I see. There is no description what exactly OMX_IndexParamRateControlModel is. Sad, Handbrake with crf produces a much smaller file than omxtx.

sammys commented 10 years ago

Anything new found about OMX_IndexParamRateControlModel?

xlazom00 commented 9 years ago

https://github.com/raspberrypi/firmware/issues/329#issuecomment-61696016

brunogm0 commented 9 years ago

CRF is a unique technique of x264 software based ratecontrol. Broadcom has its own ratecontrol based on the JM H.264 reference software and so definitely there is no CRF mode. To implement one is basically asking to redo the entire codec! Also nothing could be copied from x264 for licensing issues, which adds complexity yet again.