-
-
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
WebRTC: Solving the audio explosion issue in RTMP to RTC. #2011
Conversation
Decoded audio frame is planar format, the linesize is larger than the size of usable data. In old code, the second channel data is lost and filled by noise. Why copy frame sample by sample? :-(
Codecov Report
@@ Coverage Diff @@
## 4.0release #2011 +/- ##
===========================================
Coverage 57.17% 57.17%
===========================================
Files 125 125
Lines 52707 52707
===========================================
+ Hits 30134 30135 +1
+ Misses 22573 22572 -1
Continue to review full report at Codecov.
|
old code only support mono audio? |
No, the incoming audio is stereo. It's a very common case, you can reproduce this issue easily. Use OBSStudio to publish stream to SRS, and use WebRTC to play. (gdb) p *frame_ The size of first plane is 8192, but only has 1024 samples, that is 10244(FLTP) = 4096 bytes in total. Since decoded audio frame is planar format, the linesize is greater than the size of useful data. In old code, the second channel data is lost and filled by another half useless data in first plane (that's noise). @winlinvip Please have a look and merge this PR, thanks! |
Thank you very much, we have already reviewed this PR and there is indeed this issue. I will look into merging it as soon as possible.
|
Okay, thank you! Also, you mentioned there is a discussion group for GB28181. How can I join it?
|
See also #2172 |
For #2106 |
WebRTC: Solving the audio explosion issue in RTMP to RTC.
TRANS_BY_GPT3