mpromonet/webrtc-streamer

How to get audio

yikexiaoshu1 opened this issue · 2 comments

With this code, we like to get video & audio.But after trying, there is still no audio, the audio stream encoding is aac, what should we do?
webRtcServer.connect("rtsp://172.16.12.50:554/stream","rtsp://172.16.12.50:554/stream");

rtsp set audio G711_U

Hello @zhuya1996,

Audio codec support is verified at https://github.com/mpromonet/webrtc-streamer/blob/master/inc/liveaudiosource.h#L94. If it's not supported, you will encounter the error:

LiveAudioSource::onNewSession not support codec

as indicated at https://github.com/mpromonet/webrtc-streamer/blob/master/inc/liveaudiosource.h#L102.

Best Regards,
Michel.