[Jetson-TK1] H.264 Encoder High Profile


I try to use gstreamer to perform h.264 encoding on TK1.
Many reference(including wiki, TK1 datesheet, TK1 Reference Manual) shows that H264 High Profile is supported.

I have tried many times, using gstreamer-0.1 and gstreamer-1.0, but both methods output baseline stream. I also have tried different params, but it doesn’t work.

omxh264enc(using gstreamer-1.0) has the param ‘quant-b-frames’. I don’t know why setting this param does’t change the result(no B frame).

Is high profile supported or not? Did I miss something? Any one have tried H264 High Profile encoding?


After testing out a few configurations of the hardware-accelerated H264 encoder on the Jetson over the last few months, i can tell you what i found out so far.

It appears that the hardware-accelerated H264 encoder only supports the constrained-baseline profile, at least for the current implementation of the gstreamer-element (R21.3). If you look at the source code of the omxh264enc for Gstreamer1.0 (http://developer.download.nvidia.com/embedded/L4T/r21_Release_v3.0/sources/gstomx1_src.tbz2) in gstomx1_src/gst-omx1/omx/gstomxh264enc.c you will find the following static assignments for the output frames on lines 442-447:

data[0] = 0x01;
data[1] = 0x42;         // 66 Baseline profile
data[2] = 0x40;         // constrained Baseline
data[3] = 0x15;         // level2.1
data[4] = 0x03;         // nal length = 4 bytes
data[5] = 0x01;         // 1SPS

Therefore I assume that the encoder hardware block only supports the constrained baseline profile. Nonetheless there the element accepts other profiles without giving an error message, but will later overwrite the profile as shown above.

Thanks for your reply!

So it looks like we can’t perform h264 HP just using the gstreamer interface.

I also noticed this source code of omxh264enc for Gstreamer1.0. But for the “level2.1”, things become different. I can change the level to 4.1 , 3.2 or other cases, by means of changing the param level’s value in file /etc/enctune.conf.

Have you ever tried to modify the source code and recompile to generate the libgstomx.so, and replace the old one. I doubt, Maybe the driver hardware-accelerated H264 encoder has supported HP, but the interface is not so perfect.