Encode H265 on TX1

  1. I only found arm A57 cores inside jetson TX1 , when I cat “/proc/cpuinfo”, where is the arm A53 cores ?
  2. How many 4K@30p video channels does one jetson TX1 support ? it can transcode 2 channels, the cuda and the nvencode module each process one independantly?
  3. I have installed the driver for my jetson TX1, it transcodes by ARM A57 cores, but it still does not work to encode H265 through cuda or its special hardware encoding moudle , should I install nvidia 352 or other key modules ? where can I get these necessary packages?
  4. When i build nvidia_video_sdk_6.0.1\Samples\NvEncoder, but libnvidia-encode.so not found.

Jetson TX1 product specifications include the quad-core A57. The A53 is not included because the difference of out-of-order execution between the core types causes runtime incompatibility within libc.

The TX1 hardware supports encoding one 4Kp30 stream using gstreamer. If you have a software library that performs the encoding using CUDA kernels, this in theory could provide you a software path in addition to HW gstreamer path.

The hardware encoder uses gstreamer, it’s installed by default after flashing with Jetpack.
See the Multimedia User Guide http://developer.download.nvidia.com/embedded/L4T/r23_Release_v1.0/L4T_Tegra_X1_Multimedia_User_Guide.pdf

These are for discrete GPU, Tegra uses gstreamer to access hw encoder instead of NVENC.

  1. I only found arm A57 cores inside jetson TX1 , when I cat “/proc/cpuinfo”, where is the arm A53 cores ?
    Jetson TX1 product specifications include the quad-core A57. The A53 is not included because the difference of out-of-order execution between the core types causes runtime incompatibility within libc.
    // I am still confused that whether the hardware A53 is inside the jetson TX1 or not ?

  2. How many 4K@30p video channels does one jetson TX1 support ? it can transcode 2 channels, the cuda and the nvencode module each process one independantly?
    The TX1 hardware supports encoding one 4Kp30 stream using gstreamer. If you have a software library that performs the encoding using CUDA kernels, this in theory could provide you a software path in addition to HW gstreamer path.
    // the four cpus is totally domainated 400% when we encode 4 chanells of 1080p stream with H265 codec. It seems like that we encode using CPU instead of the particular encoding hardware, I want to konw this phenomenon is normal?

// command like this:
	gst-launch-1.0 videotestsrc pattern=18 ! 'video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080' ! omxh265enc iframeinterval=1 ! h265parse config-interval=0 ! queue name=queenc ! mpegtsmux name=mux ! udpsink host=172.30.13.5 port=7651 -e &
	gst-launch-1.0 videotestsrc pattern=18 ! 'video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080' ! omxh265enc iframeinterval=1 ! h265parse config-interval=0 ! queue name=queenc ! mpegtsmux name=mux ! udpsink host=172.30.13.5 port=7652 -e &
	gst-launch-1.0 videotestsrc pattern=18 ! 'video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080' ! omxh265enc iframeinterval=1 ! h265parse config-interval=0 ! queue name=queenc ! mpegtsmux name=mux ! udpsink host=172.30.13.5 port=7653 -e &
	gst-launch-1.0 videotestsrc pattern=18 ! 'video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080' ! omxh265enc iframeinterval=1 ! h265parse config-interval=0 ! queue name=queenc ! mpegtsmux name=mux ! udpsink host=172.30.13.5 port=7654 -e &
	gstream version is 1.7.2

// By the way, Will you recommand some cude lib to encode with H265 codec?

  1. I have installed the driver for my jetson TX1, it transcodes by ARM A57 cores, but it still does not work to encode H265 through cuda or its special hardware encoding moudle , should I install nvidia 352 or other key modules ? where can I get these necessary packages?
    The hardware encoder uses gstreamer, it’s installed by default after flashing with Jetpack.
    See the Multimedia User Guide http://developer.download.nvidia.com/embedded/L4T/r23_Release_v1.0/L4T_Tegra_X1_Multimedia_User_Guide.pdf

  2. When i build nvidia_video_sdk_6.0.1\Samples\NvEncoder, but libnvidia-encode.so not found.
    These are for discrete GPU, Tegra uses gstreamer to access hw encoder instead of NVENC.
    // do you mean that NVENC module is only used on PC server, and is not ported to Tegra X1?

  3. When i trancode H264 to H265 use

gst-launch-1.0 souphttpsrc location=http://172.30.13.5:8080/Video/shaonvshidai.mp4 ! qtdemux ! queue name=quedec ! h264parse ! omxh264dec ! nvvidconv ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420’ ! omxh265enc ! h265parse ! queue name=queenc ! mpegtsmux name=mux ! filesink location=/media/ubuntu/KINGSTON/transcode/tshaonvshidai.ts -e,

the encoding process can start successfully and we can receive the encoded H265 stream and play it. But unfortunately,after a while, the encoding process is blocked and nothing outputs anymore.

thanks.

