Skip to content

AVcut audio sync lost on 1080i cuts #19

Open
@pcrow

Description

@pcrow

I'm working with a video file recorded using a HDPrime from a cable channel in the US. The channel is being sent using H.264 in 1080i, and is a MPEG transport stream file (.ts). The video frame rate is 29.97. I can use ffmpeg to copy it into a .mp4 container, or just run with the original .ts file (though adjusting the cut timestamps since it doesn't start at zero). Either way I get the same results: The cut file's audio track falls behind significantly; several seconds or more.

I note that the output file says the frame rate is 59.94 when playing it in mplayer, and I see a reference to 28.11 fps, which makes no sense.

ffmpeg -i [file]

Input .ts file:
Program 1
Stream #0:0[0x1dc5]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:10x1dc6: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s

Output file:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 3092 kb/s, 28.11 fps, 59.94 tbr, 90k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Side data:
audio service type: main

I'm hoping to get this working with MythTV for clipping recordings. I'm testing with an exported cutlist, and the first cut seems to be correct (I'm clipping the start of the file), but later ones are off. I suspect the problem with the sound sync is related, so once that's fixed, I'll move on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions