Discussion:
[Bug 778438] New: Failed to get video stream from v4l2loopback device by using gstreamer 1.2.4 and gstreamer 1.8.2
"GStreamer" (GNOME Bugzilla)
2017-02-10 10:35:43 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=778438

Bug ID: 778438
Summary: Failed to get video stream from v4l2loopback device by
using gstreamer 1.2.4 and gstreamer 1.8.2
Classification: Platform
Product: GStreamer
Version: unspecified
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gstreamer (core)
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@live.com.my
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---

I tried to get video stream from v4l2loopback device by using Ubuntu 14.04 LTS,
Ubuntu 15.10, and Ubuntu 16.04 LTS but only Ubuntu 15.10 worked.

The procedure to reproduce this issue is as follow:
A USB webcam (Logitech c930e) is connected to laptop and refer as /dev/video0
***@ubuntu:~/Downloads/v4l2loopback$ ls /dev/video*
/dev/video0

A v4l2loopback device is created with the following modprobe command:
***@ubuntu:~/Downloads/v4l2loopback$ sudo modprobe v4l2loopback device=1

The loopback device is refer as /dev/video1
***@ubuntu:~/Downloads/v4l2loopback$ ls /dev/video*
/dev/video0 /dev/video1

For ubuntu 14.04.05 LTS
***@ubuntu:~/Downloads/v4l2loopback$ uname -a
Linux ubuntu 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC
2016 x86_64 x86_64 x86_64 GNU/Linux

***@ubuntu:~/Downloads/v4l2loopback$ 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

At 1st terminal
***@ubuntu:~/Downloads/v4l2loopback$ gst-launch-1.0 v4l2src
device=/dev/video0 ! video/x-raw, format=I420, framerate=30/1, width=640,
height=480 ! v4l2sink device=/dev/video1
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

At 2nd terminal
***@ubuntu:~$ gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,
format=I420, framerate=30/1, width=640, height=480 ! videoconvert ! xvimagesink
sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data
flow error.
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason error (-5)
Execution ended after 0:00:00.028176082
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

For Ubuntu 15.10
***@ubuntu:~$ uname -a
Linux ubuntu 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64
x86_64 x86_64 GNU/Linux

***@ubuntu:~$ gst-launch-1.0 --version
gst-launch-1.0 version 1.6.0
GStreamer 1.6.3
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0

At 1st terminal
***@ubuntu:~$ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,
format=I420, framerate=30/1, width=640, height=480 ! v4l2sink
device=/dev/video1
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

At 2nd terminal
***@ubuntu:~$ gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,
format=I420, framerate=30/1, width=640, height=480 ! videoconvert ! xvimagesink
sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:03.668339317
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

For Ubuntu 16.04 LTS
***@ubuntu:~$ uname -a
Linux ubuntu 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux

***@ubuntu:~$ gst-launch-1.0 --version
gst-launch-1.0 version 1.8.2
GStreamer 1.8.2
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0

At 1st terminal
***@ubuntu:~$ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,
format=I420, framerate=30/1, width=640, height=480 ! v4l2sink
device=/dev/video1
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

At 2nd terminal
***@ubuntu:~$ gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,
format=I420, framerate=30/1, width=640, height=480 ! videoconvert ! xvimagesink
sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to
allocate a buffer
Additional debug info:
gstv4l2src.c(884): gst_v4l2src_create ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0
Execution ended after 0:00:00.032129266
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

P.S: guvcview has no problem to open the v4l2loopback device /dev/video1 in
Ubuntu 14.04 LTS, Ubuntu 15.10, and Ubuntu 16.04 LTS

The v4l2loopback module is downloaded from
https://github.com/umlaeute/v4l2loopback
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-10 10:43:37 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=778438

Tim-Philipp Müller <***@zen.co.uk> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@zen.co.uk
Component|gstreamer (core) |gst-plugins-good
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-10 16:23:43 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=778438

Nicolas Dufresne (stormer) <***@ndufresne.ca> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |***@ndufresne.ca
Resolution|--- |NOTGNOME

--- Comment #1 from Nicolas Dufresne (stormer) <***@ndufresne.ca> ---
Enabling GST_DEBUG=3 would have printed the error, which would have clearly
indicated that the driver is buggy. I'm sorry, but this bug triggers as soon as
you need more then 2 buffers from the driver. GStreamer cannot support this
driver, fixing the driver is the right way.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-16 05:42:02 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=778438

--- Comment #2 from leong <***@live.com.my> ---
Problem solved after I downgrade the v4l2loopback driver from 0.10 to 0.9.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...