A/V desync when transcoding A/V files with timestamps non starting from 0 with -copyts
|Reported by:||Stefano Sabatini||Owned by:|
|Blocking:||Reproduced by developer:||yes|
|Analyzed by developer:||no|
Using the command:
ffmpeg -vsync 0 -copyts -i columbia-intro.ts -acodec libfaac -y columbia-intro.out.ts
(same without -vsync) the A/V streams in the output file result desynched, and will result in the video being unplayable. This seems due to the first audio packet timestamp information not being correctly propagated to the encoder (and to the muxer), and being set to 0, so that ffmpeg will fill the first part of the file with audio packets, and the probe will fail since ffmpeg can't detect video frames in the probed initial part of the file.
Same result in case I use the -copyts with no -vsync. If the output file only contains video (e.g. if the -an switch is used) the output file seems to be correctly generated (playable and with correct timestamp information).
I'm attaching a sample file and log obtained by adding debugging print in ffmpeg.c.
Change History (17)
comment:9 by , 10 years ago
|Status:||closed → reopened|