setting h264 level for omxh264enc

Jetpack 3.1/repository 1.8.3 gstreamer

I’m using a rather hacky solve at the moment to transcode an input udp src to a smaller resolution/framrate and seem to be experiencing difficulties in setting the h264 level so iOS devices in particular can play the video.

gst-launch-1.0 -ve udpsrc port=14000 \
! queue name=in ! decodebin name=db \
 db. ! queue name=vid ! nvvidconv ! 'video/x-raw(memory:NVMM), width=(int)720,height=(int)480, format=(string)I420' \
! omxh264enc control-rate=2 bitrate=650000 profile=2 insert-sps-pps=true \
! mpegtsmux name=mux ! rtpmp2tpay ! udpsink host=<ip> port=<port> \
 db. ! queue name=aud ! audioconvert ! voaacenc ! mux.

When evaluating the output from above using profile=1 my tools report the video as baseline@L5.2, with profile=2 it reports main@L5.2.

If I’m understanding correctly the level is supposed to be set in the /etc/enctune.conf file, but setting level=xx does not appear to change anything (rebooting after changes).

Some guidance on how to use this file would be useful. It appears there is Settings_xxx and a Settings_Default (which I somewhat assume would be used since the output video is 720x480 and neither 1080p 0r 720p. But changing level=xx does not appear to make any difference to the output video. I found another thread that had information for H265 that showed shifting the value and other settings but not info on what would be required for H264. Would this be in source code somewhere?

thanks

This may be of interest. It doesn’t explain the enctune.conf but it should allow you to change the level if you don’t mind recompiling some code.

https://devtalk.nvidia.com/default/topic/1024757/jetson-tx2/tx2-h264-encoded-videos-will-not-play-in-web-browsers/

Good find, I missed that topic somehow. It’s the exact same problem for sure.

We have it supported on r28.2. Please install via Jetpack 3.2. Below command is for your reference:

gst-launch-1.0 filesrc location=park_joy_1080p50.y4m  ! y4mdec ! 'video/x-raw,framerate=50/1' ! omxh264enc profile=high ! 'video/x-h264,<b>level=(string)4.2</b>' ! qtmux ! filesink location=test.mov