-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTC2RTMP: No sound in the audio for the first six seconds #4076
Comments
When converting RTC to RTMP, there may be issues due to the differences in the two application scenarios. For RTC, this might not be an issue because video conferencing naturally includes a waiting period and a process to confirm whether the audio can be heard. For live streaming, it is generally not expected to see the content immediately after starting the stream, because live broadcasts typically begin ahead of time and include a confirmation that the live stream is functioning properly. I believe this is an area for improvement, but the benefits of optimization, which in this case are the actual user experience improvements, are not very significant.
|
It is indeed quite strange. Are there any temporary solutions? I have observed that with Tencent Cloud's audio module, the audio comes out very quickly. |
I tried assigning the latest avsync_time from the video to the audio's avsync_time, and found that the audio could come out with the picture. However, it seems to cause a potential desynchronization in the first few seconds, but it's somewhat better than having no audio at all. It appears there might also be an issue with pure audio. Can I directly assign a value to it?
|
The issue was eventually found here: the calculation of the audio rate has to wait until the second update_send_report_time call. As a temporary solution, I set the default value to 48. It will be corrected during the second update_send_report_time. |
same issue |
@xuxiaoshuo thank you so much, works! |
Describe the bug
When the rtc_to_rtmp feature is enabled, we push the stream via WebRTC and pull the stream via RTMP, but there is no sound in the audio for the first six seconds
Version
srs5.0
To Reproduce
Steps to reproduce the behavior:
1.From a computer, initiate a WebRTC stream.
2.On a mobile device, pull the stream via RTMP.
3.The video appears first, followed by the audio, which starts playing after a six-second delay.
Expected behavior
The video and audio should start simultaneously
Screenshots
None
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: