-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Timestamp offset stability fix for muxed audiovideo mp4 #7436
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems better to include the trackId when assigning initPTS. The following issue has been resolved.
… inconsistent Fixes #7431
011e509
to
2934cf0
Compare
Here is the problem scenario along with key logs from version Problem Scenario:
Comparison Log:1.4.10
1.6.6
|
…back likely due to a gap
@brodiddev Thanks for the problem break down. I've identified a few points where logging or warning can be improved with 2934cf0
These changes also prevent part loading for falling back to fragment loading in these cases.
I'm not changing the "Starting new transmux session" log message. The only other available context that may be worth adding is the playlist time (so that you can see it going back from earlier messages). The time of the previous session is no longer available - you must read other log messages to gather where streaming was prior to the re-anchoring of the stream. Revised Problem Scenario:Part 0 and 1 of segment 348813 are successfully loaded. |
This PR will...
Fix resetting of initPTS when muxed audiovideo sample start times are inconsistent
Why is this Pull Request needed?
When the audio sample start time offsets from playlist times differ between segments or parts, this can cause small changes in initPTS. These changes may cause issues with appending and fragment/part finding.
trackId
is set in stream-controllerthis.initPTS[frag.cc]
so that the trackId is maintained between variant switches. This prevents initPTS track and timescale from changing on switch, especially if audio doesn't always start before video in segments or parts.initSegment
result remains consistent with initPTS unlessisInvalidInitPts
returns true. This prevents the stream-controller from resetting initPTS wheninitSegment.initPTS
changes slightly.baseOffsetSamples
are used to gatherinitPTS
andtimescale
.Are there any points in the code the reviewer needs to double check?
Verify past fixes are still valid:
tfdt
viapassthrough-remuxer
andmp4-tools
can cause audible artifacting. #7310Resolves issues:
Fixes #7431
Checklist