[FFmpeg-devel] [PATCH] lavf/segment: add reset_timestamps option

Stefano Sabatini stefasab at gmail.com
Sun Dec 9 12:22:43 CET 2012

On date Thursday 2012-11-29 13:46:53 +0100, Stefano Sabatini encoded:
> The new options reset the timestamps at each new segment, so that the
> generated segments will have timestamps starting from 0.
> It is meant to address trac ticket #1425.
> ---
>  doc/muxers.texi       |    7 +++++++
>  libavformat/segment.c |   56 +++++++++++++++++++++++++++++++++++++++++++++++--
>  2 files changed, 61 insertions(+), 2 deletions(-)

Simplified and updated, this should avoid potential desynching
problems, since there is only a single time for each stream, which is
used to recompute timestamps for each stream.

A note about the interface: right now we have the boolean options:

Would it make sense to set the flag in a segment_flags option,
something like:

-segment_flags +reset_timestamps+individual_header_trailer+write_header_trailer

rather than:
-reset_timestamps 1 -individual_header_trailer 1 -write_header_trailer 1

The former has also the advantage that it avoids potential conflicts
if an option with the same name is added to the global format context.

Also I bet we could find better names for:

for example:

I'll push it in a few days if I receive no replies.
FFmpeg = Frenzy & Formidable Minimal Purposeless Emblematic Game
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavf-segment-add-reset_timestamps-option.patch
Type: text/x-diff
Size: 5005 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121209/da9ba687/attachment.bin>

More information about the ffmpeg-devel mailing list