videoflip breaks pipeline
Marek Jawurek
marek at jawurek.net
Thu Sep 11 10:47:26 PDT 2014
On Thu, 2014-09-11 at 10:57 -0300, Thiago Santos wrote:
> On 09/10/2014 05:26 PM, Marek Jawurek wrote:
> > Hi everone,
> >
> > the following line works great with gst-launch-1.0 and my c920 Logitech
> > Webcam:
> >
> > filesrc location=intro.mkv ! matroskademux name=demux ! decodebin !
> > videoscale ! video/x-raw,width=1280,height=800 ! queue ! videomixer
> > name=mix ! autovideosink sync=false demux.audio_0 ! decodebin !
> > audioconvert ! audioresample ! queue ! autoaudiosink v4l2src
> > device=/dev/video1 ! video/x-h264,width=432,height=240,framerate=30/1 !
> > h264parse ! decodebin ! mix.
> >
> > This is the output:
> > Setting pipeline to PAUSED ...
> > Pipeline is live and does not need PREROLL ...
> > Setting pipeline to PLAYING ...
> > New clock: GstSystemClock
> >
> > (gst-launch-1.0:16496): GStreamer-CRITICAL **: gst_structure_new_empty:
> > assertion 'gst_structure_validate_name (name)' failed
> > Redistribute latency...
> > ERROR: from
> > element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage: Output window was closed
> > Additional debug info:
> > xvimagesink.c(551): gst_xvimagesink_handle_xevents
> > (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage
> > Execution ended after 0:00:01.553816776
> > Setting pipeline to PAUSED ...
> > Setting pipeline to READY ...
> > Setting pipeline to NULL ...
> > Freeing pipeline ...
> >
> > However, when I introduce a videoflip into the Webcam's stream the
> > picture of the webcam is not displayed. gst-launch-1.0 also does not
> > display an error.
> > This is the line with videoflip:
> >
> >
> > filesrc location=media/intro.mkv ! matroskademux name=demux !
> > decodebin ! videoscale ! video/x-raw,width=1280,height=800 ! queue !
> > videomixer name=mix ! autovideosink sync=false demux.audio_0 !
> > decodebin ! audioconvert ! audioresample ! queue ! autoaudiosink
> > v4l2src device=/dev/video1 !
> > video/x-h264,width=432,height=240,framerate=30/1 ! h264parse !
> > decodebin ! videoflip ! mix.
> >
> > The gst-launch-1.0 output is:
> > Setting pipeline to PAUSED ...
> > Pipeline is live and does not need PREROLL ...
> > Setting pipeline to PLAYING ...
> > New clock: GstSystemClock
> >
> > (gst-launch-1.0:16515): GStreamer-CRITICAL **: gst_structure_new_empty:
> > assertion 'gst_structure_validate_name (name)' failed
> > Redistribute latency...
> > ERROR: from
> > element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage: Output window was closed
> > Additional debug info:
> > xvimagesink.c(551): gst_xvimagesink_handle_xevents
> > (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage
> > Execution ended after 0:00:02.608752035
> > Setting pipeline to PAUSED ...
> > Setting pipeline to READY ...
> > Setting pipeline to NULL ...
> > Freeing pipeline ...
> >
> > The camera's record light does turn on but it is not displayed in the
> > mix.
> >
> > Which additional information can I provide to help you help me?
> The first step would be to try to isolate the issue. Try removing the
> first part of the pipeline (the matroska file). Try to get to a minimum
> pipeline that still shows the issue.
The minimum pipeline that shows the issue is the following:
gst-launch-1.0 filesrc location=media/intro.mkv ! matroskademux
name=demux ! decodebin ! videomixer name=mix ! autovideosink
sync=false v4l2src device=/dev/video1 !
video/x-h264,width=432,height=240,framerate=30/1 ! h264parse !
decodebin ! videoflip method=horizontal-flip ! mix.
The pipeline:
gst-launch-1.0 v4l2src device=/dev/video1 !
video/x-h264,width=432,height=240,framerate=30/1 ! h264parse !
decodebin ! videoflip method=horizontal-flip ! autovideosink sync=false
does work as expected. The issue seems to be with the videomix?
To exclude mkvdemux I tried the following:
gst-launch-1.0 filesrc location=media/intro.jpg ! jpegdec !
imagefreeze ! videomixer name=mix ! autovideosink sync=false v4l2src
device=/dev/video1 ! video/x-h264,width=432,height=240,framerate=30/1 !
h264parse ! decodebin ! videoflip method=horizontal-flip ! mix.
this did not work. Inserting videoconvert did not help:
gst-launch-1.0 filesrc location=media/intro.jpg ! jpegdec !
imagefreeze ! videomixer name=mix ! autovideosink sync=false v4l2src
device=/dev/video1 ! video/x-h264,width=432,height=240,framerate=30/1 !
h264parse ! decodebin ! videoconvert ! videoflip
method=horizontal-flip ! mix.
> Then try to look for warnings when running it with GST_DEBUG=2 and see
> if there is something useful there. If anything shows up, the next step
> is to get more logs and look for the issue.
Unfortunately, from my point of view the warnings do not say anything
that might help:
Output for the NOT WORKING pipeline:
gst-launch-1.0 filesrc location=media/intro.jpg ! jpegdec !
imagefreeze ! videomixer name=mix ! autovideosink sync=false v4l2src
device=/dev/video1 ! video/x-h264,width=432,height=240,framerate=30/1 !
h264parse ! decodebin ! videoflip method=horizontal-flip ! mix.
was:
Setting pipeline to PAUSED ...
0:00:00.036813981 5387 0x179de80 WARN videodecoder
gstvideodecoder.c:2026:gst_video_decoder_chain:<jpegdec0> Received
buffer without a new-segment. Assuming timestamps start from 0.
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.561325971 5387 0x179df70 WARN v4l2
gstv4l2bufferpool.c:308:gst_v4l2_buffer_pool_alloc_buffer: Failed
CREATE_BUFS: Inappropriate ioctl for device
0:00:00.561413704 5387 0x179df70 WARN bufferpool
gstbufferpool.c:297:do_alloc_buffer:<v4l2bufferpool0> alloc function
failed
0:00:00.585866307 5387 0x179df70 WARN structure
gststructure.c:191:gst_structure_validate_name: Invalid character ',' at
offset 35 in structure name:
application/x-gst-av-stream_segment,ssegment
(gst-launch-1.0:5387): GStreamer-CRITICAL **: gst_structure_new_empty:
assertion 'gst_structure_validate_name (name)' failed
Redistribute latency...
0:00:00.684547804 5387 0x179df70 WARN bufferpool
gstbufferpool.c:632:gst_buffer_pool_set_config:<v4l2bufferpool0> can't
change config, we are active
0:00:00.684660939 5387 0x179df70 WARN bufferpool
gstbufferpool.c:632:gst_buffer_pool_set_config:<v4l2bufferpool0> can't
change config, we are active
0:00:01.632631758 5387 0x179df70 WARN videodecoder
gstvideodecoder.c:2365:gst_video_decoder_prepare_finish_frame:<avdec_h264-0> decreasing timestamp (0:00:01.237607418 < 0:00:01.391295525)
0:00:01.795482591 5387 0x179dca0 WARN xvimagesink
xvimagesink.c:551:gst_xvimagesink_handle_xevents:<autovideosink0-actual-sink-xvimage> error: Output window was closed
ERROR: from
element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage: Output window was closed
Additional debug info:
xvimagesink.c(551): gst_xvimagesink_handle_xevents
(): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage
Execution ended after 0:00:01.757840928
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Output for the WORKING pipeline without videoflip:
gst-launch-1.0 filesrc location=media/intro.jpg ! jpegdec !
imagefreeze ! videomixer name=mix ! autovideosink sync=false v4l2src
device=/dev/video1 ! video/x-h264,width=432,height=240,framerate=30/1 !
h264parse ! decodebin ! mix.
was:
Setting pipeline to PAUSED ...
0:00:00.039778743 5400 0xb32de0 WARN videodecoder
gstvideodecoder.c:2026:gst_video_decoder_chain:<jpegdec0> Received
buffer without a new-segment. Assuming timestamps start from 0.
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.628870068 5400 0xb32ed0 WARN v4l2
gstv4l2bufferpool.c:308:gst_v4l2_buffer_pool_alloc_buffer: Failed
CREATE_BUFS: Inappropriate ioctl for device
0:00:00.628958027 5400 0xb32ed0 WARN bufferpool
gstbufferpool.c:297:do_alloc_buffer:<v4l2bufferpool0> alloc function
failed
0:00:00.650492708 5400 0xb32ed0 WARN structure
gststructure.c:191:gst_structure_validate_name: Invalid character ',' at
offset 35 in structure name:
application/x-gst-av-stream_segment,ssegment
(gst-launch-1.0:5400): GStreamer-CRITICAL **: gst_structure_new_empty:
assertion 'gst_structure_validate_name (name)' failed
Redistribute latency...
0:00:00.861301582 5400 0xb32ed0 WARN bufferpool
gstbufferpool.c:632:gst_buffer_pool_set_config:<v4l2bufferpool0> can't
change config, we are active
0:00:00.861399190 5400 0xb32ed0 WARN bufferpool
gstbufferpool.c:632:gst_buffer_pool_set_config:<v4l2bufferpool0> can't
change config, we are active
0:00:02.546983066 5400 0xb32c00 WARN xvimagesink
xvimagesink.c:551:gst_xvimagesink_handle_xevents:<autovideosink0-actual-sink-xvimage> error: Output window was closed
ERROR: from
element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage: Output window was closed
Additional debug info:
xvimagesink.c(551): gst_xvimagesink_handle_xevents
(): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage
Execution ended after 0:00:02.506139417
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
>
> videoflip supports lots of formats, but it might also be a negotiation
> error. So try putting a videoconvert before the videoflip to check for that.
As mentioned above this did not help.
>
> What version of gstreamer are you using?
I am using:
gst-launch-1.0 --version
gst-launch-1.0 version 1.2.4
GStreamer 1.2.4
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0
>
Thanks for helping!
How can I check whether I have a negotiation error?
Marek
> >
> > Marek
> >
> >
> >
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
More information about the gstreamer-devel
mailing list