描述(Description)
RTMP -> WebRTC transcoding provides low audio quality.
There is no option to change opus bitrate in rtmp_to_rtc function.
I provide 256kbps AAC audio via RTMP. Diffrence between RTMP and WebRTC is hearable.
- SRS版本(Version):
SRS/4.0.177(Leo) - Docker build
- SRS的配置如下(Config):
rtc_server {
enabled on;
listen 8000;
candidate $CANDIDATE;
}
vhost __defaultVhost__ {
rtc {
enabled on;
rtmp_to_rtc on;
rtc_to_rtmp off;
}
}
重现(Replay)
Open music RTMP Stream
Open music WebRTC Stream
Compare between RTMP and WebRTC streams
期望行为(Expect)
Option to change opus bitrate or best audio quality.
5条答案
按热度按时间tvmytwxo1#
Looks it's around 64kbps?
q9rjltbz2#
SRS transcode AAC to OPUS, which is low bitrate.
So the quality is not good enough? Please attach an example file?
hmtdttj43#
Opus can provide max bitrate ~450kbps.
We need at least 192kbps for music streams with Opus.
Audio quality is very poor with 64kbps.
Configuration should be able to change the bitrate depending on the application (voice / music)
Here you can setup bitrate of Opus transcoding - https://github.com/AirenSoft/OvenMediaEngine/blob/master/misc/conf_examples/Server.xml#L250
bihw5rsg4#
@winlinvip
I tested and can confirm that changing this parametres in trunk/src/app/srs_app_rtc_codec.cpp
Solves problem with bad audio.
Could you add this options to change in .conf file?
a0x5cqrl5#
@winlinvip I tested and can confirm that changing this parametres in trunk/src/app/srs_app_rtc_codec.cpp
Solves problem with bad audio. Could you add this options to change in .conf file?
Good idea, using config solve it.