Page MenuHome

Fix T91005: Autosplit produces unusable files
ClosedPublic

Authored by Richard Antalik (ISS) on Nov 19 2021, 5:08 AM.

Details

Summary

Audio PTS was reset for each new file. This caused misalignment of video
and audio streams. In Blender, these files can't be loaded, other
players will fail to align audio and video.

Since timestamps are reset intentionally, reset also video stream
timestamps.

There were other bugs:
After timestamp was reset for audio, write_audio_frames started
encoding from timeline start until target frame, so each split video
had more audio than it should.

Also audio for last frame before splitting was written into new file.

Diff Detail

Repository
rB Blender
Branch
D13280_2 (branched from master)
Build Status
Buildable 19025
Build 19025: arc lint + arc unit

Event Timeline

Richard Antalik (ISS) requested review of this revision.Nov 19 2021, 5:08 AM
Richard Antalik (ISS) created this revision.
Richard Antalik (ISS) edited the summary of this revision. (Show Details)Nov 19 2021, 5:16 AM

So you are saying that this fix doesn't actually fix the problem?

From your image it seems like we still have synchronization issues

I'm confused because you are saying that the issue is fixed but it is not at the same time.

This fixes issue with completely unusable files, but it seems there are some synchronization issues still. I should have a look at your fixes of synchronization in more detail. At this point I am not even sure on which side this issue is.

This feature produces around 2GB files, so perhaps this fix could be applied anyway and we could handle sync issues separately? One frame gap would be much less noticable and I think there may be more than 1 issue causing this misalignment.

Make audio and video streams start at 0 PTS

Richard Antalik (ISS) edited the summary of this revision. (Show Details)Nov 29 2021, 10:37 AM

With this last update I get more reasonable output, as in streams are nicely aligned, but it is evident, that audio sometimes overshoots and sometimes undershoots. That is assuming that loading code works correctly, but I think it does for this case.

  • Revert change to FFMPEG_AUTOSPLIT_SIZE
This revision was not accepted when it landed; it landed in state Needs Review.Dec 14 2021, 1:31 AM
This revision was automatically updated to reflect the committed changes.