Play 4k video clip on axg xavier board

Hi experts,

I install jetpack sdk on axg xavier board with below doc
https://docs.nvidia.com/sdk-manager/install-with-sdkm-jetson/index.html

And then I try to play 4k clip with below command:
gst-launch-1.0 filesrc location=Sony-Bravia-OLED-4K-Demo.mp4 !
qtdemux name=demux demux.video_0 ! queue ! h265parse ! omxh265dec !
nvoverlaysink -e

but I got below error:

Setting pipeline to PAUSED …
Pipeline is PREROLLING …

(gst-launch-1.0:9562): GStreamer-CRITICAL **: 20:08:17.767: gst_caps_is_empty: assertion ‘GST_IS_CAPS (caps)’ failed

(gst-launch-1.0:9562): GStreamer-CRITICAL **: 20:08:17.767: gst_caps_truncate: assertion ‘GST_IS_CAPS (caps)’ failed

(gst-launch-1.0:9562): GStreamer-CRITICAL **: 20:08:17.768: gst_caps_fixate: assertion ‘GST_IS_CAPS (caps)’ failed

(gst-launch-1.0:9562): GStreamer-CRITICAL **: 20:08:17.768: gst_caps_get_structure: assertion ‘GST_IS_CAPS (caps)’ failed

(gst-launch-1.0:9562): GStreamer-CRITICAL **: 20:08:17.768: gst_structure_get_string: assertion ‘structure != NULL’ failed

(gst-launch-1.0:9562): GStreamer-CRITICAL **: 20:08:17.768: gst_mini_object_unref: assertion ‘mini_object != NULL’ failed
NvMMLiteOpen : Block : BlockType = 279
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 279
Allocating new output: 3840x2160 (x 10), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3605: Send OMX_EventPortSettingsChanged: nFrameWidth = 3840, nFrameHeight = 2160
ERROR: from element /GstPipeline:pipeline0/GstOMXH265Dec-omxh265dec:omxh265dec-omxh265dec0: Internal data stream error.
Additional debug info:
/dvs/git/dirty/git-master_linux/3rdparty/gst/gst-omx/omx/gstomxvideodec.c(3005): gst_omx_video_dec_loop (): /GstPipeline:pipeline0/GstOMXH265Dec-omxh265dec:omxh265dec-omxh265dec0:
stream stopped, reason not-negotiated
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to NULL …
Freeing pipeline …

Is there any one encounter the same with me?
Could you please show me some instructions?

my clip info as below:

ffprobe -show_streams Sony-Bravia-OLED-4K-Demo.mp4

ffprobe version 3.4.8-0ubuntu0.2 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘Sony-Bravia-OLED-4K-Demo.mp4’:
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isom
creation_time : 2016-10-24T05:40:14.000000Z
Duration: 00:01:23.08, start: 0.000000, bitrate: 73114 kb/s
Stream #0:0(und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 72917 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2016-10-24T06:37:11.000000Z
handler_name : Video Media Handler
encoder : HEVC Coding
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
creation_time : 2016-10-24T06:37:11.000000Z
handler_name : Sound Media Handler
[STREAM]
index=0
codec_name=hevc
codec_long_name=H.265 / HEVC (High Efficiency Video Coding)
profile=Main 10
codec_type=video
codec_time_base=1001/60000
codec_tag_string=hvc1
codec_tag=0x31637668
width=3840
height=2160
coded_width=3840
coded_height=2160
has_b_frames=1
sample_aspect_ratio=1:1
display_aspect_ratio=16:9
pix_fmt=yuv420p10le
level=153
color_range=tv
color_space=bt2020nc
color_transfer=smpte2084
color_primaries=bt2020
chroma_location=unspecified
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=60000/1001
avg_frame_rate=60000/1001
time_base=1/60000
start_pts=0
start_time=0.000000
duration_ts=4984980
duration=83.083000
bit_rate=72917259
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=4980
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2016-10-24T06:37:11.000000Z
TAG:language=und
TAG:handler_name=Video Media Handler
TAG:encoder=HEVC Coding
[/STREAM]
[STREAM]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_time_base=1/48000
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=3987456
duration=83.072000
bit_rate=192000
max_bit_rate=196608
bits_per_raw_sample=N/A
nb_frames=3895
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2016-10-24T06:37:11.000000Z
TAG:language=eng
TAG:handler_name=Sound Media Handler
[/STREAM]

thanks,
Limeng

Hi,
Please try to decode it through uridecodebin:

$ export DISPLAY=:0
$ gst-launch-1.0 uridecodebin uri=file:///home/nvidia/Foreman_H264.mp4 ! nvvidconv ! nvegltransform ! nveglglessink

thanks a lot!
I can play my 4k clip.

Could you please tell me how to route the audio of the 4k clip to 4k HDMI monitor?

I can run below 2 command lines to play video and audio
gst-launch-1.0 filesrc location=Sony-Bravia-OLED-4K-Demo.mp4 ! qtdemux name=demux demux.audio_0 ! queue ! avdec_aac ! audioconvert ! alsasink -e device=hw:0,8
gst-launch-1.0 uridecodebin uri=file:///home/xavier/Sony-Bravia-OLED-4K-Demo.mp4 ! nvvidconv ! nvegltransform ! nveglglessink

but could you please tell me how to play the audio and video of the 4k clip with one command line?

regards,
Limeng

Hi,
You may try

$ gst-launch-1.0 uridecodebin uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.mp4 name=dec dec. ! queue ! nvvidconv ! nvegltransform ! nveglglessink dec. ! queue ! audioconvert ! alsasink device=hw:0,8

It works fine.
Very appreciate!

regards,
Limeng