ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.69k stars 5.38k forks source link

GB28181 push streaming, RTC playback, support for G.711 audio #2072

Closed nonecolor closed 3 years ago

nonecolor commented 3 years ago

The configuration file has indicated RTC playback for GB28181 streaming. Currently, only audio encoding in AAC format is supported. However, in reality, the default audio encoding for Dahua cameras' streaming is G.711, even if the camera is configured with AAC. This means that the current RTC playback only has video without sound. I would like to know if there are any plans to add support for other audio encodings besides AAC in the near future.

TRANS_BY_GPT3

albyho commented 3 years ago

https://github.com/ossrs/srs/blob/18ae8d85712112a1083f69354a8b212f74ac5d22/trunk/src/app/srs_app_gb28181.cpp#L1130

https://github.com/ossrs/srs/blob/18ae8d85712112a1083f69354a8b212f74ac5d22/trunk/src/app/srs_app_gb28181.cpp#L1152

Not sure if this is the TODO.

TRANS_BY_GPT3

nonecolor commented 3 years ago

https://github.com/ossrs/srs/blob/18ae8d85712112a1083f69354a8b212f74ac5d22/trunk/src/app/srs_app_gb28181.cpp#L1130

https://github.com/ossrs/srs/blob/18ae8d85712112a1083f69354a8b212f74ac5d22/trunk/src/app/srs_app_gb28181.cpp#L1152

Not sure if this is the TODO.

Tested it out and confirmed that this is the TODO. However, there are currently some issues. The audio format of the camera is G711A. After pushing it to SRS, although there is sound when playing the RTMP stream with VLC, the audio quality is very poor. When using the RTMP player on the webpage, there is only sharp noise, and there is no sound at all when playing with WebRTC.

TRANS_BY_GPT3

albyho commented 3 years ago

https://github.com/ossrs/srs/blob/18ae8d85712112a1083f69354a8b212f74ac5d22/trunk/src/app/srs_app_gb28181.cpp#L1130

https://github.com/ossrs/srs/blob/18ae8d85712112a1083f69354a8b212f74ac5d22/trunk/src/app/srs_app_gb28181.cpp#L1152

Not sure if this is the TODO.

Tested it and confirmed that this is the TODO. However, there are still some issues. The audio format of the camera is G711A. After pushing it to SRS, although there is sound when playing the RTMP stream with VLC, the audio quality is very poor. When using the RTMP player on the web, there is only sharp noise, and there is no sound at all when using WebRTC.

Currently, SRS only supports AAC.

TRANS_BY_GPT3

winlinvip commented 3 years ago

Fixed, please use branch feature/g711

geiliwanghaichao commented 3 years ago

@nonecolor May I ask why I am unable to enable audio on the web interface of Dahua/Hikvision cameras, but when I play the m3u8 file using ffplay [ ] image ](url) I can see the audio information, how can I remove it? Thank you.

TRANS_BY_GPT3