[FFmpeg-user] Can't write packet with unknown timestamp

Moritz Barsnick barsnick at gmx.net
Wed Feb 13 17:22:35 EET 2019

On Wed, Feb 13, 2019 at 09:07:35 -0500, Brian J. Murrell wrote:
> $ ffmpeg -f avi -i file:"/tmp/vid.avi" -sn -codec:v:0 copy -flags -global_header -fflags +genpts -vsync -1 -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 ac3 -ac 6 -ab 192000  -y "/tmp/vid.mkv"

"-fflags +genpts" is an input option, so it needs to go before the
corresponding "-i input". If you do that, you will still get the other
error (which is likely caused by your file, and perhaps has the same
cause as the missing timestamp):

> [ac3 @ 0x5590061fd340] frame sync error
> Error while decoding stream #0:1: Invalid data found when processing input

And by the way:

> ffmpeg version 4.0.3 Copyright (c) 2000-2018 the FFmpeg developers
>   built with gcc 8 (GCC)

And we recommend to try newest versions first before reporting issues
(git master HEAD preferred) - even though it didn't matter in this


More information about the ffmpeg-user mailing list