4K 60fps videos play at 40 or 50 fps when using nveglglessink

I tried playing some H.264 and H.265 4K 60fps videos on Jetson Nano Developer Kit. When playing with nvoverlaysink, they can be played at 60fps, and videos look very good. But when playing with nveglglessink, they often played at only 40 or 50 fps, and the videos are clearly not very smooth.

DISPLAY=:0 gst-launch-1.0 uridecodebin uri=file:///home/root/videos/264-60.mkv ! fpsdisplaysink video-sink=nveglglessink text-overlay=0 -v
gst-launch-1.0 uridecodebin uri=file:///home/root/videos/264-60.mkv ! fpsdisplaysink video-sink=nvoverlaysink text-overlay=0 -v

The results are similar when using filesrc. I have run “jetson_clocks”. Is there anything else missing?

Also I found /sys/devices/gpu.0/load is always 0 when playing anything with overlaysink. Does it not use GPU?

You may try to insert nvvidconv after uridecodebin.

Thank you, Honey_Patouceul.

I tried the following pipelines. None of them got any better.

DISPLAY=:0 gst-launch-1.0 uridecodebin uri=file:///home/root/videos/264-60.mkv !                              fpsdisplaysink video-sink=nveglglessink text-overlay=0 -v
DISPLAY=:0 gst-launch-1.0 uridecodebin uri=file:///home/root/videos/264-60.mkv ! nvvidconv !                  fpsdisplaysink video-sink=nveglglessink text-overlay=0 -v
DISPLAY=:0 gst-launch-1.0 uridecodebin uri=file:///home/root/videos/264-60.mkv ! nvegltransform             ! fpsdisplaysink video-sink=nveglglessink text-overlay=0 -v
DISPLAY=:0 gst-launch-1.0 uridecodebin uri=file:///home/root/videos/264-60.mkv ! nvvidconv ! nvegltransform ! fpsdisplaysink video-sink=nveglglessink text-overlay=0 -v

I’m running a Xavier R32.2.1, and these pipelines work:

gst-launch-1.0 -v uridecodebin uri=file:///home/nvidia/test_4k_60_h265.mkv ! nvvidconv ! fpsdisplaysink video-sink=nveglglessink text-overlay=0
gst-launch-1.0 -v uridecodebin uri=file:///home/nvidia/test_4k_60_h265.mkv ! nvvidconv ! nvegltransform ! fpsdisplaysink video-sink=nveglglessink text-overlay=0

With nvoverlaysink, it seems it can work without nvvidconv, but I’d advise to keep it, in case it doesn’t output into NVMM memory depending on format for later uri.

With nveglglessink, in my case nvvidconv is mandatory, nvegltransform can be omitted but this results in lower fps, I suppose because the transform is done on cpu.

Hi,
GPU on Jetson Nano is 128 core Maxwell, so it is possible performance cannot reach 4Kp60 videoplayback with nveglglessink. Since you have run ‘sudo jetson_clocks’, the system has been running in max performance. We would suggest you use nvoverlaysink.

Hi Honey_Patouceul,

Thank you so much for taking time to test it. I appreciate it. At least the pipeline is fine. So perhaps the difference is the hardware.

Thank you, DaneLLL.

Jetson Nano should be able to decode “4K @ 60”. I suppose it’s still true because nvoverlaysink can achieve it, but it can’t play more than 6 videos, and I need much more than that. My software will be more complicated if I have to use different sinks.

Hi,
nveglglssink takes GPU loading, so suggest you use nvoverlaysink on Jetson Nano for 4Kp60.

You may also try DeepStream SDK4.0.1. There is a sample config file demonstrating 8 1080p30. If you don’t need deep learning inference, you may disable [primary-gie], [osd], [tracker] to run pure video playback.
https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html#page/DeepStream_Development_Guide%2Fdeepstream_app_config.3.2.html%23

Hi DaneLLL,

Thank you for pointing out the DeepStream approach. It’s one of my options. My understanding is it uses nvstreammux to play multiple videos in one pipeline. My concern is, if I want to stop or change the source of some of the videos, do I have to restart the whole pipeline? It would be great if there is some way to stop or change one of the videos without interrupting others.

I tried adding “sync=false” to nveglglessink. Now it can play H.264 video at 58fps. For H.265 it’s only 48, but still better than ~30 without “sync=false”.

About DeepStream, I just heard about the reference app “runtime_source_add_delete”. I might give it a try.

1 Like

Hi,
Please refer to the sample in
https://devtalk.nvidia.com/default/topic/1064141/deepstream-sdk/adding-and-removing-streams-during-runtime/post/5400731/#5400731

thanks for the mentioning of sync=false, it makes my fps from 0.5 (refresh every 2-3 seconds, very lagging) to 20 fps (my input is 20 fps)
So, what’s the secret of sync to nveglglessink?