[FFmpeg-trac] #11056(avformat:closed): Position of key frame incorrect
FFmpeg
trac at avcodec.org
Wed Jun 19 04:56:04 EEST 2024
#11056: Position of key frame incorrect
-------------------------------------+-------------------------------------
Reporter: David | Owner: (none)
Johansen |
Type: defect | Status: closed
Priority: normal | Component: avformat
Version: 6.1.1 | Resolution: invalid
Keywords: ffprobe pos | Blocked By:
mp4 |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by David Johansen):
Replying to [comment:6 Balling]:
> Use hex editor and find out what is the offset.
>
> Ib sill do not get why does this matter. What is your need to know the
perfect offset of last keyframe?
>
> Does it happen on other keyframes not in the end (on other files)?
Yes, I will find an example where it happens in the middle of the file
Replying to [comment:7 MasterQuestionable]:
> ͏ No wonder then...
> ͏ The MP4 format may be a bit more (or much more...) complicated than
that: mere concatenation may not properly present.
>
> ͏ In particular, it has the concepts similar to Matroska's Cluster.
I misrepresented what's being done slightly. These are fragmented mp4
files that are being made by the HLS muxer that I'm then combining into a
single file so they're simpler to store/serve, but I need to know the
location of the keyframes to be able to provide the necessary
`EXT-X-BYTERANGE` info
Replying to [comment:9 mkver]:
> There is 0x00015827 at offset 931036. This corresponds to a NAL unit
with size 88103 which fits nicely with the packet size 88107 as reported
by ffprobe. There is 0x0000047C at offset 930976. This is already invalid
with a NALU length size of two. With a NALU length size of three, this
would be a NALU with nal_unit_type 28 -- one of the unspecified ones. The
next NALU would then have a size of 0x340000, which is larger than the
whole file. With a nal unit length size of four, the next NALU has a
length of more than 2GiB.
>
> To sum it up, your offset 930976 (for which you provided no real
explanation) is just wrong.
Using the values that I provided for `EXT-X-BYTERANGE` it will playback in
Video.js and Safari, but using the values that `ffprobe` provides it
stops, so that's my current criteria for deciding if it's "correct"
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11056#comment:10>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list