nvidia TX1 gstreamer omxh265enc fps

Hi team,

I have use gstreamer pipeline as follows:

gst-launch-1.0 -v nvcamerasrc fpsRange=“30.0 30.0” ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1’ ! nvvidconv flip-method=2 ! ‘video/x-raw(memory:NVMM), format=(string)I420, width=(int)1920, height=(int)1080, framerate=(fraction)30/1’ ! omxh265enc bitrate=8000000 ! ‘video/x-h265, stream-format=(string)byte-stream’ ! h265parse ! rtph265pay mtu=1400 ! udpsink host=xxx port=50000 sync=false async=false

I just want to test fps about omxh265enc, no matter what fps I changed for filters, when I recive this udp stream and decode it , the fps is fixed at 25. I try to save it and use ffprobe to display some imformation about it, still 25. But encode it in a another plugin, like x265enc, it is ok.

Is any wrong about the omxh265enc source? Someone has been in trouble with the same problems?

thanks

Hi,
Could you tell how you check the frame rate by your command and the BSP version.
However, I could get 30 fps recording file by below command with r24.2

gst-launch-1.0 -v nvcamerasrc num-buffers=200 fpsRange=“30.0 30.0” ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1’ ! nvvidconv flip-method=2 ! ‘video/x-raw(memory:NVMM), format=(string)I420, width=(int)1920, height=(int)1080, framerate=(fraction)30/1’ ! omxh265enc bitrate=8000000 ! ‘video/x-h265, stream-format=(string)byte-stream’ ! h265parse ! matroskamux ! filesink location= ch265.mp4

Hi,

I use ffprobe xxx to show the fps about it and the BSP version is R24.2 . I have test the command you give, it could get 30 fps recording file, but when I delete the plugin matroskamux, the fps I get is still 25, why?

We are testing H.264 encoder for a 4k/30fps stream server.
Unfortunately, we have not yet see 30fps, it was about 22fps.

Our environment:

  • R24.1 32bit / 64bit
  • Input: USB 3.0, 3840P, I420
  • Output: UDP/RTP (Same element: udpsink)

Does the local encoder can reach 30 fps for H.264 encoder? If the local encoder can get 30 fps the maybe the bottleneck is network or something else.

Hi ShaneCCC,

I’m waiting for some advices or suggestions.
https://devtalk.nvidia.com/default/topic/966938/jetson-tx1/how-to-achieve-the-h-264-encoding-performance-4k-3-840x2-160-30fps-with-openmax-il-api-l4t-r24-1/

If we cannnot do it via the OpenMAX IL API without GStreamer and can with new API or GStreamer,
I have to re-design our prototype with new multimedia API and L4T R24.2 as soon as possible.

Hi mynaemi
Due to USB camera can’t use NVMM buffer that means the memory copy is necessary and it really heart the performance.

Hi ShaneCCC@nVIDIA,

Thanks your comments.

My question is about H.264/4k, let’s move to,
https://devtalk.nvidia.com/default/topic/966938/jetson-tx1/how-to-achieve-the-h-264-encoding-performance-4k-3-840x2-160-30fps-with-openmax-il-api-l4t-r24-1/?offset=9

Best Regards,

Hi Cloundliu,
Could you check the timestamp with the command?

gst-launch-1.0 nvcamerasrc num-buffers=200 fpsRange=“30.0 30.0” ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1’ ! nvvidconv flip-method=2 ! ‘video/x-raw(memory:NVMM), format=(string)I420, width=(int)1920, height=(int)1080, framerate=(fraction)30/1’ ! omxh265enc bitrate=8000000 ! ‘video/x-h265, stream-format=(string)byte-stream’ ! filesink location=/tmp/a.h265 --gst-debug=omx*:5 &> a.log

cat a.log | grep ‘Handling buffer’

You should get the timestamp info of each frame:
0:00:06.885365241 17135 0x7f680022d0 DEBUG omxvideoenc gstomxvideoenc.c:1175:gst_omx_video_enc_loop: Handling buffer: 0x00000050 6708120

0:00:06.917328737 17135 0x7f680022d0 DEBUG omxvideoenc gstomxvideoenc.c:1175:gst_omx_video_enc_loop: Handling buffer: 0x00000050 6741340

For 30fps, the timestamp difference should be ~33000us.

Hi Cloundliu,
Please also check the execution time via the command:
gst-launch-1.0 -v nvcamerasrc num-buffers=300
fpsRange=“30.0 30.0” ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1’ ! nvvidconv flip-method=2 ! ‘video/x-raw(memory:NVMM), format=(string)I420, width=(int)1920, height=(int)1080, framerate=(fraction)30/1’ ! omxh265enc bitrate=8000000 ! ‘video/x-h265, stream-format=(string)byte-stream’ ! filesink location= ch265.265 -e

Execution ended after 0:00:10.158500534

For 300 frames the execution time is ~10 sec, the frame rate is ~30fps