New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using v4l2loopback = Internal data flow error. / reason not-negotiated (-4) #97

Open
patricksebastien opened this Issue Aug 31, 2015 · 7 comments

Comments

Projects
None yet
2 participants
@patricksebastien

patricksebastien commented Aug 31, 2015

Hi,

Using a simple pipeline like this works:

gst-launch videotestsrc ! v4l2sink device=/dev/video1

BUT using udpsrc instead of videotestsrc doesn't work (it does with autovideosink, but not with v4l2sink):

/GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:src: caps = video/x-raw-yuv, width=(int)1280, height=(int)720, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 401545862 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:src: caps = NULL
/GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...

From my raspi:

raspivid -t 0 -b 2000000 -fps 60 -w 1280 -h 720 -o - | \
      gst-launch-1.0 -e -vvv fdsrc \
                             ! h264parse \
                             ! rtph264pay pt=96 config-interval=5 \
                             ! udpsink host=10.42.0.1 port=5001

From my compute (crashing see above):

gst-launch -v udpsrc port=5001 \
              ! application/x-rtp, payload=96
              ! rtph264depay
              ! ffdec_h264
              ! ffmpegcolorspace
              ! v4l2sink device=/dev/video1
@umlaeute

This comment has been minimized.

Show comment
Hide comment
@umlaeute

umlaeute Aug 31, 2015

Owner

can you launch the test-pipeline (that uses to work) with forcing the caps to the very same as in the failing pipeline?

i also often that adding queue elements sometimes simply helps.

finally, i don't see any crash here (gst-launch simply stops)

Owner

umlaeute commented Aug 31, 2015

can you launch the test-pipeline (that uses to work) with forcing the caps to the very same as in the failing pipeline?

i also often that adding queue elements sometimes simply helps.

finally, i don't see any crash here (gst-launch simply stops)

@patricksebastien

This comment has been minimized.

Show comment
Hide comment
@patricksebastien

patricksebastien Sep 1, 2015

Today I'm not able to make it works with videotestsrc! Really lost here...

Linux pscbox 3.8.0-32-lowlatency #24-Ubuntu SMP PREEMPT Tue Oct 15 21:20:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
psc@pscbox:~$ sudo modprobe v4l2loopback

psc@pscbox:~$ gst-launch-0.10 videotestsrc ! v4l2sink device=/dev/video0
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Failed to query attributes of input 0 in device /dev/video0
Additional debug info:
v4l2_calls.c(142): gst_v4l2_fill_lists (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:
Failed to get 0 in input enumeration for /dev/video0. (25 - Inappropriate ioctl for device)
Setting pipeline to NULL ...
Freeing pipeline ...

I compiled from master for this kernel.

patricksebastien commented Sep 1, 2015

Today I'm not able to make it works with videotestsrc! Really lost here...

Linux pscbox 3.8.0-32-lowlatency #24-Ubuntu SMP PREEMPT Tue Oct 15 21:20:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
psc@pscbox:~$ sudo modprobe v4l2loopback

psc@pscbox:~$ gst-launch-0.10 videotestsrc ! v4l2sink device=/dev/video0
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Failed to query attributes of input 0 in device /dev/video0
Additional debug info:
v4l2_calls.c(142): gst_v4l2_fill_lists (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:
Failed to get 0 in input enumeration for /dev/video0. (25 - Inappropriate ioctl for device)
Setting pipeline to NULL ...
Freeing pipeline ...

I compiled from master for this kernel.

@umlaeute

This comment has been minimized.

Show comment
Hide comment
@umlaeute

umlaeute Sep 1, 2015

Owner
  • are both /dev/video0 and /dev/video1 loopback devices?
  • you need to pass exclusive_caps=0 to the module-parameters, since GStreamer-0.10 doesn't like output-only devices
Owner

umlaeute commented Sep 1, 2015

  • are both /dev/video0 and /dev/video1 loopback devices?
  • you need to pass exclusive_caps=0 to the module-parameters, since GStreamer-0.10 doesn't like output-only devices
@patricksebastien

This comment has been minimized.

Show comment
Hide comment
@patricksebastien

patricksebastien Sep 1, 2015

  • Right now I have only /dev/video0 (no real cam, only 1 v4l2)
  • I tried to pass exclusive_caps=0 to v4l2sink but this parameter is not found, tried with both: master and experimental.

patricksebastien commented Sep 1, 2015

  • Right now I have only /dev/video0 (no real cam, only 1 v4l2)
  • I tried to pass exclusive_caps=0 to v4l2sink but this parameter is not found, tried with both: master and experimental.
@umlaeute

This comment has been minimized.

Show comment
Hide comment
@umlaeute

umlaeute Sep 2, 2015

Owner

exclusive_caps is a module parameter, you need to pass it when loading the loopback device driver:

rmmod v4l2loopback
modprobe v4l2loopback exclusive_caps=0

(its unrelated to GStreamer)

Owner

umlaeute commented Sep 2, 2015

exclusive_caps is a module parameter, you need to pass it when loading the loopback device driver:

rmmod v4l2loopback
modprobe v4l2loopback exclusive_caps=0

(its unrelated to GStreamer)

@patricksebastien

This comment has been minimized.

Show comment
Hide comment
@patricksebastien

patricksebastien Sep 2, 2015

Yes! It works. For your information, it is also working when you follow this step:

  • launch exemples/test
  • open /dev/video0
  • close all
  • then you can use gstreamer v4l2sink 1 time only

As for the initial question, I tried adding ! queue ! (everywhere also) but it's still complaining. Will try to find a pipeline that works... Will post back if I succeed.

patricksebastien commented Sep 2, 2015

Yes! It works. For your information, it is also working when you follow this step:

  • launch exemples/test
  • open /dev/video0
  • close all
  • then you can use gstreamer v4l2sink 1 time only

As for the initial question, I tried adding ! queue ! (everywhere also) but it's still complaining. Will try to find a pipeline that works... Will post back if I succeed.

@umlaeute

This comment has been minimized.

Show comment
Hide comment
@umlaeute

umlaeute Dec 2, 2016

Owner

also check, whether adding a tee element helps (as described in #83), and/or whether it has been fixed in 0.10.0

Owner

umlaeute commented Dec 2, 2016

also check, whether adding a tee element helps (as described in #83), and/or whether it has been fixed in 0.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment