qctools icon indicating copy to clipboard operation
qctools copied to clipboard

align audio and video on the timeline according to frame:pkt_pts_time

Open metacynicv2 opened this issue 9 years ago • 5 comments

I dropped an MP4 into 0.7.2 and parts of the video are abruptly dropped from analyzation. After transcoding to MOV via ffmpeg, the video dropped in fine. I attached both files in a zip.

picture 2016-02-22 at 2 11 51 pm

Archive.zip

metacynicv2 avatar Feb 22 '16 22:02 metacynicv2

This is because of the way it is edited, but yes it's not plotted quite right. The video contains a 0.6006 second presentation, but the video track includes -1.634968 seconds before the presentation starts. The first I-frame is at the -1.634968 second point on the timeline, so the first -1.634968 should play but needs to be present so that the B frame at the start of the presentation can present correctly. When you transcode to mov, the pre-0 part of the timeline is not used in the transcoding so it resolve the issue.

The file doesn't contain the before-0 audio, but only audio that aligns with 1.62406-2.22778 seconds of video, so the audio track is far shorter than the video.

IMO the timeline should look like: Video on a timeline of -1.634968-0.567234 seconds Audio on a timeline of -0.010917-0.589083 seconds

dericed avatar Feb 23 '16 03:02 dericed

example of the ffprobe doc for the mp4 sample file https://gist.github.com/dericed/488594bbcff528d409b3

dericed avatar Feb 23 '16 03:02 dericed

I suspect this is related to https://github.com/bavc/qctools/issues/79

dericed avatar Feb 24 '16 03:02 dericed

Yeah, that file is my negative duration bug-catching file.

metacynicv2 avatar Feb 25 '16 18:02 metacynicv2

@ElderOrb, samples in https://github.com/bavc/qctools/files/141513/Archive.zip

dericed avatar Jan 21 '17 14:01 dericed