4K 60fps videos plays at 30fps on Jetson Nano Developer Kit

I’m trying to play some 4K 60fps videos on Jetson Nano Developer Kit, but they are played at only 30fps.

This is my pipeline:

gst-launch-1.0 --gst-debug="*:1,omxvideodec:5,omxvideosink:5" filesrc location="/var/volatile/264-60.mkv" ! decodebin ! videoconvert ! nvoverlaysink

These lines are printed for every frame decoded or played:

0:00:15.478098436  5246   0x55a1834630 DEBUG            omxvideodec gstomxvideodec.c:3630:gst_omx_video_dec_handle_frame:<omxh265dec-omxh265dec0> Handling frame
0:00:15.490141786  5246   0x7f9808a370 DEBUG           omxvideosink gstomxvideosink.c:1377:gst_omx_video_sink_show_frame:<nvoverlaysink-nvoverlaysink0> Received the frame

I found the videos are decoded as 60fps, but played at only 30fps.

I also tried nvdrmvideosink with “nvdrmvideosink:5”, and get similar result. I guess I can try other sinks, but I hope they can work without x11 or weston.

The videos are downloaded from https://4kmedia.org, and I used VLC to verify they are 4K 60fps. My image was built from yocto, https://github.com/madisongh/meta-tegra with the branch “warrior”.

Is there any way to improve the performance?

Thanks.

Hi,
Please execute ‘sudo jetson_clocks’ and try the following command:

$ gst-launch-1.0 uridecodebin uri=file:///home/nvidia/jellyfish-5-mbps-hd-h264.mkv ! fpsdisplaysink video-sink=nvoverlaysink text-overlay=0 -v

If your TV does not support 4K, please add nvvidconv plugin to downscale to 1080p:

$ gst-launch-1.0 uridecodebin uri=file:///home/nvidia/Foreman_H264.mp4 ! nvvidconv ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! fpsdisplaysink video-sink=nvoverlaysink text-overlay=0 -v

Thank you.

My monitor does support 4K. I was using yocto, which doesn’t have jetson_clocks. So I’m now trying the ubuntu image which I downloaded.

$ gst-launch-1.0 uridecodebin uri=file:///home/jetson/Videos/264-60.mkv ! fpsdisplaysink video-sink=nvoverlaysink text-overlay=0 -v
......
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0: sync = true
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 22, dropped: 0, current: 43.09, average: 43.09
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 39, dropped: 0, current: 32.13, average: 37.51
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 54, dropped: 0, current: 29.94, average: 35.05
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 70, dropped: 1, fps: 30.06, drop rate: 1.88
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 86, dropped: 1, current: 30.00, average: 33.00
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 101, dropped: 1, current: 30.00, average: 32.51
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 115, dropped: 2, fps: 26.55, drop rate: 1.90
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 131, dropped: 2, current: 30.24, average: 31.47
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 146, dropped: 2, current: 29.34, average: 31.24
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 163, dropped: 4, fps: 30.37, drop rate: 3.57
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 179, dropped: 4, current: 31.82, average: 31.20
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 194, dropped: 5, fps: 28.60, drop rate: 1.91
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 211, dropped: 6, fps: 33.23, drop rate: 1.95
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 226, dropped: 8, fps: 26.76, drop rate: 3.57
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 243, dropped: 8, current: 33.57, average: 31.00
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 259, dropped: 8, current: 30.00, average: 30.93
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 274, dropped: 8, current: 29.09, average: 30.83
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 289, dropped: 9, fps: 28.65, drop rate: 1.91
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 304, dropped: 9, current: 29.62, average: 30.65
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 319, dropped: 9, current: 29.75, average: 30.61
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 334, dropped: 9, current: 29.20, average: 30.54
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 351, dropped: 10, fps: 32.14, drop rate: 1.89
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 367, dropped: 11, fps: 31.89, drop rate: 1.99

I tried it before and after ‘sudo jetson_clocks’, and I got almost same results.

I’m suspecting this is the issue:

jetson@jetson-board1:~$ cat /sys/class/graphics/fb0/mode
U:3840x2160p-30

Same on both yocto build and ubuntu.

I also checked /sys/class/graphics/fb0/modes. There are a few entries with “3840x2160”, but none of them is higher than 30.

Hi,
Please run below to check if the TV supports 4Kp60

nvidia@nvidia-desktop:~$ export DISPLAY=:1(or 0)
nvidia@nvidia-desktop:~$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 530mm x 300mm
   1920x1080     60.00*+
   1280x1024     75.03    60.00
   1152x864      75.00
   1024x768      75.03    60.01
   800x600       75.00    60.32
   720x400       70.04
   640x480       75.00    59.94

It turns out to be the monitor. The spec says “HDMI: 3840 x 2160/30Hz (Maximum) DP: 3840 x 2160/60Hz (Maximum)”. Unfortunately I was using HDMI. I switched to DP and the videos play at 60fps. Also I found another 4K monitor, and videos can play at 60fps over HDMI.

Thanks a lot for your help.

Glad to hear that it works. Thanks for sharing guidance of checking the monitor spec.