#11194: image2 frame_pts integer overflow
-------------------------------------+-------------------------------------
Reporter: Filip | Type: defect
Status: new | Priority: normal
Component: avformat | Version: git-
Keywords: image2 | master
frame_pts | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
**Summary of the bug:**
The image2 muxer has a frame_pts option, which forwards the pts of every
frame into the filename. When using microsecond precision (which is the
default setting of the drawtext video filter pts template for comparison),
the numbers in the filenames of the output images overflow when the
timestamps go beyond 35m47s.
These calculated pts numbers are being coerced into a signed int32
variable, used for sequence numbers when frame_pts is off, before being
converted into text for the filename. Solutions would be to expand this
variable to int64 or to reroute frame_pts to calculate the pts values as
doubles and then printf them with a float format.
**How to reproduce:**
Substitute video.mp4 for any video longer than 35m48s.
{{{
% ffmpeg -ss 35:47 -t 1 -i video.mp4 -copyts -fps_mode passthrough
-enc_time_base 0.000001 -frame_pts 1 %08d.png
}}}
Reproduced on build 2024-09-16-git-76ff97cef5-essentials_build-
www.gyan.dev
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11194>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".