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 606394 - [v4l2] Add an adaptive resampling stage when reading from a v4l device
[v4l2] Add an adaptive resampling stage when reading from a v4l device
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-08 11:21 UTC by Nicolas Mailhot
Modified: 2011-05-23 14:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicolas Mailhot 2010-01-08 11:21:31 UTC
Now that the audio stack has been converted to pulse-audio, it has become intolerant of clock drift. Therefore, direct reading from a v4l device in totem, that used to work fine, is now stuttering and freezing after just 30s (making it impossible to use)

Pulseaudio people say gstreamer should add automatically a resampling stage to take into account the clock drift between the v4l source and the audio device used for playback, and that direct reading from v4l device was always broken due to the lack of this stage, even though it just worked before PA was generalized.

See also
https://bugzilla.redhat.com/show_bug.cgi?id=553043
Comment 1 Wim Taymans 2010-01-13 11:13:16 UTC
pulseaudio does clock drift correctly. What you're probably seeing is a bug in mpegtsparse or something.
Comment 2 Wim Taymans 2010-03-04 14:43:13 UTC
Looking at the redhat bug report, this can't really be fixed like that because it treats the video device as a regular file while it is in fact a live stream.

Does this work with:

 gst-launch playbin uri=v4l2://
Comment 3 Nicolas Mailhot 2010-03-04 18:05:57 UTC
gst-launch playbin uri=v4l2:///dev/video0 --gst-debug-level=2
Setting pipeline to PAUSED ...
0:00:00.034035366 13835      0x1ece080 WARN                    v4l2 gstv4l2object.c:1939:gst_v4l2_object_set_format:<source> error: Device '/dev/video0' cannot capture in the specified format
0:00:00.034093609 13835      0x1ece080 WARN                    v4l2 gstv4l2object.c:1939:gst_v4l2_object_set_format:<source> error: Tried to capture in BGR3, but device returned format MPEG
Pipeline is live and does not need PREROLL ...
ERROR: from element /GstPlayBin:playbin0/GstV4l2Src:source: Device '/dev/video0' cannot capture in the specified format
Additional debug info:
gstv4l2object.c(1939): gst_v4l2_object_set_format (): /GstPlayBin:playbin0/GstV4l2Src:source:
Tried to capture in BGR3, but device returned format MPEG
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Comment 4 Wim Taymans 2010-03-04 18:10:26 UTC
ok, then the mpeg format needs to be added to v4l2src. what version of gst-plugins-base are you using?
Comment 5 Nicolas Mailhot 2010-03-04 18:37:50 UTC
Local gstreamer stack :

gstreamer-0.10.26.4-1.fc13.x86_64
gstreamer-ffmpeg-0.10.9-1.fc12.x86_64
gstreamer-java-1.3-2.fc13.x86_64
gstreamer-plugins-bad-0.10.17-4.fc13.x86_64
gstreamer-plugins-bad-free-0.10.17-7.fc13.x86_64
gstreamer-plugins-base-0.10.26.4-1.fc13.x86_64
gstreamer-plugins-good-0.10.18-2.fc13.x86_64
gstreamer-plugins-ugly-0.10.13-2.fc13.x86_64
gstreamer-python-0.10.16-1.fc12.x86_64
gstreamer-tools-0.10.26.4-1.fc13.x86_64
Comment 6 Nicolas Mailhot 2010-03-09 18:32:49 UTC
And with gstreamer-plugins-base-0.10.27-1.fc13.x86_64.rpm

$ gst-launch playbin uri=v4l2:///dev/video0
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
ERROR: from element /GstPlayBin:playbin0/GstV4l2Src:source: Device '/dev/video0' cannot capture in the specified format
Additional debug info:
gstv4l2object.c(1939): gst_v4l2_object_set_format (): /GstPlayBin:playbin0/GstV4l2Src:source:
Tried to capture in BGR3, but device returned format MPEG
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Comment 7 Sebastian Dröge (slomo) 2011-05-23 14:33:07 UTC
v4l2src now has support for mpeg since the last release.