0

How to offer multiple resolutions under device (v4l2loopback)? Idea is that depending on what would be requested as read of stream, different command would be run. Background is that v42loopback is fed by other stream and is to be used from browser level and browser dynamically changes resolution (Jitsi) or user would be the one selecting it.

Therefore preferably, if i.e. 1920x1080 is requested, v4l2loopback device is fed with such stream by the source and if other, then parameters are adjusted. At the same time request to v4l2loopback device (/dev/video42 or any number) could be 640x480 and there's no reason for to feed the loopback device with FHD at that time.

This might be more of RFE as might require some code changes. The resolution would have to be passed over and calling script with parameters. On the same tune, type of stream could be requested, i.e. h264, VP8, etc. and obviously it is impossible to feed multiple streams like this to loopback device in parallel.

Due to bandwidth/cpu power it is not possible to provide continuous feed with multiple resources, hence the need.

nohtyp
  • 19
  • 5

1 Answers1

1

speaking as v4l2loopback upstream: you can't.

what you can do is create multiple devices with different resolutions.

umläute
  • 28,885
  • 9
  • 68
  • 122
  • thank you (though a bit pity, as to feed multiple sources - that would be resources overkill. – nohtyp Nov 09 '20 at 01:35
  • Thanks, but it doesn't solve the underlying problem - software using the device changes resolution on the fly and as such using different dev for different resolution is a no go. – nohtyp Dec 20 '20 at 19:50
  • it's simply not possible. the problem being, that there is no interface in v4l2 to notify an application that the driver wants to change the resolution. in the case of `v4l2loopback` this means, that there's no way to notify the producer that the consumer wants to change the resolution. – umläute Dec 20 '20 at 19:54