Closed pq53ui closed 8 months ago
Hi @pq53ui, are you able to view WebRTC stream with video-viewer / video-viewer.py first?
It looks like the mDNS hostname resolution is working for you, but have you also tried setting chrome://flags/#enable-webrtc-hide-local-ips-with-mdns
in your browser?
Thanks for the quick response.
I ran the video-viewer.py Same issue, I get the same gray screen as in the screenshot. I have tried enabling the chrome flag as well, no difference.
I am getting the same output as I have posted above
Maybe a few additional outputs
[webrtc] resolved 5ff934f4-6ebf-4a7c-984c-b4a83b1134df.local for 192.168.1.5 in incoming ICE message
[webrtc] candidate:2191427754 1 udp 2113937151 192.168.1.5 57232 typ host generation 0 ufrag l8h+ network-cost 999
[webrtc] websocket /output -- recieved message from 192.168.1.5 (peer_id=0) (236 bytes)
[webrtc] received ICE message on /output from 192.168.1.5 (peer_id=0) with mline index 0; candidate:
candidate:2128326268 1 udp 2113939711 9aed251a-ffef-4d2c-a1bd-845889b8c5e0.local 54438 typ host generation 0 ufrag l8h+ network-cost 999
[gstreamer] gstEncoder -- pipeline full, skipping frame 25 (640x360, 345600 bytes)
video-viewer: captured 25 frames (640 x 360)
I assume this is due to not running it in --headless. If I run it in --headless, I don't get the pipeline full
warnings.
I have also seen
[network] getHostByName() trying to resolve host '9aed251a-ffef-4d2c-a1bd-845889b8c5e0.local' (retry 1 of 10)
this line a few times before. Trying to understand if that plays any role as well.
Its bugging me that it sometimes works under certain (unknown) conditions. But in most cases I can't get it to work.
I have also seen
[network] getHostByName() trying to resolve host '9aed251a-ffef-4d2c-a1bd-845889b8c5e0.local' (retry 1 of 10)
this line a few times before. Trying to understand if that plays any role as well.
Ok yea, that is the mDNS thing - if you disable that chrome flag and restart the browser, you shouldn't get that anymore
[gstreamer] gstEncoder -- pipeline full, skipping frame 25 (640x360, 345600 bytes)
Try commenting out this if block of code, and recompiling/reinstalling:
Sorry that WebRTC can be finicky sometimes with the connection/negotiation, and the gstreamer plugins for it aren't super robust
Disabling that chrome flag helped. I am able to see the stream and reconnect to it while the capture loop is going too!
Thank you!
I am mostly working in headless mode, so pipeline full
doesn't worry me too much right now. But it's good to know how to make it disappear.
And again, thanks for quick response.
I have also seen
[network] getHostByName() trying to resolve host '9aed251a-ffef-4d2c-a1bd-845889b8c5e0.local' (retry 1 of 10)
this line a few times before. Trying to understand if that plays any role as well.
Ok yea, that is the mDNS thing - if you disable that chrome flag and restart the browser, you shouldn't get that anymore
[gstreamer] gstEncoder -- pipeline full, skipping frame 25 (640x360, 345600 bytes)
Try commenting out this if block of code, and recompiling/reinstalling:
Sorry that WebRTC can be finicky sometimes with the connection/negotiation, and the gstreamer plugins for it aren't super robust
Thanks @dusty-nv Just by disabling the "Anonymize local IPs exposed by WebRTC" option in chrome://flags/, I got it resolved.
I haven't been able to find a similar issue to what I am experiencing.
Running either detectnet, segnet, or my custom script I am unable to reliably connect to the webrtc output in browser. I followed the tutorial and tried both the secure version with SSL keys and no keys.
When I run the script, while the models and streams are initializing I open the browser and access the output stream. Sometimes it is successful sometimes all I get is a gray screen with video trying to load.
So, it seems like there is some sweet spot while I can access the stream, but I have no idea when exactly that is. Sometime between initialization. While it is in the image capture loop, it is impossible to see any output.
** This is the output when I run the script and connect to the stream. I removed the [TRT] logs and others that have nothing to do with webrtc or gstreamer in my opinion. I don't know much about web related things, so any help would be much appreciated.