How to enable CABAC on TX2 omxh264enc element

Hi All

Recently, I want to enable CABAC on TX2 omxh264enc element, but I don’t know how to do it. Does anyone know if omxh264enc supports CABAC? and how to enable it

BTW, I found some people said omxh264enc default enable CABAC on TK1 omxh264enc high profile. I try it on Tx2, and parse H264 stream PPS by wireshark, I found entropy_coding_mode_flag is 0 (1 mean CABAC).

On r32.2, please try

$ gst-launch-1.0 videotestsrc num-buffers=100 ! video/x-raw,width=1920,height=1080 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! omxh264enc profile=main cabac-entropy-coding=1 ! 'video/x-h264,level=(string)4.2,stream-format=byte-stream' ! h264parse ! qtmux ! filesink location=a.mp4


Thanks for you help I can successful enable CABAC, in r32.2

Now in r32.2, I found a problem I want to use omxh264enc enable B frame, when I set omxh264enc profile=(main or high) number-B-Frames=2 , pipeline can’t work, but when I set omxh264enc profile=baseline number-B-Frames=2, it can work. if I change jetpack version to R28, omxh264enc profile=main/high number-B-Frames=2 can work

There is error information

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 100, Level = 40
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
#0  0x0000007f7bf01048 in __GI___poll (fds=0x558ed3efa0, nfds=547541283248, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
#1  0x0000007f7c00ed80 in  () at /usr/lib/aarch64-linux-gnu/
#2  0x000000558ecaf2d0 in  ()
Spinning.  Please run 'gdb gst-launch-1.0 8057' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

I see the wiki, high and main profile can support B frame

Can you tell me why I can not use number-B-Frames on Main and high profile?

Continue in