droidcam icon indicating copy to clipboard operation
droidcam copied to clipboard

Support MJPG webcam output format

Open aleixpol opened this issue 4 years ago • 2 comments

I've been looking into droidcam and while it generally works, it also is quite underwhelming on its performance as a webcam.

I decided to look into what the code was doing and I've seen there's a good amount of code dedicated to turn YUV into JPEG as far as I understood. Would it be possible to delegate this to the consumer rather than to cram it here? I have the impression that GStreamer or VLC already will be doing the decoding step as it will be necessary for other v4l2 devices anyway.

Does that make sense to you?

aleixpol avatar Aug 09 '20 21:08 aleixpol

For testing I did compare using droidcam and accessing from OBS the URL http://127.0.0.1:4747/video?640x480 and the video is visibly less laggy.

aleixpol avatar Aug 09 '20 21:08 aleixpol

I think what you're saying is the webcam driver can support MJPEG format as output. This is something I've experimented with on Windows and yes, generally it works. Not all programs support it though.

The Linux client as-is works really fast, since there is no preview and no post-processing of the video. Not sure why you're experiencing lag.

aramg avatar Aug 09 '20 23:08 aramg