avoid_negative_ts : what integer ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

avoid_negative_ts : what integer ?

sean darcy
 From https://ffmpeg.org/ffmpeg-all.html#Format-Options :

avoid_negative_ts integer (output)

     Possible values:

     ‘make_non_negative’

         Shift timestamps to make them non-negative. Also note that this
affects only leading negative timestamps, and not non-monotonic negative
timestamps.
     ‘make_zero’

         Shift timestamps so that the first timestamp is 0.
     ‘auto (default)’

         Enables shifting when required by the target format.
     ‘disabled’

         Disables shifting of timestamp.

So:
-avoid_negative_ts 1  means 'make_non_negative'


or

the option is
-avoid_negative_ts make_non_negative

??

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: avoid_negative_ts : what integer ?

Moritz Barsnick
On Fri, Sep 28, 2018 at 13:49:54 -0400, sean darcy wrote:
> So:
> -avoid_negative_ts 1  means 'make_non_negative'
> or the option is
> -avoid_negative_ts make_non_negative

A bit confusing indeed. The latter, using the named option, is
preferred. In this case, it does actually map to "1", so your former
command will also work.

$ ffmpeg -h full
lists the valid arguments, and the range they map to:

  -avoid_negative_ts <int>        E........ shift timestamps so they start at 0 (from -1 to 2) (default auto)
     auto                         E........ enabled when required by target format
     disabled                     E........ do not change timestamps
     make_non_negative              E........ shift timestamps so they are non negative
     make_zero                    E........ shift timestamps so they start at 0

So "auto" and "disabled" are not 2 and 3, as you could think from the
docs, but rather -1 and 0. That's why using the named arguments is
better.

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".