Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gldownload, does not download #25

Open
lubagov opened this issue Dec 22, 2018 · 5 comments
Open

gldownload, does not download #25

lubagov opened this issue Dec 22, 2018 · 5 comments

Comments

@lubagov
Copy link

lubagov commented Dec 22, 2018

Hello! On previous version, with Ubuntu 16.10, and GStreamer 1.8.1, all was fine.
I has update all libraries and rebuild it for Ubuntu 18.04.
But now, when i try to run this pipeline:
$ export GST_GL_PLATFORM=egl
$ gst-launch-1.0 --gst-debug=mfx*:4 -v v4l2src device=/dev/video0 ! image/jpeg,width=3264,height=2448,framerate=15/1 ! jpegparse ! mfxjpegdec ! mfxvpp ! video/x-raw\(memory:GLMemory\),format=RGBA ! gldownload ! video/x-raw,format\=\(string\)RGBA ! videoconvert ! ximagesink sync=false
I is not play video:

libva info: VA-API version 1.3.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_3
libva info: va_openDriver() returns 0
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'gldownloadelement0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Got context from element 'mfxdec_jpeg0': gst.mfx.Aggregator=context, gst.mfx.Aggregator=(GstMfxTaskAggregator)"\(GstMfxTaskAggregator\)\ mfxtaskaggregator0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = image/jpeg, width=(int)3264, height=(int)2448, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)NULL, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = image/jpeg, width=(int)3264, height=(int)2448, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)NULL, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:sink: caps = image/jpeg, width=(int)3264, height=(int)2448, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)NULL, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = image/jpeg, width=(int)3264, height=(int)2448, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)NULL, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:src: caps = image/jpeg, parsed=(boolean)true, format=(string)UYVY, width=(int)3264, height=(int)2448, framerate=(fraction)15/1
0:00:00.817581117 11331 0x55b2b644cf70 INFO               mfxdecode gstmfxdec.c:186:gst_mfxdec_update_sink_caps:<mfxdec_jpeg0> new sink caps = image/jpeg, parsed=(boolean)true, format=(string)UYVY, width=(int)3264, height=(int)2448, framerate=(fraction)15/1
0:00:00.819245829 11331 0x55b2b644cf70 INFO                     mfx gstmfxtaskaggregator.c:129:gst_mfx_task_aggregator_init_session_context: Using Media SDK API version 1.28
0:00:00.819258690 11331 0x55b2b644cf70 INFO                     mfx gstmfxtaskaggregator.c:147:gst_mfx_task_aggregator_init_session_context: Initialized internal MFX session using hardware accelerated implementation
libva info: VA-API version 1.3.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_3
libva info: va_openDriver() returns 0
/GstPipeline:pipeline0/GstMfxDec_jpeg:mfxdec_jpeg0.GstPad:sink: caps = image/jpeg, parsed=(boolean)true, format=(string)UYVY, width=(int)3264, height=(int)2448, framerate=(fraction)15/1
0:00:00.821836255 11331 0x55b2b644cf70 INFO               mfxdecode gstmfxdec.c:251:gst_mfxdec_update_src_caps:<mfxdec_jpeg0> new src caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)3264, height=(int)2448, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt2020, framerate=(fraction)15/1
/GstPipeline:pipeline0/GstMfxDec_jpeg:mfxdec_jpeg0.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)3264, height=(int)2448, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt2020, framerate=(fraction)15/1
0:00:00.822604872 11331 0x55b2b644cf70 INFO                     mfx gstmfxpluginbase.c:590:gst_mfx_plugin_base_decide_allocation:<mfxdec_jpeg0> No pool. Making a new pool
0:00:00.822723630 11331 0x55b2b644cf70 INFO                     mfx gstmfxdecoder.c:517:gst_mfx_decoder_start: Initialized MFX decoder using output video memory surfaces
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.617449365
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

this pipeline working:
$ gst-launch-1.0 --gst-debug=mfx*:4 -v v4l2src device=/dev/video0 ! image/jpeg,width=3264,height=2448,framerate=15/1 ! jpegparse ! mfxjpegdec ! mfxvpp ! video/x-raw\(memory:GLMemory\),format=RGBA ! glimagesink sync=false
Why it is not working anymore?

OS: Ubuntu 18.04
Gstreamer: 1.14.1
Intel Media SDK: Opensource 18.3.1
Libva: Intel 2.3.0
Intel Media Driver: 18.3.0
Intel gmlib: 18.3.0

@ishmael1985
Copy link
Owner

ishmael1985 commented Dec 22, 2018

