On Mon, 16 Dec 2019, Michael Niedermayer wrote:

On Mon, Dec 16, 2019 at 12:16:14AM +0200, Martin Storsjö wrote:
Keep all the existing data fields as they are (there's lots and
lots of nontrivial calculation and heuristics based on them in
their current form), but derive the duration as the difference
between the pts of the first packet to the maximum pts+duration
(not necessarily the last packet); use this duration in any box
where the actual presentation duration is supposed to be.

Fixes: 8420
---
 libavformat/movenc.c | 21 ++++++++++++++++-----
 tests/ref/lavf/mov   |  4 ++--
 tests/ref/lavf/mp4   |  4 ++--
 3 files changed, 20 insertions(+), 9 deletions(-)

This seems to loose duration for this: (not sure which way is more correct)

./ffmpeg -i ~/tickets/2892/MPEG_tbn_test.mov  -c:v copy -c:a copy -vtag mx3n -timecode 
10:00:00:00 -vframes 3 x.mov && ./ffprobe -v x.mov -show_packets -print_format 
compact

Thanks for testing. Seems like there's a special case for how track_duration is updated for tmcd tracks, where it's updated based on another track; I'll update the patch to fetch the effective duration for that other track instead.

// Martin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to