FFMpeg Hardware Transcoding on VIM3?

Hey,
Here is the library. https://github.com/pitchaya/c2_vpcodec
You can use this updated library with a slightly modified original code from https://github.com/OtherCrashOverride/c2enc
If you have problems making their code to run, I can send you my version.

The encoder come with the VIM3 kernel is a bit broken. You may have to copy


to your kernel and recompile the kernel module. (replacing this file ./drivers/amlogic/media_modules/frame_sink/encoder/h264/encoder.c ) Note that my version will allocate about 280MB of data. I can probably reduce the memory usage to 80MB, but it is not my priority.

If you have trouble compiling, I can provide you the binary version if you like.

The default compression is not great. ( you can set it in the constcbr argument of vl_video_encoder_init ) I don’t really know how the value is being used later on, but for 0x1XXYY. XX seems to be the quantization for the I frame, and YY is the motion quantization. the first 1 is something I added… not really used later on in the encoder.

5 Likes