Giter Site home page Giter Site logo

Comments (15)

umlaeute avatar umlaeute commented on July 29, 2024

try adding an ffmpegcolorspace somewhere between the v4l2src and the sink (this object often does wonders).

if it doesn't help, pleas run gstreamer with "-v" and/or with GST_DEBUG flags set.

from v4l2loopback.

sinclairrf avatar sinclairrf commented on July 29, 2024

I installed 0.6.2 and got the following:

sudo modprobe v4l2loopback devices=8
gst-launch-0.10 -v v4l2src device=/dev/video7 ! deinterlace method=linear ! ffmpegcolorspace ! v4l2sink device=/dev/video15
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format
Additional debug info:
gstbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Check your filtered caps, if any
Setting pipeline to NULL ...
Freeing pipeline ...

from v4l2loopback.

umlaeute avatar umlaeute commented on July 29, 2024

try raising GST_DEBUG flags to 3..5 to see something more informative.

does it work if you use videotestsrc as the producer (instead of v4l2src)?
does it work if you use xvimagesink as the consumer (instead of v4l2sink)?

from v4l2loopback.

sinclairrf avatar sinclairrf commented on July 29, 2024

Attached, please find the GST_DEBUG output,

Thank you for your help,
Rodney

On 12/13/2012 08:25 AM, umlaeute wrote:

if it doesn't help, please run gstreamer with "-v" and/or with
GST_DEBUG flags set.


Reply to this email directly or view it on GitHub
https://github.com/umlaeute/v4l2loopback/issues/34#issuecomment-11341022.

from v4l2loopback.

sinclairrf avatar sinclairrf commented on July 29, 2024

videotestsrc and xvimagesink both work with 0.6.2.

The dump using GST_DEBUG='*:5' was e-mailed (see preceding comment). It's 3.5 MB uncompressed and I don't know what to look for.

from v4l2loopback.

sinclairrf avatar sinclairrf commented on July 29, 2024

Did you get the GST_DEBUG printout?

from v4l2loopback.

sinclairrf avatar sinclairrf commented on July 29, 2024

I have an ugly work-around using 0.4.1 for the time being -- create two v4l2loopback devices for each of my video sources:

gst-launch-0.10 v4l2src device=/dev/video7 ! tee name=vid7
vid7. ! queue ! theoraenc ! filesink location=/data/user/vid7.mpg
vid7. ! queue ! deinterlace method=linear ! v4l2sink device=/dev/video8
vid7. ! queue ! deinterlace method=linear ! v4l2sink device=/dev/video9

I can then display /dev/video8 and /dev/video9 with no problems.

This does mean I'll need to make 24 v4l2loopback devices to replicate the 12 input video channels in my hardware.

from v4l2loopback.

umlaeute avatar umlaeute commented on July 29, 2024

it seems like the email with the GST_DEBUG printout got lost (or rather: it had no attachments).
just in case: don't forget to compress it it :-)

from v4l2loopback.

umlaeute avatar umlaeute commented on July 29, 2024

from your tests with xvimagesink and videotestsrc i guess, that v4l2loopback-0.6.2 works ok on your machine, and you have some problems with caps negotiation.

it would be good to know what the caps are in the working setup (with v4l2loopback-0.4.1): please make sure you load the old modules then run your simple pipeline with "-v", this should give you the used caps.
then try to manually force these caps when using the new version of v4l2loopback

from v4l2loopback.

sinclairrf avatar sinclairrf commented on July 29, 2024

command:
gst-launch-0.10 -v v4l2src device=/dev/video14 ! xvimagesink display=:0.0

produces:
caps = video/x-raw-yuv, format=(fourcc)YUY2, framerate=(fraction)30000/1001, width=(int)704, height=(int)480, interlaced=(boolean)true, pixel-aspect-ratio=(fraction)1/1

command using v4l2loopback 0.4.1:
gst-launch-0.10 -v v4l2src device=/dev/video14 ! deinterlace ! v4l2sink device=/dev/video16

