droidcam
droidcam copied to clipboard
Support MJPG webcam output format
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?
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.
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.