Skip to content
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

submit v4l2loopback to the upstream kernel #268

Open
jiribohac opened this issue Mar 26, 2020 · 21 comments
Open

submit v4l2loopback to the upstream kernel #268

jiribohac opened this issue Mar 26, 2020 · 21 comments

Comments

@jiribohac
Copy link

It would be so much easier if this module were upstream.
I searched lkml archives and found no trace of anyone trying to submit it.
Is there a reason for that?
Are there outstanding problems that need to be fixed first? Can I help?

@jiribohac
Copy link
Author

I don't see why not - we have the network loopback driver, the block loop driver, alsa aloop and others. I think it's a question of whether it's useful and v4l2loopback is.

@umlaeute
Copy link
Owner

i have talked to the people of the v4l2-subsytem in the past, and their reaction was not all that positive.

iirc the biggest problem is, that v4l2loopback might provide a loophole for camera-vendors (or vendors of other video capturing devices) to not strive for v4l2-compatibility, as they instead might provide their own non-v4l2 driver (but still claim "v4l2 compatibility", as you could just pipe the output of their proprietary capture software interfacing their proprietary driver into a loopback device).

it wasn't all that negative either, e.g. @hverkuil submitted 5568514 to make the code adhere to the kernel-standards (a first prerequisite to upstream the code).

so having said that: i'm totally open to upstreaming v42loopback (it certainly would get better support by people who actually know their business), but i'm probably not the one who is going to do the bureaucratic work :-) so go ahead (PRs for bringing the code up to kernel-standards are highly welcome)

@ctubbsii
Copy link

ctubbsii commented Apr 6, 2020

👍 to getting this upstream. This was the suggestion when I tried to get it packaged into Fedora so that the kernel module would be signed. I think the argument about proprietary capture software is a bit silly... because one could make the same argument for other loopback devices, yet they're still included upstream.

@umlaeute
Copy link
Owner

umlaeute commented Apr 9, 2020

regarding silly arguments

are you barking up the wrong tree here?

@ctubbsii
Copy link

ctubbsii commented Apr 9, 2020

are you barking up the wrong tree here?

Probably. But, I don't know if I have the time/energy to champion it upstream. I just wanted to express my opinion here to help bolster the argument for anybody who did have that time/energy.

My main points against the argument that it would enable proprietary capture software, if anybody wants to try to use them upstream, are:

  1. The argument can't be valid, because if it were valid and applied consistently, then it would have prevented other loopback modules which have already been included upstream,
  2. Anything that enables proprietary capture software would also enable open capture software (such as obs-studio and many others),
  3. Open source software should enable innovation, not impose unnecessary restrictions,
  4. Providing a bridge to proprietary software can actually help some proprietary products from understanding the value of open source, and can encourage them to build future solutions using open standards and software, and
  5. The value to open source would outweigh any value to proprietary software, since there are already well-known open source products that require this driver.

Feel free to use these arguments if you think they are any good.

@hverkuil
Copy link
Contributor

hverkuil commented Apr 14, 2020 via email

@umlaeute umlaeute changed the title submit 4l2loopback to the upstream kernel submit v4l2loopback to the upstream kernel Apr 16, 2020
@mjg
Copy link

mjg commented Apr 20, 2020

I use this module on Fedora 31 with UEFI/secure boot. For this I created a signing key and registered it with my UEFI (MOK). For every kernel update, I compile and sign the module. This is not for everyone ...
In any case, it does work here, but basically every secure boot setup would benefit from upstreaming.

I do see several "competitors" such as the droidcam fork and the module from webcamoid. It's not v4l2loopback's duty to integrate those, of course, but it raises the question what the module here is lacking or what the others are adding (besides disregard for kernel module config policies in the case of the latter ...), i.e.: this might be a question when upstreaming.

@aramg
Copy link

aramg commented May 5, 2020

fwiw.. if this becomes an official/signed module I would certainly consider ditching the (old) droidcam fork and appropriating the app to use the loopback driver directly.

@nettings
Copy link

FWIW, this driver is also packaged in openSUSE Tumbleweed. The package is called v4l2loopback-kmp-*, and there is v4l2loopback-utils as well.

Thanks for the great work, this driver is a very useful tool!

@stalkerg
Copy link

so having said that: i'm totally open to upstreaming v42loopback (it certainly would get better support by people who actually know their business), but i'm probably not the one who is going to do the bureaucratic work :-) so go ahead (PRs for bringing the code up to kernel-standards are highly welcome)

@umlaeute I suppose you shouldn't do it this bureaucratic work but at the same time will be greater if you just posting this driver in mail lists. We will see real feedbacks, and issues and some people can back to you with PRs.
Publish patches as is much better than working in your repo only.

@umlaeute
Copy link
Owner

you know that:

  • everybody can submit PRs right now. it's not "me working alone in my private repo", this is an open source project on a public git server
  • everybody can "post this driver in mailing lists". you can do that right now.

@hverkuil
Copy link
Contributor

hverkuil commented Oct 14, 2020 via email

@umlaeute
Copy link
Owner

thanks @hverkuil for the detailed instructions!

@wt
Copy link
Contributor

wt commented Mar 2, 2021

@umlaeute I've asked for some help on the linux-media list. A dev there asked that I submit this for upstream inclusion. Would you be okay if I did that? I think it might be there best way going forward. I can get real feedback and land it in mainline.

@umlaeute
Copy link
Owner

umlaeute commented Mar 2, 2021

i'm totally for upstream inclusion.

however, the plan was to get the split-devices working first.

as i don't have much time these days, any help there would be highly appreciated.
(i'll promise to push my local changes today).

@wt
Copy link
Contributor

wt commented Mar 2, 2021

For my context, what is split-devices?

@wt
Copy link
Contributor

wt commented Mar 3, 2021

Okay, so here's my plan. I am going to bundle up the module for inclusion in the kernel and do what I can to sync the changes. I think that getting feedback from kernel devs is important here. I will do my best to sync changes by submitting PRs in this project for the time being. Do you have any major objections to that?

I would like to chat with you about the split-devices. I am not sure I understand what the benefit is. Using the same dev for capture and output seems to make sense to me. And unified device might even mesh really well with the mem2mem framework in the kernel, so I'd really like to understand why this is important.

@umlaeute
Copy link
Owner

ad split-devices:
as the numerous bug-reports have shown, there are clients out there that refuse to accept video-devices that expose both the CAPTURE and OUTPUT capability.
arguably this is a problem of those clients, but that does not help the users.
we have the exclusive_caps kludge to work around this issue, but

  • this is just ugly
  • and brings it's own problems (like: not being able to access the device as a capture-device until there's a consumer attached to it)

while i do like the elegance of a single merged-device node (that's why i would like to keep it if possible), but right now it seems that split-device just solves issues that people are having without introducing new kludges.

do you think that split devices would actually be a problem for mem2mem?

@hverkuil
Copy link
Contributor

hverkuil commented Mar 18, 2021 via email

@umlaeute
Copy link
Owner

thanks for clarifying this.

@jarkkojs
Copy link

jarkkojs commented Apr 4, 2023

I might be looking into deriving in-kernel driver patch set from this, as soon as I have bandwidth (within next few months).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

11 participants