produces:
v4l2sink0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)YUY2, framerate=(fraction)30000/1001, width=(int)704, height=(int)480, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1

command using v4l2loopback 0.6.2:
gst-launch-0.10 v4l2src device=/dev/video14 ! deinterlace ! 'video/x-raw-yuv, format=(fourcc)YUY2, framerate=(fraction)30000/1001, width=(int)704, height=(int)480, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1' ! v4l2sink device=/dev/video16

produces:
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format
Additional debug info:
gstbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Check your filtered caps, if any
Setting pipeline to NULL ...
Freeing pipeline ...

But then, it didn't work with 0.4.1 either.

The following does work with both versions:
gst-launch-0.10 -v v4l2src device=/dev/video14 ! deinterlace ! 'video/x-raw-yuv,format=(fourcc)YUY2' ! v4l2sink device=/dev/video16

I haven't been able to find a way to upload the GST_DEBUG dump to github. Do you know of a place where I can upload it?

from v4l2loopback.

sinclairrf avatar sinclairrf commented on July 29, 2024

When I rebooted the machine it didn't work.

The command:
gst-launch-0.10 -v v4l2src device=/dev/video14 ! deinterlace ! 'video/x-raw-yuv,format=(fourcc)YUY2' ! v4l2sink device=/dev/video16

Produced the following error message:
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format
Additional debug info:
gstbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Check your filtered caps, if any
Setting pipeline to NULL ...
Freeing pipeline ...

from v4l2loopback.

entd avatar entd commented on July 29, 2024

It seems I have same issue. I tried with with both gstreamer-0.10 and gstreamer-1.0 combined with v4l2loopback 0.6.2 and it quits with the same message. Just wondering, does:

v4l2-ctl -d /dev/video3 -V

should output any formats supported by loopback device? (Where "/dev/video3" is loopback device). When I do it throws:
VIDIOC_G_FMT: failed: Invalid argument
What could I do to help track issue.

from v4l2loopback.

entd avatar entd commented on July 29, 2024

Sorry for bothering, seems latest git release (6.3) is working well.
Edit: well at least part where I output to xvimagesink.
My pipeline:

gst-launch-0.10 -v \
    v4l2src  device=/dev/video1  \
    ! image/jpeg,width=640, height=480 \
    ! jpegdec \
    ! ffmpegcolorspace \
    ! queue  \
    ! video/x-raw-yuv,width=640, height=480 \
    ! decodebin2 \
    ! v4l2sink device=/dev/video6

doesn't work at all. What could be wrong with caps or timing?
Output: http://pastebin.com/SB7LxmKg
Can it be related to this issue?

from v4l2loopback.

yukkeorg avatar yukkeorg commented on July 29, 2024

Hi. You try to remove 'decodebin2' in your pipline and add 'format=(fourcc)YUY2' on caps.

full pipeline:

gst-launch-0.10 -v \
    v4l2src  device=/dev/video1 \
    ! image/jpeg,width=640, height=480 \
    ! jpegdec \
    ! ffmpegcolorspace \
    ! queue \
    ! video/x-raw-yuv,width=640,height=480,format=(fourcc)YUY2 \
    ! v4l2sink device=/dev/video6

I hope this helps.

from v4l2loopback.

entd avatar entd commented on July 29, 2024

Thanks for answer, I found problems why my pipeline doesn't work. It needed to be converted to YUV colorspace (JPEGDEC spits I420) and second, it needs videorate, because my webcam UVC device couldn't properly handle timestamps (videorate drops many frames as "fixes it", so real solution would be retimestamp all frames). Strangely enough input in xvideosink works nicely even with bad timestamps (probably frames are controled by framerate not timestamps, as do in timestamp ignoring containers), while chunks of very closely timestamped frames just kills loopback device sink. Now I am trying to restamp frames properly with stamp plug-in.

Anyway it probably has nothing to do with v4l2loopback device.

from v4l2loopback.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.