FiveLeavesLeft / WyzeCameraLiveStream

Hack to allow live streaming from wyze cameras to vlc or mpv on your desktop.
MIT License
100 stars 7 forks source link

~1s steaming latency on V3+VLC #22

Closed tals closed 3 years ago

tals commented 3 years ago

Hey there, thank you for this wonderful work!

While testing this out with VLC, it appears to have about 1s latency from camera to VLC.

Do you happen to know the cause of this? The IMP_Encoder_GetStream -> crb_tcp_hook path seems reasonable to me and I don't see any buffers there (and it seems to run off the encoder thread?). I am suspicious that this is VLC buffering things too aggressively, as the app-based streaming seems faster.

noelhibbard commented 3 years ago

Hey there, thank you for this wonderful work!

While testing this out with VLC, it appears to have about 1s latency from camera to VLC.

Do you happen to know the cause of this?

The IMP_Encoder_GetStream -> crb_tcp_hook path seems reasonable to me and I don't see any buffers there (and it seems to run off the encoder thread?).

I am suspicious that this is VLC buffering things too aggressively, as the app-based streaming seems faster.

Yeah it's all in VLC.

tals commented 3 years ago

Yeah it's all in VLC.

haha awesome thanks!

FiveLeavesLeft commented 3 years ago

As you observed, there's no buffering in the server code. I don't know about buffering in or before IMP_Encoder_GetStream though. You might try other players and see if it's better or worse than VLC.