-
Notifications
You must be signed in to change notification settings - Fork 517
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
Shaka packager doesn't handle non-interleaved multi track fragmented MP4 files correctly. #1213
Comments
Shaka assumes that every moof contains all tracks. If the tracks were non interleaved then each moof would only contain a single track and the code would mix up the tiemstamps of the tracks together (treat last audio dts as next video dts and vice versa) |
ffmpeg -i test.mp4 -c copy -movflags cmaf+separate_moof+delay_moov+skip_trailer dashmp4 ffmpeg -i test.mp4 -c copy -f ismv smooth.mp4 |
@joeyparrish Found the issue and have the fix but wanted to confirm something. |
Looks like I can't always expect Init() to be called before Init(moof). There is code explicitly to ignore the second moov if it is already parsed and Init() wont be called causing the Flush() test to crash. So to be safe do not assume Init() would be called but instead handle this in Init(moof) |
Do not assume that each fragment contains all tracks. Use track id instead of index to pick the correct timestamp. Fixes #1213
System info
Operating System: Any
Shaka Packager Version:
Issue and steps to reproduce the problem
v2.6.1-634af65-release
Packager Command:
ffmpeg -i test.mp4 -c copy test.ismv // convert mp4 to fragmented mp4
packager "in=test.ismv,stream=audio,out=audio.mp4" "in=test.ismv,stream=video,out=video.mp4" --mpd_output a.mpd
Extra steps to reproduce the problem?
(1)
convert MP4 to fragmented MP4 (alternate audio/video tracks)
ffmpeg -i test.mp4 -c copy test.ismv // convert mp4 to fragmented mp4
(2)
packager "in=test.ismv,stream=audio,out=audio.mp4" "in=test.ismv,stream=video,out=video.mp4" --mpd_output a.mpd
What is the expected result?
the packager succeeds.
What happens instead?
A ton of warnings about timestamps gaps/overlaps and the playback doesn't work.
The issue is that shaka mixes the timestamps of audio and video together due to bug in the TrackRunIterator.
The text was updated successfully, but these errors were encountered: