Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: ossrs/srs

Tags

v6.0-b2

Toggle v6.0-b2's commit message
Relase v6.0-b2, 6.0 beta2, v6.0.181, 170948 lines.

v6.0-b1

Toggle v6.0-b1's commit message
Remove windows/cygwin64 binary from release.

v6.0-b0

Toggle v6.0-b0's commit message
MP4 DVR: Fix audio/video synchronization issues in WebRTC recordings.…

… v6.0.172 (#4230)

Fixes #3993 - WebRTC streams recorded to MP4 via DVR exhibit audio/video
synchronization issues, with audio typically ahead of video. **Note:
This issue is specific to MP4 format; FLV recordings are not affected.**

When WebRTC streams are converted to RTMP and then muxed to MP4, the
audio and video tracks may start at different timestamps. The MP4 muxer
was not accounting for this timing offset between the first audio and
video samples in the STTS (Sample Time-to-Sample) table, causing the
tracks to be misaligned in the final MP4 file.

Introduces `SrsMp4DvrJitter` class specifically for MP4 audio/video
synchronization:

- **Timestamp Tracking**: Records the DTS of the first audio and video
samples
- **Offset Calculation**: Computes the timing difference between track
start times
- **MP4 STTS Correction**: Sets appropriate `sample_delta` values in the
MP4 STTS table to maintain proper A/V sync

- Added `SrsMp4DvrJitter` class in `srs_kernel_mp4.hpp/cpp`
- Integrated jitter correction into `SrsMp4SampleManager::write_track()`
for MP4 format only
- Added comprehensive unit tests covering various timing scenarios
- **Scope**: Changes are isolated to MP4 kernel code and do not affect
FLV processing

This fix ensures that MP4 DVR recordings from WebRTC streams maintain
proper audio/video synchronization regardless of the relative timing of
the first audio and video frames, while leaving FLV format processing
unchanged.

---------

Co-authored-by: Haibo Chen <[email protected]>
Co-authored-by: john <[email protected]>
Co-authored-by: winlin <[email protected]>
Co-authored-by: OSSRS-AI <[email protected]>

v6.0-a2

Toggle v6.0-a2's commit message
Upgrade actions worlflow image to Ubuntu 22.04

v6.0-a1

Toggle v6.0-a1's commit message
Release v6.0-a1, 6.0 alpha1, v6.0.155, 169636 lines.

v6.0-a0

Toggle v6.0-a0's commit message
Release v6.0-a0, 6.0 alpha0, v6.0.145, 169259 lines.

v6.0-d6

Toggle v6.0-d6's commit message
Release v6.0-d6, 6.0 dev6, v6.0.134, 168904 lines.

v6.0-d5

Toggle v6.0-d5's commit message
Release v5.0-r3 and v6.0-d5.

v5.0-r3

Toggle v5.0-r3's commit message
RTC: Support dropping h.264 SEI from NALUs. v5.0.213 (#4057)

try to fix #4052.

---------

Co-authored-by: winlin <[email protected]>

v5.0-r2

Toggle v5.0-r2's commit message
Release v5.0-r2, 5.0 release2, v5.0.210, 163515 lines.