You got a typo in your first pipeline with the '\' in front of '=' in your caps. It should be :

... ! gldownload ! video/x-raw, format=RGBA ! ...

@lubagov
Copy link
Author

lubagov commented Dec 22, 2018

Yes, thank you. but:
export GST_GL_PLATFORM=egl
gst-launch-1.0 --gst-debug=mfx*:4 -v v4l2src device=/dev/video0 ! image/jpeg,width=3264,height=2448,framerate=15/1 ! jpegparse ! mfxjpegdec ! mfxvpp ! video/x-raw\(memory:GLMemory\),format=RGBA ! gldownload ! video/x-raw,format=RGBA ! videoconvert ! ximagesink sync=false

also not working:

libva info: VA-API version 1.3.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_3
libva info: va_openDriver() returns 0
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'gldownloadelement0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Got context from element 'mfxdec_jpeg0': gst.mfx.Aggregator=context, gst.mfx.Aggregator=(GstMfxTaskAggregator)"\(GstMfxTaskAggregator\)\ mfxtaskaggregator0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = image/jpeg, width=(int)3264, height=(int)2448, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)NULL, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = image/jpeg, width=(int)3264, height=(int)2448, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)NULL, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:sink: caps = image/jpeg, width=(int)3264, height=(int)2448, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)NULL, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = image/jpeg, width=(int)3264, height=(int)2448, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)NULL, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:src: caps = image/jpeg, parsed=(boolean)true, format=(string)UYVY, width=(int)3264, height=(int)2448, framerate=(fraction)15/1
0:00:00.820016412 13037 0x55baa065f370 INFO               mfxdecode gstmfxdec.c:186:gst_mfxdec_update_sink_caps:<mfxdec_jpeg0> new sink caps = image/jpeg, parsed=(boolean)true, format=(string)UYVY, width=(int)3264, height=(int)2448, framerate=(fraction)15/1
0:00:00.821676357 13037 0x55baa065f370 INFO                     mfx gstmfxtaskaggregator.c:129:gst_mfx_task_aggregator_init_session_context: Using Media SDK API version 1.28
0:00:00.821699726 13037 0x55baa065f370 INFO                     mfx gstmfxtaskaggregator.c:147:gst_mfx_task_aggregator_init_session_context: Initialized internal MFX session using hardware accelerated implementation
libva info: VA-API version 1.3.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_3
libva info: va_openDriver() returns 0
/GstPipeline:pipeline0/GstMfxDec_jpeg:mfxdec_jpeg0.GstPad:sink: caps = image/jpeg, parsed=(boolean)true, format=(string)UYVY, width=(int)3264, height=(int)2448, framerate=(fraction)15/1
0:00:00.824659139 13037 0x55baa065f370 INFO               mfxdecode gstmfxdec.c:251:gst_mfxdec_update_src_caps:<mfxdec_jpeg0> new src caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)3264, height=(int)2448, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt2020, framerate=(fraction)15/1
/GstPipeline:pipeline0/GstMfxDec_jpeg:mfxdec_jpeg0.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)3264, height=(int)2448, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt2020, framerate=(fraction)15/1
0:00:00.825705832 13037 0x55baa065f370 INFO                     mfx gstmfxpluginbase.c:590:gst_mfx_plugin_base_decide_allocation:<mfxdec_jpeg0> No pool. Making a new pool
0:00:00.825867823 13037 0x55baa065f370 INFO                     mfx gstmfxdecoder.c:517:gst_mfx_decoder_start: Initialized MFX decoder using output video memory surfaces
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.621776107
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

(My problem is actually that my code is not working.
Which worked before. Before, gldownload needs a caps filter, which was not with GStreamer 1.8.1 (without it, output to system memory). In my code now, I have output in NV12 format after gldownload, instead of RGBA. And output to system memory, from mfxvpp. Trying to add filters, but so far unsuccessfully, the output is still in the system memory in NV12)

@lubagov
Copy link
Author

lubagov commented Dec 22, 2018

I build GStreamer 1.8.1 from sources, Ubuntu 18.04. And with this version pipeline working. Only R and B colors exchanged, even if i set variable export GST_GL_PLATFORM=egl. But i need make it working on 1.14.1

@ishmael1985
Copy link
Owner

That's strange. Can you do a clean build of gst-mfx with GStreamer 1.14?

@ishmael1985
Copy link
Owner

@lubagov I am able to reproduce the problem, so it looks like the behaviour of gldownload element has changed such that the GstGLBufferPool is not negotiated between the MFX element and the downstream gldownload element. glimagesink works though, but need more investigation on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants