GNOME Bugzilla – Bug 740564
x264enc: Need to compensate the forward shift done while adressing negative DTS
Last modified: 2014-11-23 16:40:15 UTC
Right now we forward shift the DTS/PTS in present of negative DTS. This will result in video being slightly late. We need to compensate this. I think the way forward is by changing the segment accordingly.
I have just re-opened bug #731351 which introduce that. I think the issue here is more general than x264enc, and there's bug #740575 for that, so can we close this?
By opening this bug, and closing the other one, I was trying to split things up a little. Trying to fix the entire world of B-Frame all at once has been a failure. My general opinion is that if we can get 1 encoder to do things right, then we can start thinking of adding APIs forever. This bug was to split the issue. Before 731351, the DTS was basically being shift with different offset on different frame and often DTS would be bigger then PTS. Now the DTS/PTS offset is kept correctly, the offset does not change randomly. The issue is that DTS is made to fit the segment, which may cause a small AV desync. I think opening this bug was the right thing to do, as it's a different issue. If we can propose a fix in x264 and at least 1 of the muxers, I think we will be able to generalize. But before that, generalizing will result in more API errors.
It's not a "small AV desync", and it's a systematic problem. I re-opened the other one because I think this needs to be reverted. And IMHO we should not fiddle with this more in x264 until we have general agreement about the right solution forward.
Fine, your call. Note that reverting means that thing will fail rather then work with between 0 to 2 frames of de-synchronization. The patch was along the path of what is being proposed globally. My goal was to validate before generalizing.