TK1 Gstreamer H264

Hi all,
I’m trying to use the Jetson Tegra K1’s hardware decoder for h264 with gstreamer.
I can display one video window, but not any video window

code:
gst-lauch-0.10
filesrc location=“filename.mov”
! qtdemux
! queue
! nv_omx_h264dec
! nv_omx_hdmi_videosink overlay-x=280 overlay-y=200 overlay-w=640 overlay-h=480
sync=false

this code is ok with one window
if i used different terminal start another video , it not run

Error:
ubuntu@tegra-ubuntu:~/NVIDIA_Gstreamer$ sh ./nvgtest03.sh
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingSetting pipeline to PAUSED …
Pipeline is PREROLLING …
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)main, codec_data=(buffer)014d4029ffe10016274d4029a9180f0044fcb8035010101b6c2b5ef7c04001000428de09c8, width=(int)1920, height=(int)1080, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)main, codec_data=(buffer)014d4029ffe10016274d4029a9180f0044fcb8035010101b6c2b5ef7c04001000428de09c8, width=(int)1920, height=(int)1080, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)main, codec_data=(buffer)014d4029ffe10016274d4029a9180f0044fcb8035010101b6c2b5ef7c04001000428de09c8, width=(int)1920, height=(int)1080, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)main, codec_data=(buffer)014d4029ffe10016274d4029a9180f0044fcb8035010101b6c2b5ef7c04001000428de09c8, width=(int)1920, height=(int)1080, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1
NvMMLiteOpen : Block : BlockType = 261
TVMR: NvMMLiteTVMRDecBlockOpen: 4935: NvMMLiteBlockOpen
NvMMLiteBlockCreate : Block : BlockType = 261
TVMR: cbBeginSequence: 571: BeginSequence 1920x1088, bVPR = 0
TVMR: cbBeginSequence: 813: DecodeBuffers = 5
TVMR: cbBeginSequence: 833: Display Resolution : (1920x1080)
TVMR: cbBeginSequence: 834: Display Aspect Ratio : (1920x1080)
TVMR: cbBeginSequence: 996: SurfaceLayout = 3
TVMR: cbBeginSequence: 1026: NumOfSurfaces = 9, InteraceStream = 0, InterlaceEnabled = 0, bSecure = 0, MVC = 0 Semiplanar = 1, bReinit = 1
Allocating new output: 1920x1088 (x 11), ThumbnailMode = 0
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-nv-yuv, width=(int)1920, height=(int)1088, format=(fourcc)NV12, stereoflags=(int)0, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-nv-yuv, width=(int)1920, height=(int)1080, format=(fourcc)NV12, stereoflags=(int)0, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-nv-yuv, width=(int)1920, height=(int)1080, format=(fourcc)NV12, stereoflags=(int)0, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstOmxHdmiVideoSink:omxhdmivideosink0.GstPad:sink: caps = video/x-nv-yuv, width=(int)1920, height=(int)1080, format=(fourcc)NV12, stereoflags=(int)0, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
NvxBaseWorkerFunction[2480] comp OMX.Nvidia.render.hdmi.overlay.yuv420 Error -2147479552
ERROR: from element /GstPipeline:pipeline0/GstOmxHdmiVideoSink:omxhdmivideosink0: GStreamer encountered a general resource error.
Additional debug info:
/dvs/git/dirty/git-master_linux/external/gstreamer/gst-openmax/omx/gstomx_util.c(1166): omx_report_error (): /GstPipeline:pipeline0/GstOmxHdmiVideoSink:omxhdmivideosink0:
There were insufficient resources to perform the requested operation
Execution ended after 558327 ns.
Setting pipeline to PAUSED …
Setting pipeline to READY …
/GstPipeline:pipeline0/GstOmxHdmiVideoSink:omxhdmivideosink0.GstPad:sink: caps = NULL
Setting pipeline to NULL …
Freeing pipeline …
ubuntu@tegra-ubuntu:~/

Has anyone already tried this / got it to work ?

Thanks
Mark Pei

Not a solution or insight, just an alternative.

Maybe try this GST1.0 pipe instead

gst-launch-1.0 filesrc location=/path/to/file ! qtdemux ! h264parse ! queue ! \
               omxh264dec ! nveglglessink

P.S. If you’re missing gst1.0-elements read
https://devtalk.nvidia.com/default/topic/808990/nvgstplayer-1-0-in-r21-2-not-able-to-play-video-because-of-plugins-missing/#4450748

Hi GospelCH01,
thanks your infomation

But I want to use nv_omx_hdmi_videosink, because i want play video is fixed size.
For save CPU efficiency using I try to use gstreamer for video display in scaler control. It is oaky when I open one gstreamer. But when I tried to open more than one gstreamer, it can’t worked and got error message. How can I run multiple video display but consumed less CPU efficiency?

Well,
As i recalled, xvimagesink works with multiple pipes, but it’s software rendering.
Definitely, not what you’re looking for.
The gst0.1 version of egl sink - nv_gl_eglimagesink doesn’t work. (The reason why I switch to gst1.0)

And since I’m mainly working on gst1.0 nowadays, the best guess of mine is that even
with overlay nv_omx_hdmi_videosink still takes over whole display, leads to failure of the second pipe.

Sry, wish could be more helpful.

Can xvimagesink use play fix size video ?
I used nv_omx_hdmi_videosink with gst-0.1, it is fixed size, and it can not move
can it to do so with gst-1.0
How can I run multiple video display but consumed less CPU efficiency?

sorry, my english ^^

Actually, xvimageink & egl-sink (0.1: nv_egl_glimagesink, 1.0: nveglglessink) are both windowed sink.
And as I said, xvimagesink used soft-rendering, not what you’re looking for.
For reference, the pipe in #2 runs with blow 10-15% CPU rate while playing 1080p 30fps 4M BitRate h264 mp4 film.
But if there’s a reason that you’re insisting “fixed”, then obvious these are not good options.

GospelCH01,
Thanks for reply…!