anthwlock / untrunc

Restore a truncated mp4/mov. Improved version of ponchio/untrunc
GNU General Public License v2.0
2.08k stars 199 forks source link

Stuttery video in QuickTime Player #59

Closed cbenhagen closed 4 years ago

cbenhagen commented 4 years ago

I get a stuttery result when playing back in QuickTime Player. It looks like a key frame keeps getting repeated in between regular frames. Playing back in ffplay and VLC works normally. ffmpeg -c copy does not help.

Here is a sample: https://we.tl/t-hsqhlZeGYs

Hopefully the stuttery repaired version can be used to provide a working moov for testing? I currently don't have access to a better sample.

Maybe related to #56

anthwlock commented 4 years ago

Does the QuickTime Player output any logs? How often does it occur? When does it occur in the sample you provided?

Do you have access to a macOS machine? Maybe I can provide a screen recording.

I don't, but QuickTime is available for win7 too, isn't it? A screen recording would surely be useful.

Unfortunately I can't provide a bigger sample as it is not my footage.

What about a working reference file?

cbenhagen commented 4 years ago

@anthwlock this shows another repaired example and a rendering from quicktime which should show what happens in any other player as well: https://we.tl/t-AXLNUOJMDA

I will send you a working reference file by email.

cbenhagen commented 4 years ago

@sentience does this example look similar to yours from #56? (The link has expired)

sentience commented 4 years ago

@cbenhagen Yes, that looks similar, if not identical to the results I was getting with my broken video.

anthwlock commented 4 years ago

I think the stuttering is caused by the removal of the ctts atom. Please try the restore_ctts branch.

In case of @cbenhagen's files the ctts values can be guessed easily. In @sentience's files they are more complicated.. see untrunc -d, last column.

But I don't think that this is the cause for out-of-sync audio/video (mentioned in #56), since the composition time offsets don't accumulate. Compare stts and ctts.

cbenhagen commented 4 years ago

@anthwlock thanks, the results from the restore_ctts branch work as expected in the QuickTime player.

denis-sumin commented 3 years ago

Hi! Want to reopen this issue. I have a fix result which plays well in VLC and stops for a frame every ~2.7 seconds in QuickTime and other players in macOS (Preview, Elmedia). Even a recoding with FFmpeg somehow doesn't solve the issue.

Here are one could download my samples: https://yadi.sk/d/tmFwogwpEKiq1g?w=1 Files:

Tried two commits: 8024f0c (current master) and bab18ae (branch restore_ctts), the results look the same. Did the repairs in Docker with FFmpeg 3.3.9 under macOS.

anthwlock commented 3 years ago

I have a fix result which plays well in VLC and stops for a frame every ~2.7 seconds in QuickTime and other players in macOS

Are you sure these stops are not present when using the VLC Player? Because I also get them with VLC. It also looks like your files dont contain the ctts atom, so I think it would be better to open a new issue (instead of reopening). If you do, please provide a longer healthy reference file. It would be interesting to know if good.mp4_fixed.mp4 (the file produced by untrunc good.mp4 good.mp4) also has these stops.