RTSPtoWeb icon indicating copy to clipboard operation
RTSPtoWeb copied to clipboard

Audio working in demo site but not in endpoint

Open reaganch opened this issue 2 years ago • 3 comments

I've set my Hikvision camera to stream audio using G.711ulaw encoding.

When I view the WebRTC stream on localhost:8083, I can hear audio perfectly.

When I place the WebRTC endpoint on my website following the example in docs/examples/webrtc, however, it appears the audio track is absent, and I cannot unmute the video.

Could you please help me understand how the example in docs/examples/webrtc is different from what is implemented on localhost:8083, and if I can enable audio on the WebRTC endpoint?

Happy to provide any logs you need.

Thanks!

reaganch avatar Jul 20 '23 01:07 reaganch

Just conducted another test and I observe the same behaviour using G.711alaw encoding as well. Any advice would be much appreciated. As mentioned, would be happy to provide any logs you may need to assist with this. Please just let me know which logs you would need. Thanks!

reaganch avatar Jul 25 '23 02:07 reaganch

For what it's worth, have been tinkering around a bit, and I found that changing the word 'video' to 'audio' in the line 14 of the file docs/examples/webrtc/main.js, which currently reads webrtc.addTransceiver('video', { direction: 'sendrecv' }) gets audio working, but I lose my video. I feel like I'm close to the answer, but am stumped.

reaganch avatar Aug 03 '23 00:08 reaganch

Has there been any updates on this? Having the same issue and tried what you did with webrtc.addTranceiver and had the same result, with audio now working but no video.

@deepch

rj-indro avatar Jun 05 '24 18:06 rj-indro