After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 603063 - camerabin example fails to start recording
camerabin example fails to start recording
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.21
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-11-26 16:38 UTC by Aleksey Lim
Modified: 2010-09-23 03:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
--gst-debug-level=4 log (240.12 KB, application/x-bzip2)
2009-11-26 16:39 UTC, Aleksey Lim
Details
log of last git version (223.79 KB, application/x-bzip2)
2010-01-20 03:02 UTC, Aleksey Lim
Details

Description Aleksey Lim 2009-11-26 16:38:24 UTC
gst-plugins-bad/tests/examples/camerabin logs gst errors and stops.

How to reproduce:
* 2009-11-25 gst git stack
* start gst-camera example
* switch to recording mode
* start recording
* application stops
Comment 1 Aleksey Lim 2009-11-26 16:39:26 UTC
Created attachment 148540 [details]
--gst-debug-level=4 log
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-19 22:18:19 UTC
This is the problem:

0:00:05.141260887  5769       0x8b2650 DEBUG              theoraenc theoraenc.c:423:theora_enc_sink_getcaps: Supported caps: video/x-raw-yuv, format=(fourcc){ I420, Y42B, Y444 }, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]
0:00:05.141288125  5769       0x8b2650 DEBUG               GST_CAPS gstpad.c:2131:gst_pad_get_caps_unlocked:<theoraenc0:sink> pad getcaps returned video/x-raw-yuv, format=(fourcc){ I420, Y42B, Y444 }, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]
0:00:05.141328493  5769       0x8b2650 DEBUG               GST_PADS gstpad.c:2448:gst_pad_acceptcaps_default:<theoraenc0:sink> allowed caps video/x-raw-yuv, format=(fourcc){ I420, Y42B, Y444 }, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]
0:00:05.141354544  5769       0x8b2650 DEBUG               GST_PADS gstpad.c:2500:gst_pad_accept_caps:<theoraenc0:sink> acceptfunc returned 0
0:00:05.141366906  5769       0x8b2650 DEBUG               GST_PADS gstpad.c:2500:gst_pad_accept_caps:<queue1:sink> acceptfunc returned 0
0:00:05.141378081  5769       0x8b2650 DEBUG               GST_PADS gstpad.c:2500:gst_pad_accept_caps:<tee0:sink> acceptfunc returned 0
0:00:05.141387789  5769       0x8b2650 DEBUG               GST_PADS gstpad.c:2500:gst_pad_accept_caps:<camerabinvideo0:sink> acceptfunc returned 0
0:00:05.141397427  5769       0x8b2650 DEBUG               GST_CAPS gstpad.c:2665:gst_pad_configure_sink:<camerabinvideo0:sink> caps video/x-raw-yuv, format=(fourcc)YUY2, width=(int)160, height=(int)120, framerate=(fraction)5/1 not accepted
0:00:05.141426131  5769       0x8b2650 INFO                 basesrc gstbasesrc.c:2399:gst_base_src_loop:<v4l2src0> pausing after gst_pad_push() = not-negotiated
0:00:05.141439262  5769       0x8b2650 DEBUG                basesrc gstbasesrc.c:2425:gst_base_src_loop:<v4l2src0> pausing task, reason not-negotiated
0:00:05.141449808  5769       0x8b2650 DEBUG               GST_PADS gstpad.c:5243:gst_pad_pause_task:<v4l2src0:src> pause task
0:00:05.141460493  5769       0x8b2650 DEBUG                   task gsttask.c:604:gst_task_set_state:<task1> Changing task 0x793320 to state 2
0:00:05.141474671  5769       0x8b2650 DEBUG              GST_EVENT gstevent.c:269:gst_event_new: creating new event 0x7f78bc00dcc0 eos 86
0:00:05.141506030  5769       0x8b2650 WARN                 basesrc gstbasesrc.c:2451:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
0:00:05.141516855  5769       0x8b2650 WARN                 basesrc gstbasesrc.c:2451:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason not-negotiated (-4)

<theoraenc0:sink> pad getcaps returned video/x-raw-yuv, format=(fourcc){ I420, Y42B, Y444 }, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]

<camerabinvideo0:sink> caps video/x-raw-yuv, format=(fourcc)YUY2, width=(int)160, height=(int)120, framerate=(fraction)5/1

Does that still happen with current versions? Seems we need to add more converters to camerabin :/
Comment 3 Aleksey Lim 2010-01-20 03:02:25 UTC
Created attachment 151808 [details]
log of last git version
Comment 4 Aleksey Lim 2010-01-20 03:03:43 UTC
last log looks different but gst-camera example still can't capture video with the same symptoms
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-26 07:39:05 UTC
Aleksey, does it change anything if you run
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so ./tests/examples/camerabin/gst-camera

That would confirm, that we need to insert a colorspace converter
Comment 6 Aleksey Lim 2010-01-26 12:39:44 UTC
nothing changed and log looks the same, with error:

camerabin camerabingeneral.c:57:gst_camerabin_add_element:<camerabinvideo0> error: linking (null) failed
Comment 7 Aleksey Lim 2010-01-26 12:43:17 UTC
..strace says that v4l2convert.so was loaded successfully
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-26 20:36:52 UTC
the "error: linking (null) failed" should be fixed in git. I am going to investigate this more still. Thanks for promptly providing all info.
Comment 9 Thiago Sousa Santos 2010-09-21 22:18:07 UTC
Just reproduced this and it looks like we should add another ffmpegcolorspace before the video-encoder.

What do you think Stefan?
Comment 10 Stefan Sauer (gstreamer, gtkdoc dev) 2010-09-22 14:32:24 UTC
Thiagos, don't we have this already as in flags|=source-colorspace-conversion ?
If that is not enough, we might need one in video-bin and add a "video-colorspace-conversion" flag.
Comment 11 Thiago Sousa Santos 2010-09-23 03:01:26 UTC
Added the new flag for video colorspace conversion, we already had a similar for the image branch.

commit 55ad3f881622e05b55c2347d006a281485c0339e
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Wed Sep 22 23:41:32 2010 -0300

    camerabin: example: make gst-camera use flags
    
    Enable all convertion flags in gst-camera example app
    for safety.
    
    Fixes #603063

commit b8afa0cc3c0af42ee663e12d06fa5a40edea2cbd
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Wed Sep 22 23:39:07 2010 -0300

    camerabin: Adds new video-colorspace-flag to flags
    
    Adds a new flag to allow a colorspace convertion before
    the video encoder element.
    
    Fixes #603063