[FFmpeg-devel] [PATCH 2/3 v2] avformat/mov: Populate packet duration using stts atom instead of guessing
James Almer
jamrial at gmail.com
Mon Nov 25 04:42:23 EET 2024
On 11/24/2024 10:57 PM, James Almer wrote:
> On 11/24/2024 10:46 PM, Michael Niedermayer wrote:
>> Hi
>>
>> On Thu, Nov 21, 2024 at 07:40:22PM -0300, James Almer wrote:
>>> From: Darren Mo <fumoboy007 at me.com>
>>>
>>> Fixes tickets #7855 and #11312.
>>>
>>> Signed-off-by: James Almer <jamrial at gmail.com>
>>> ---
>>> libavformat/isom.h | 3 +
>>> libavformat/mov.c | 181 ++++++++++++++++--
>>> tests/ref/fate/copy-trac236 | 4 +-
>>> tests/ref/fate/filter-fps | 1 +
>>> tests/ref/fate/filter-fps-cfr | 1 +
>>> tests/ref/fate/filter-meta-4560-rotate0 | 4 +-
>>> tests/ref/fate/gaplessenc-itunes-to-ipod-aac | 2 +-
>>> tests/ref/fate/matroska-dovi-write-config8 | 4 +-
>>> .../fate/matroska-non-rotation-displaymatrix | 6 +-
>>> tests/ref/fate/mov-aac-2048-priming | 2 +-
>>> tests/ref/fate/mov-zombie | 4 +-
>>> 11 files changed, 182 insertions(+), 30 deletions(-)
>>
>> this does strange things to duration:
>>
>> ./ffmpeg -i mm-short.mpg -y -bitexact -t 1 -acodec aac -frag_duration
>> 200k test2.mov
>> ./ffprobe -v 0 test2.mov -show_packets -print_format compact
>>
[...]
> Can't reproduce. With current master I get:
Actually, just noticed that the last packet duration is incorrect before
and after this patch, and looking at it made me find a mistake in the
commit.
Will send a patch fixing it, which will make the last packet report the
correct duration of 896, as coded in the output file (the commit as is
already fixed the reported duration of the first packet from 1024 to 3840).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241124/6f730449/attachment.sig>
More information about the ffmpeg-devel
mailing list