[janus-pp-rec] Drop audio RTP silence suppression packets. #2467
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims at detecting RTP silence suppression
(aka Discontinuous Transmission DTX)packets injanus-pp-rec
and dropping them in order to avoid huge files being generated like described in #2328.Quoting RFC 3389The added check basically looks for audio packets with marker bit=1, close enough (in range of 100) to the highest sequence number received. If that packet RTP timestamp is very different (> 10x) from the expected one, we simply drop that packet.
A new CLI option has been added (
--silence-distance
) to control the range of packets for which the silence suppression detection acts (default is 100, while 0 means disabled).Tested against a recording with a couple of silence-suppression packets and it seems to work.
Fixes #2414.
2021 UPDATE : this is NOT RTP DTX, it is just a custom SIP mechanism for silence suppression.