-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
gst-launch doesn't appear to work with akvcam #20
Comments
Yes it works as expected if you use correct device. Which is /dev/video4 in this case I think not Capture one. |
Interesting. That works with the short command, gst-launch-1.0 -v videotestsrc ! v4l2sink device=/dev/video4 however the long one returns: gst-launch-1.0 -v videotestsrc ! "video/x-raw,format=RGB,width=640,height=480,framerate=30/1" ! v4l2sink device=/dev/video4 Probably just a tweak to the format to make it work. Would also love to be able to stream a window with something like this: gst-launch-1.0 ximagesrc xid=0x03200001 ! "video/x-raw,format=RGB,width=640,height=480,framerate=30/1" ! v4l2sink device=/dev/video4 but that's probably more of an enhancement request :) |
I've tested gst-launch again with all new changes (now akvcam use v4l2 kernel API for managing almost everything), and it get stuck at:
akvcam is fully compliant according to v4l2-compliance, and it works fine with cat and ffmpeg, I think is more likely a bug in GStreamer, not sure. |
I give up with this, v4l2sink doesn't work with an akvcam output device. akvcam is fully compliant, so its more like a bug in GStreamer side. |
The issue stems from the fact that akvcam and the v4l2sink GStreamer have 2 different default minimum buffer settings and no common communication link. GStreamer: https://github.com/GStreamer/gst-plugins-good/blob/master/sys/v4l2/gstv4l2object.c static void g_return_if_fail (GST_V4L2_IS_OPEN (v4l2object)); if (V4L2_TYPE_IS_OUTPUT (v4l2object->type)) if (v4l2object->ioctl (v4l2object->video_fd, VIDIOC_G_CTRL, &control) == 0) { akvcam: https://github.com/webcamoid/akvcam/blob/master/src/ioctl.c
} Currently GStreamer stops rolling as the default outstanding buffer count is defaulted to 2 and akvcam sets the min buffer count to 4. v4l2 never commits the buffers to start streaming. Adding the appropriate communication either in akvcam or in GStreamer (or both) resolves the issue. May also be worth considering changing the default in akvcam to match GStreamer unless there's a good reason to keep it at 4. |
As suggested in issue #20, gst-launch is now working fine.
@thebied Tested, working, committed. Thank you very much! 😄 |
Appears that there is an issue with using gst-launch with akvcam virtual device, as it throws the following, even with the example commands from the wiki:
user@laptop:~$ gst-launch-1.0 -v videotestsrc ! v4l2sink device=/dev/video5
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Device '/dev/video5' is not a output device.
Additional debug info:
v4l2_calls.c(636): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:
Capabilities: 0x5200001
Setting pipeline to NULL ...
Freeing pipeline ...
Device works fine with webcamoid, just not for anything else...
The text was updated successfully, but these errors were encountered: