Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
112.56k stars 10.77k forks source link

OBS-VirtualCam Feature like v4l2loopback #2446

Open sugoides opened 3 years ago

sugoides commented 3 years ago

Would obs-virtualcam feature like the v4l2loopback feature be possible?

sugoides commented 3 years ago

Also found this but the ref #662 is unavailable

ref #662

https://github.com/CatxFish/obs-virtual-cam

Originally posted by @rom1v in #776 (comment)

sugoides commented 3 years ago

@martinellimarco @rom1v

martinellimarco commented 3 years ago

AFAIK on windows there isn't something like v4l2loopback but I've not searched too much.

In practice you'll have to find a project that exposes both a virtual video input card and a virtual webcam. A DirectShow filter maybe?

Then it will be possible to patch scrcpy to write to the input card and use OBS to read from the virtual webcam.

martinellimarco commented 3 years ago

I'm not a windows user so take this with a grain of salt, all I'm writing is the result of a quick google search and it may be wrong.

Looking better into OBS Virtual Cam it seems it may be used as input and not only as output, but the project is archived now?

Anyway, the interface that is exposed is DirectShow so we need a way to write to that.

ffmpeg can read from but not write to DirectShow, see ffmpeg wiki.

That said we don't care that much about what ffmpeg can do. It would have been a good example on how to do this but that's it. The moment we have the frame I think we can write it to DirectShow directly. I'm not familiar with this though.

As I've mentioned I'm not a windows user and I don't have the time to setup an environment and work on this now. Maybe one day, but I make no promises.

sugoides commented 3 years ago

I'm not a windows user so take this with a grain of salt, all I'm writing is the result of a quick google search and it may be wrong.

Looking better into OBS Virtual Cam it seems it may be used as input and not only as output, but the project is archived now?

Anyway, the interface that is exposed is DirectShow so we need a way to write to that.

ffmpeg can read from but not write to DirectShow, see ffmpeg wiki.

That said we don't care that much about what ffmpeg can do. It would have been a good example on how to do this but that's it. The moment we have the frame I think we can write it to DirectShow directly. I'm not familiar with this though.

As I've mentioned I'm not a windows user and I don't have the time to setup an environment and work on this now. Maybe one day, but I make no promises.

Okay sir, no promises. But still hoping for this

sugoides commented 3 years ago

Hello sir @martinellimarco any update on this sir?