H264 low-latency encoding

Hello. Trying to stream h264 encoded video from Jetson AGX Xavier with minimal latency, using tegra_multimedia_api/samples/01_video_encode as a reference.

  1. Is there a way to set up Picture Order Count type in v4l2?
    For example in nvmedia there is NvMediaEncodeConfigH264 structure with pocType field.
  2. Furthermore, since there is pretty much no documentation, if I’m interested in details of V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM control, where is the source code I could read to gain some insight?
    Thank you in advance.

Hi,

Don’t see the options in 01_video_encode. Will check if we can support this on L4T releases.

Please configure ‘-sir’ in running 01_video_encode

-sir <interval>       Slice intrarefresh interval [Default = 0]

Dear DaneLLL, thank you for the reply, but my second question was where the source code which handles v4l2 extended controls (V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM for example)? I was looking around in nvidia_sdk/JetPack_4.2.2_Linux_GA_P2888/Linux_for_Tegra/sources/kernel (obtained with source_sync.sh after SDK Manager has finished flashing), public_sources/v4l2_libs_src and public_sources/kernel_src (downloaded from https://developer.nvidia.com/embedded/r32-2-3_Release_v1.0/Sources/T186/public_sources.tbz2) but couldn’t find anything.

Hi,
Please check

/usr/src/tegra_multimedia_api/samples/common/classes/NvVideoEncoder.cpp

The samples are installed in /usr/src/tegra_multimedia_api/

Thank you. I’m well aware about this file, as I mentioned earlier I’m using it as a reference. But, the code in this file sends ioctl request, my question is where is the code which handles the requests. It supposed to be a video driver, is it open source?

Hi,

No, it is not open source. It is built in

/usr/lib/aarch64-linux-gnu/tegra/libtegrav4l2.so

Thank you for the answer, please consider adding Picture Order Count type control into next L4T release. Correct me if I’m wrong, but without changing POC to type 2 it is not possible to implement low-latency streaming.

Hi,
Configuring POC on L4T releases is not supported. Will evaluate to support it in future releases.