Low performance of multivideo_decode

Hi,

We used the L4T Multimedia API samples to test the video-decoding performance on Jetson Nano, We found that when decoding 1~2 video streams(1080p@30fps) the decoding fps is 30. but 3~4 video streams the fps is down to 15~20. The official document shows the decoding-performance is 8x1080p@30fps, Could you tell me the reason?
Thanks for your help!
1 Like

Hi,
THe max capability of h264 decoder is

3840 x 2160 at
60 fps
Up to 120 Mbps

https://docs.nvidia.com/jetson/l4t/index.html

For 8 1080p30, please ensure bitrate is 120M/8 = 15Mbps per stream.
Please also execute jetson_clocks.

Hi DaneLLL,

I executed jetson_clocks and used the sample video stream(/sample_outdoor_car_1080p_10fps.h264) to test, Here is the command:

./multivideo_decode num-files 4 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 ../../data/Video/sample_    outdoor_car_1080p_10fps.h264 H264 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 --disable-rendering --stats

the performance statistics print as follows, It shows that the fps is 20, can NOT up to 30.

Instance 0 executed sucessfully.
*****************************************
Stream = ../../data/Video/sample_outdoor_car_1080p_10fps.h264
Total Profiling time = 30.4566
Average FPS = 19.3719
Average latency(usec) = 0
Minimum latency(usec) = 18446744073709551615
Maximum latency(usec) = 0
*****************************************
*****************************************
Stream = ../../data/Video/sample_outdoor_car_1080p_10fps.h264
Total Profiling time = 29.5991
Average FPS = 19.933
Average latency(usec) = 0
Minimum latency(usec) = 18446744073709551615
Maximum latency(usec) = 0
*****************************************
*****************************************
Stream = ../../data/Video/sample_outdoor_car_1080p_10fps.h264
Total Profiling time = 29.7476
Average FPS = 19.8335
Average latency(usec) = 0
Minimum latency(usec) = 18446744073709551615
Maximum latency(usec) = 0
*****************************************
*****************************************
Stream = ../../data/Video/sample_outdoor_car_1080p_10fps.h264
Total Profiling time = 29.7724
Average FPS = 19.817
Average latency(usec) = 0
Minimum latency(usec) = 18446744073709551615
Maximum latency(usec) = 0
*****************************************
App run was successful

It’s strange that I used the gstreamer to test,the fps can up to 30.

Hi 117365946,

We can’t reproduced your issue with JetPakc-4.2 (r32.1) on Jetson-Nano.

  • multivideo_decode 2 videos, Average FPS = 142.663
  • multivideo_decode 4 videos, Average FPS = 71.5625
  • multivideo_decode 8 videos, Average FPS = 35.973

Test pipeline the same with yours:

$ ./multivideo_decode num_files 4 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 --disable-rendering --stats

I Flash Jetpack-4.2 via sdkmanager and install all components, then run the 14_multivideo_decode samples.
Please make sure your power supply that can deliver 5V⎓2A at the developer kit’s Micro-USB port.
Reference link: https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#prepare

Hi carolyuu,
The power supply we used is 5V/3A and we used the SD Card Image(jetson-nano-sd-r32.1-2019-03-18.zip) to test.

Hi,
The sd card we use is https://consumer.apacer.com/eng/content.php?sn=933 (16GB)

Hi carolyuu,DaneLLL,

Thanks for your reply. I know how to reproduce the issue now, I edited the file of multivideo_decode_csvparser.cpp and forced the variable [disable_rendering] to false, then rebuild the source code and run the multivideo_decode by following pipeline:

./multivideo_decode num_files 4 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 --stats

the performance statistics shows that the average FPS is 20.

Hi,
It is not supported currently. If you run ‘-h’, you can see

NOTE: Currently multivideo_decode to be only run with --disable-rendering Mandatory

Hi DaneLLL,

You can use the 00_video_decode samples to test, the pipeline as follows:

./video_decode H264 --stats ../../data/Video/sample_outdoor_car_1080p_10fps.h264

The average FPS is 30.

But when you run the pipeline with --disable-rendering as follows:

./video_decode H264 --disable-rendering --stats ../../data/Video/sample_outdoor_car_1080p_10fps.h264

The average FPS is 234.

Hi,
We would suggest you try other power supply and sd cards. You should at least achieve the same result as we have verified in comment #2

Hi DaneLLL,

I do not have a faster SD card at my side, Actually I do NOT think it is the sd card problem.Can you tell me the average FPS when you run the following pipeline:
./video_decode H264 --stats ../../data/Video/sample_outdoor_car_1080p_10fps.h264

Hi 117365946,

Below is our test result:

$ ./video_decode H264 --disable-rendering --stats ../../data/Video/sample_outdoor_car_1080p_10fps.h264
----------- Element = dec0 -----------
Total Profiling time = 2.14851
<b>Average FPS = 274.609</b>
Total units processed = 591
-------------------------------------

The root case is your SD card speed too slow, when running h264 video decode got bottleneck.
Please replace high speed SD card to do the test. Thanks!

1 Like