gtksink is not rendering my video (black screen)

pisymbol . pisymbol at gmail.com
Sat Jun 8 11:54:58 UTC 2019


On Sat, Jun 8, 2019 at 1:26 AM pisymbol . <pisymbol at gmail.com> wrote:

> If I do the following on the command line:
>
> gst-launch-1.0  filesrc
> location="/mnt/storage/2cam/20190608_050606Z_00000000.mkv" ! matroskademux
> name=demux demux.video_0 ! h264parse ! avdec_h264 ! videoconvert ! gtksink
>
> I see the video in the Cairo window.
>
> However, if I do the exact same thing in Python:
>
> on_realize():
>  53        self.pipeline = Gst.Pipeline()
>  54        factory = self.pipeline.get_factory()
>  55        gtksink = factory.make('gtksink')
>  56        self.pipeline.add(gtksink)
>  57        self.pipeline.add(self.bin) # self.bin =
> Gst.parse_bin_from_dsecription(pipeline above)
>  58        self.bin.link(gtksink)
>  59        self.pack_start(gtksink.props.widget, True, True, 0)
>  60        self.pipeline.set_state(Gst.State.PLAYING)
>  61        gtksink.props.widget.show_all()
>
>
>
Weird, the pipe is actually failing within Gst:

0:00:05.944147506 12757      0x11d0f70 INFO            GST_PIPELINE
grammar.y:518:gst_parse_found_pad: trying delayed linking pad  video_0 of
GstMatroskaDemux named demux to some pad of GstH264Parse named h264parse0
0:00:05.944179026 12757      0x11d0f70 INFO        GST_ELEMENT_PADS
gstutils.c:1573:gst_element_link_pads_full: trying to link element
demux:video_0 to element h264parse0:(any)
0:00:05.944199121 12757      0x11d0f70 INFO        GST_ELEMENT_PADS
gstelement.c:907:gst_element_get_static_pad: found pad demux:video_0
0:00:05.944260817 12757      0x11d0f70 INFO        GST_ELEMENT_PADS
gstelement.c:907:gst_element_get_static_pad: found pad h264parse0:sink
0:00:05.944287952 12757      0x11d0f70 INFO        GST_ELEMENT_PADS
gstutils.c:1124:gst_element_get_compatible_pad:<h264parse0> Could not find
a compatible pad to link to demux:video_0
0:00:05.944307568 12757      0x11d0f70 INFO                 default
gstutils.c:1962:gst_element_link_pads_filtered: Could not link pads:
demux:video_0 - h264parse0:(null)
0:00:05.944373647 12757      0x11d0f70 WARN                 default
grammar.y:506:gst_parse_no_more_pads:<demux> warning: Delayed linking
failed.
0:00:05.944391151 12757      0x11d0f70 WARN                 default
grammar.y:506:gst_parse_no_more_pads:<demux> warning: failed delayed
linking pad  video_0 of GstMatroskaDemux named demux to some pad of
GstH264Parse named h264parse0
0:00:05.944422927 12757      0x11d0f70 INFO        GST_ERROR_SYSTEM
gstelement.c:1879:gst_element_message_full:<demux> posting message: Delayed
linking failed.
0:00:05.944459054 12757      0x11d0f70 INFO        GST_ERROR_SYSTEM
gstelement.c:1902:gst_element_message_full:<demux> posted warning message:
Delayed linking failed.
0:00:05.944496014 12757      0x11d0f70 INFO               GST_EVENT
gstevent.c:760:gst_event_new_segment: creating segment event time segment
start=0:00:00.648000000, offset=0:00:00.000000000, stop=99:99:99.999999999,
rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000,
base=0:00:00.000000000, position 0:00:00.000000000, duration
99:99:99.999999999
0:00:05.945143367 12757      0x11d0f70 WARN           matroskademux
matroska-demux.c:4761:gst_matroska_demux_loop:<demux> error: stream
stopped, reason not-linked
0:00:05.945192006 12757      0x11d0f70 INFO        GST_ERROR_SYSTEM
gstelement.c:1879:gst_element_message_full:<demux> posting message:
GStreamer encountered a general stream error.
0:00:05.945221830 12757      0x11d0f70 INFO        GST_ERROR_SYSTEM
gstelement.c:1902:gst_element_message_full:<demux> posted error message:
GStreamer encountered a general stream error.
0:00:05.945249445 12757      0x11d0f70 INFO                    task
gsttask.c:316:gst_task_func:<demux:sink> Task going to paused

Again, why does this work on the command line but not in my Python window?

-aps
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190608/f2710848/attachment.html>


More information about the gstreamer-devel mailing list