Closed zhang7249 closed 2 years ago
For the config srs.conf
only enable live streaming and WebRTC, but doesn't enable the convert RTMP to WebRTC, vice versa. It's because the convert consumes lots of CPU, about 2% CPU for each stream, RTMP(aac) to WebRTC(opus), or WebRTC(opus) to RTMP(aac).
Please use config rtmp2rtc.conf
, if convert RTMP to WebRTC, see Wiki: RTMP to RTC
Please use config rtc2rtmp.conf
, if convert WebRTC to RTMP, see Wiki: RTC to RTC
For example:
./objs/srs -c rtmp2rtc.conf
Different configuration files must be used. Please refer to the content of the configuration for detailed differences. The main difference is that audio transcoding will not be automatically enabled due to high CPU consumption. Therefore, it must be explicitly enabled when converting between WebRTC and RTMP.
Please refer to the official website documentation for updated configuration information.
rtmp2rtc.conf
. Refer to the Wiki: RTMP to RTC for more information.rtc2rtmp.conf
. Refer to the Wiki: RTC to RTC for more information.For example:
./objs/srs -c rtmp2rtc.conf
For example, RTMP streaming and FLV playback do not automatically enable RTC transcoding. If enabled, it can only support around 100 streams, but if not enabled, it can support around 3000 streams. Of course, enabling transcoding will have a significant impact on performance.
RTC streaming and RTC playback are the same, they will not be transcoded to RTMP by default.
TRANS_BY_GPT3
So, have you solved your problem? I have also encountered such an issue.
TRANS_BY_GPT3
So, have you solved your problem? I have also encountered such an issue. Yes, I have solved it. The configuration file is not compatible between the new version and the old version. You just need to go and modify the "rtmp2rtc.conf" file under the "conf" directory. When starting, use the command "-c conf/rtmp2rtc.conf'".
TRANS_BY_GPT3
@xlzcjj So, have you solved your problem? I have also encountered such an issue.
It's resolved. The configuration files of the new version and the old version are not compatible. You can directly use the file "rtmp2rtc.conf" under the "conf" directory. When starting, use the command "-c conf/rtmp2rtc.conf".
TRANS_BY_GPT3
This problem is too common. We have optimized the error message. If the RTMP stream already exists but the rtmp2rtc
configuration is not enabled, playing WebRTC will result in a direct error.
RTC error code=5021 : Disabled rtmp_to_rtc of __defaultVhost__, see #2728
thread [35701][e7rc59t6]: do_serve_http() [src/app/srs_app_rtc_api.cpp:192][errno=35]
This allows errors to appear more quickly instead of having a black screen, as there are too many possibilities for a black screen. This obvious configuration issue should immediately result in an error to reduce troubleshooting time.
From a business logic perspective, if an RTMP stream has already been pushed, it is not possible to push another RTC stream with the same URL. Therefore, it must belong to the RTMP to RTC conversion scenario.
Note: RTC2RTMP does not perform this check because it is currently less commonly used.
Please refer to: https://github.com/ossrs/srs/commit/8bc2759c7e8eaaac95d6e5a5072a03b2378280c3
TRANS_BY_GPT3
Description
According to the official website documentation, I have installed SRS and used RTMP for streaming and WebRTC for playback. RTMP streaming is successful, and RTMP and FLV can be played back successfully. However, WebRTC cannot be played back. I have already modified the candidate to an external network address. Every time I click "Play Video", I get an error message saying "client disconnect peer. ret=1007"!
Previously, I followed the steps in the blog https://www.cnblogs.com/ziyue7575/p/13927894.html to install it four or five times without any issues. Please help me resolve this problem. Thank you.
the config for srs to delivery RTMP
@see https://github.com/ossrs/srs/wiki/v1_CN_SampleRTMP
@see full.conf for detail config.
listen 1935; max_connections 1000; srs_log_tank console; srs_log_file ./objs/srs.log; daemon off;
http_server { enabled on; listen 8080; dir ./objs/nginx/html; } http_api { enabled on; listen 1985; } stats { network 0; } rtc_server { enabled on;
Listen at udp://8000
} vhost defaultVhost {
}
vhost nosave {