RTMP: Use extended timestamp as delta when chunk fmt=1/2. v6.0.167 v7.0.37#4356
RTMP: Use extended timestamp as delta when chunk fmt=1/2. v6.0.167 v7.0.37#4356winlinvip merged 5 commits intoossrs:developfrom
Conversation
|
|
|
From your utest, I understand that the problem is from the vague specification: For example, if we got too packets here: In the video_packet1, the extended timestamp
Unfortunately, SRS followed the 2019 version rtmp.part1.Chunk-Stream.pdf. In fact, RTMP v1 2012 version is quiet clear than 2009: I think it makes sense to consider I have also filed an issue at veovera/enhanced-rtmp#42
|
25dd340 to
2c16421
Compare
In the scenario of converting WebRTC to RTMP, this conversion will not proceed until an SenderReport is received; for reference, see: ossrs#2470. Thus, if HTTP-FLV streaming is attempted before the SR is received, the FLV Header will contain only audio, devoid of video content. This error can be resolved by disabling `guess_has_av` in the configuration file, since we can guarantee that both audio and video are present in the test cases. However, in the original regression tests, the `TestRtcPublish_HttpFlvPlay` test case contains a bug: https://github.com/ossrs/srs/blob/5a404c089baa93b906d2452ef47e2ba8a9e6211c/trunk/3rdparty/srs-bench/srs/rtc_test.go#L2421-L2424 The test would pass when `hasAudio` is true and `hasVideo` is false, which is actually incorrect. Therefore, it has been revised so that the test now only passes if both values are true. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: winlin <winlinvip@gmail.com>
…4356) 1. When the chunk message header employs type 1 and type 2, the extended timestamp denotes the time delta. 2. When the DTS (Decoding Time Stamp) experiences a jump and exceeds 16777215, there can be errors in DTS calculation, and if the audio and video delta differs, it may result in audio-video synchronization issues. --------- `TRANS_BY_GPT4` --------- Co-authored-by: 彭治湘 <zuolengchan@douyu.tv> Co-authored-by: Haibo Chen(陈海博) <495810242@qq.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: winlin <winlinvip@gmail.com>
….0.37 (#4356) 1. When the chunk message header employs type 1 and type 2, the extended timestamp denotes the time delta. 2. When the DTS (Decoding Time Stamp) experiences a jump and exceeds 16777215, there can be errors in DTS calculation, and if the audio and video delta differs, it may result in audio-video synchronization issues. --------- `TRANS_BY_GPT4` --------- Co-authored-by: 彭治湘 <zuolengchan@douyu.tv> Co-authored-by: Haibo Chen(陈海博) <495810242@qq.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: winlin <winlinvip@gmail.com>
TRANS_BY_GPT4