I have a similar question to what is posted above - is the gstreamer way the only way to access the H265 encoder? Or will nvidia release a more lightweight alternative, a library that can easily be called from a (C) program? I have seen this thread: https://devtalk.nvidia.com/default/topic/914984/h-265-encoding-on-the-tx1/ but was looking for a way to call the encoder more directly instead of using gstreamer.

Preferably in a way that allows both video encoding as well as (ab)using the H265 encoder for still images in BPG format (BPG Image format).

Thanks!

Hi ArthurXuepeng,

  1. // the four cpus is totally domainated 400% when we encode 4 chanells of 1080p stream with H265 codec. It seems like that we encode using CPU instead of the particular encoding hardware, I want to konw this phenomenon is normal?
    gstream version is 1.7.2
    // By the way, Will you recommand some cude lib to encode with H265 codec?

Below points for high CPU utilization for the following pipeline used,
gst-launch-1.0 videotestsrc pattern=18 ! ‘video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080’ ! omxh265enc iframeinterval=1 ! h265parse config-interval=0 ! queue name=queenc ! mpegtsmux name=mux ! udpsink host=172.30.13.5 port=7651 -e &

  1. Videotestsrc is cpu intensive as input source which can be checked using following pipeline.
    gst-launch-1.0 videotestsrc ! ‘video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080’ ! fakesink sync=1 -v -e

Above pipeline consumes almost ~65% cpu0 load with sync=1 & almost 100% if disable sync on target.

  1. Use-case pipeline involves “raw->nvmm” format conversion (handled at omx-il) required by Nv video encoders & at higher resolutions mentioned conversion yield high cpu utilization due to involved mem copy operation.

Hence, in order to check h265 encode hw path using gstreamer, should use input src (like nvcamerasrc) which can provide NvMM buffers input to encoder to avoid above mentioned “raw->nvmm” conversion.

  1. // do you mean that NVENC module is only used on PC server, and is not ported to Tegra X1?
    On Tegra X1 L4T uses gst-omx plugins for accelerated video encode using NVENC hw module.

  2. When i trancode H264 to H265 use

gst-launch-1.0 souphttpsrc location=http://172.30.13.5:8080/Video/shaonvshidai.mp4 ! qtdemux ! queue name=quedec ! h264parse ! omxh264dec ! nvvidconv ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420’ ! omxh265enc ! h265parse ! queue name=queenc ! mpegtsmux name=mux ! filesink location=/media/ubuntu/KINGSTON/transcode/tshaonvshidai.ts -e,

the encoding process can start successfully and we can receive the encoded H265 stream and play it. But unfortunately,after a while, the encoding process is blocked and nothing outputs anymore.

Following h264 → h265 transcode pipeline using gst-1.6.0 able to get encode h265 stream on TX1 without any hang/block.
gst-launch-1.0 souphttpsrc location=http://10.24.217.12/rat60sec_h264_1080_30_20M.mp4 ! qtdemux ! queue name=quedec ! h264parse ! omxh264dec ! nvvidconv ! ‘video/x-raw(memory:NVMM), format=(string)I420’ ! omxh265enc ! h265parse ! queue name=queenc ! matroskamux name=mux ! filesink location=/home/ubuntu/test.mkv -e
Hence, It seems no issues with the nv accelerated gst-plugin functionality.
We may need more info regarding the observed issue with the debug logs in case.

Thanks

Regarding the A53 cores, those are not available on the Jetson TX1 module.

Hi

Just curious, for hardware accelerated compression, is it based on GPU or something else?

If based on other IC, can we do one hardware approach based on IC and one software approach based Cuda?

Besides GPU, tx1 also includes hardware-accelerated video codec block.

I tried to run the pipeline above:

gst-launch-1.0 videotestsrc pattern=18 ! 'video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080' ! omxh265enc iframeinterval=1 ! h265parse config-interval=0 ! queue name=queenc ! mpegtsmux name=mux ! udpsink host=172.30.13.5 port=7651 -e &

but got the following warning:

erroneous pipeline: no element "mpegtsmux"

Hi Dan,
Yo need to install gatreamer1.0-plugins-bad for mpegtsmux
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/gst-plugins-bad-plugins-plugin-mpegtsmux.html

I was able to use the above command on my development board to start a stream, however, I am unsure what I should type into VLC to view the livestream. Here is my code

nvidia@tegra-ubuntu:~$ gst-launch-1.0 videotestsrc pattern=18 ! 'video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080' ! omxh265enc iframeinterval=1 ! h265parse config-interval=0 ! queue name=queenc ! mpegtsmux name=mux ! udpsink host=192.168.10.135 port=7651 -e &
[1] 8188
nvidia@tegra-ubuntu:~$ Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and MjstreamingPipeline is PREROLLING ...
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 8
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 8
===== NVENC blits (mode: 1) into block linear surfaces =====
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

I am not sure what kind of stream this is, tcp, rtsp, etc. Nor am I sure the exact structure of the URL I need to input. Any help in this area would be greatly appreciated. I am still new to this

Please refer to https://devtalk.nvidia.com/default/topic/1003598/