[FFmpeg-devel] [PATCH] avformat/matroskaenc: Allow changing the time stamp precision via option

James Almer jamrial at gmail.com
Thu May 20 21:23:06 EEST 2021


On 5/20/2021 2:59 PM, Nicolas George wrote:
> Michael Fabian 'Xaymar' Dirks (12021-05-20):
>> The issue can't be fixed
> 
> Then you should not be hiding the warning. It means something.

It means that the container does not support values bigger than 
INT16_MAX for block timestamps (relative to the absolute timestamp of 
the start of the cluster), and it warns as such when it can't write one 
and needs to instead start a new cluster to write the current packet.
With a big timescale value like 1µs or 1ns, the muxer can't write the 
requested amount of blocks per cluster (5 seconds or 5mb by default), 
resulting in extreme cases like one block per cluster.

The default value for timescale should not trigger this code and warning 
when in combination with the default cluster size/duration values.
Making 1ns or 1µs the default timescale is definitely not a good idea in 
the current state of the Matroska spec.

> 
> I have yet to see a convincing explanation of a case where 1µs would not
> be enough, by the way. AFAICS, the issue is mostly people handling
> rounding incorrectly; changing the time base would not fix the code that
> does improper rounding, it will just let the rounding errors accumulate
> slower. Fix the code, and there will be no more rounding errors.
> 
> Please don't quote mailing-list footers.
> 
> Regards,
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 



More information about the ffmpeg-devel mailing list