$ DISPLAY=:0 gst-launch-1.0 filesrc location=/opt/nvidia/vpi2/samples/assets/dashcam.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! 'video/x-raw(memory:NVMM)' ! nv3dsink
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keynvbufsurftransform: Could not get EGL display connection
Setting pipeline to PAUSED ...
Invalid MIT-MAGIC-COOKIE-1 keyERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesink.c(5367): gst_base_sink_change_state (): /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0:
Failed to start
Setting pipeline to NULL ...
Freeing pipeline ...
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keynvbufsurftransform: Could not get EGL display connection
So, I removed DISPLAY=:0. As a result, I could play media file.
$ gst-launch-1.0 filesrc location=/opt/nvidia/vpi2/samples/assets/dashcam.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! 'video/x-raw(memory:NVMM)' ! nv3dsink
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE
Pipeline is PREROLLING ...
NvMMLiteOpen : Block : BlockType = 261
NvMMLiteBlockCreate : Block : BlockType = 261
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
What’s the reason that default video application and VLC could not play H.264 media file?
Please tell me.