Opened 6 years ago

Last modified 6 years ago

#1731 new defect

libavformat muxers destroy initial timestamp offsets

Reported by: saste Owned by:
Priority: normal Component: avformat
Version: unspecified Keywords: muxer timestamp flv avi
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by saste)

Many muxers in libavformat (tested: avi, flv) destory the initial offset.
This is meant as a feature, but has the effect that remuxing a file will destroy the original timestamp information. This is especially annoying in case streams from different sources need to be synched.

How to reproduce:

ffmpeg -f lavfi -i "aevalsrc=sin(2*PI*400*t)::d=5,asetpts=PTS+10/TB" -y out.flv

then check the packet timestamps with ffprobe -show_packets out.flv.

A possible workaround:

ffmpeg -f lavfi -i "aevalsrc=sin(2*PI*400*t)::d=5,asetpts=PTS+10/TB,aresample=min_comp=0.001:min_hard_comp=0.0010" -y out.flv

(with video the problem can't be easily worked around).

The behavior with respect to the initial offset could be made configurable through some options.

Change History (1)

comment:1 Changed 6 years ago by saste

  • Description modified (diff)
Note: See TracTickets for help on using tickets.