Opened 6 years ago

Closed 6 years ago

#7299 closed defect (worksforme)

Seeking mp4 makes audio/video out of sync

Reported by: hadmut Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hi,

I'm trying to cut parts from a video with ffmpeg 2.4.2 (ubuntu 18.04) and get videos where audio and video are in most cases out of sync, although there are cases, where they are still in sync.

E.g. the video

taken from
https://download.media.tagesschau.de/video/2018/0701/TV-20180701-2348-2001.websm.h264.mp4

ffmpeg -loglevel warning -ss "00:22:39.000" -i TV-20180701-2348-2001.websm.h264.mp4 -t "00:00:06.010" -map 0 -c copy g1.mp4
ffmpeg -loglevel warning -ss "00:22:40.000" -i TV-20180701-2348-2001.websm.h264.mp4 -t "00:00:05.010" -map 0 -c copy g2.mp4
ffmpeg -loglevel warning -ss "00:22:39.500" -i TV-20180701-2348-2001.websm.h264.mp4 -t "00:00:05.710" -map 0 -c copy g3.mp4

only g1.mp4 is in sync. Seems as if this accidently hit the beginning of a frame group.

Change History (2)

comment:1 by hadmut, 6 years ago

Seems to be the video copy compression.

replacing the -c copy with -c:a copy or removing all -c options keeps the video in sync.

Using just -c:v copy shows videos out of sync.

Two of the videos I have trouble with:

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100

Duration: 00:31:52.62, start: 0.000000, bitrate: 3179 kb/s

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2981 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
Metadata:

handler_name : VideoHandler

Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
Metadata:

handler_name : SoundHandler

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.3.100

Duration: 00:31:52.60, start: 0.000000, bitrate: 318 kb/s

Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 249 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:

handler_name : VideoHandler
timecode : 23:02:06:23

Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s (default)
Metadata:

handler_name : SoundHandler

Stream #0:2(eng): Data: none (tmcd / 0x64636D74)
Metadata:

handler_name : TimeCodeHandler
timecode : 23:02:06:23

comment:2 by Carl Eugen Hoyos, 6 years ago

Resolution: worksforme
Status: newclosed
Version: 3.4unspecified

Please understand that only current FFmpeg git head is supported on this bug tracker.
In any case, I cannot reproduce A/V desync for the given sample and command line.

Note: See TracTickets for help on using tickets.