[FFmpeg-trac] #10465(avformat:new): The latest versions of ffmpeg (>=5.x) produces not playable on Apple devices .caf files
FFmpeg
trac at avcodec.org
Tue Oct 10 10:53:11 EEST 2023
#10465: The latest versions of ffmpeg (>=5.x) produces not playable on Apple
devices .caf files
-------------------------------------+-------------------------------------
Reporter: Sergey | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: opus caf | Blocked By:
ios macos |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Sergey):
I think I've found the reason. And it's very simple, even if audio stream
has constant `packet_size` for all containing packets, it's almost always
the last one is incomplete (i.e. less than `packet_size`) since there is
no enough audio data to fill it completely, and it leads to wrong
calculations. And it's possible using of `(caf->packets - 1)` in
`packet_size` calculations was try to fix it. But for complete fix it's
required to subtract duration of the last packet from full audio stream
duration.
Also, maybe, it worth put calculation of duration directly to `cafenc.c`
(if be more specific into `caf_write_packet` function) - it will give more
control over calculations.
Anyway, I'm going to prepare patch for this issue...
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10465#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list