gst-omx issues temporal-tradeoff


I was using the temporal-tradeoff property of the encoder in the past on the TX1 and have not had any issues.

on the TX2 though, it seems it is not taking affect. I have set the value to 4 as seen here:

gst-launch-1.0 \
v4l2src device=/dev/video0 io-mode=2 do-timestamp=true typefind=true ! "video/x-raw, width=1920, height=1080,  format=(string)UYVY, framerate=(fraction)60/1"  ! queue !  nvvidconv  output-buffers=4  ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=I420, framerate=60/1'  ! omxh264enc control-rate=2 bitrate=500000 temporal-tradeoff=4 ! 'video/x-h264, stream-format=(string)byte-stream' !  queue !  mpegtsmux ! udpsink host= port=5061 sync=false async=true --gst-debug=*omx*:2

which should drop 2 in 3 frames. So with my 60fps video i should be getting 20fps. Yet i am still getting 60fps. I’ve tried the other settings also (1-3) and they all do not work.

I downloaded the source after seeing a warning stating:

0:00:00.088373571 22938       0x6014a0 WARN             omxvideoenc gstomxvideoenc.c:1862:gst_omx_video_enc_set_format:<omxh264enc-omxh264enc0> Error setting temporal_tradeoff 2 : Vendor specific error (0x00000001)

But ironically this error actually relates to the “gst_omx_video_enc_set_quantization_range” function in the code where the error message is actually mislabelled as temporal-tradeoff AND is actually incorrectly returning TRUE when successful when it should be returning a ‘0’ on success. So that is actually a false positive bug.

So the temporal tradeoff is not actually throwing any errors for being set, yet it is still not taking affect.

I’m on 28.2.1

I cross referenced with the xavier release of gst-omx to see if there were any relevant updates but there is not.

For more information, does it happen if you flash r28.2 to TX1?
what is the working BSP revision you flashed to TX1?

TX1 version i was using was 23.2. I no longer have an X1 to work with though.

We can reproduce the issue. Checking and will update.

Please try attached prebuilt library. It is verified by below command:

$ gst-launch-1.0 nvcamerasrc num-buffers=300 ! 'video/x-raw(memory:NVMM),width=1280,height=720,framerate=60/1,format=NV12' ! nvvidconv output-buffers=10 ! 'video/x-raw(memory:NVMM),width=1920,height=1080,framerate=60/1' ! omxh264enc bitrate=500000 control-rate=2 temporal-tradeoff=3 ! video/x-h264,stream-format=byte-stream ! fpsdisplaysink video-sink=fakesink sync=false -v (306 KB)