[FFmpeg-devel] [PATCH] lavf/movenc: Replace dts by pts to calculate duration

manuelyuan manuelyuan at 163.com
Tue Dec 10 04:36:18 EET 2019


 I opened a ticket in https://trac.ffmpeg.org/ticket/8420
 my patch may be not absolutely right, but this problem should get your attention, thank you

At 2019-12-03 20:57:44, "Martin Storsjö" <martin at martin.st> wrote:
>On Thu, 28 Nov 2019, manuelyuan wrote:
>
>> There are many UGC videos with dynamic frame rates, which are represented by
>> PTS jumps. After transcoding with ffmpeg -vsync 0 or -vsync 2, the output
>> video duration becomes longer.
>
>Did you post any reproduction case of what, exactly (which field in which 
>box), you think is wrong?
>
>Right now, this patch, among other things, breaks the implied last 
>duration of the last packet in a fragment.
>
>This can be reproduced by with the lavf-movenc test, like this:
>$ make libavformat/tests/movenc
>$ libavformat/tests/movenc -w
>
>Then inspect vfr-noduration.mp4 (with a suitable tool, e.g. L-SMASH's 
>boxdumper). Previously, the last packet in each fragment got an 
>inferred/guessed duration (if the duration field of the AVFrame was zero) 
>based on earlier frame intervals, but with your patch it is zero.
>
>I'm fairly convinced that most of the changes in your patch shouldn't be 
>made, but to make the discussion proceed you need to _exactly_ specify 
>what you think is wrong, in a way that others can reproduce.
>
>// Martin
>
>_______________________________________________
>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