On 7/29/2021 2:58 PM, Michael Niedermayer wrote:
On Tue, Jul 27, 2021 at 10:08:20AM -0300, James Almer wrote:
Since we can't blindly trust the keyframe flag in packets and assume its
contents are a valid Sync Sample, do some basic bitstream parsing to build the
Sync Sample table in addition to a Random Access Recovery Point table.

Suggested-by: ffm...@fb.com
Signed-off-by: James Almer <jamr...@gmail.com>
---
  libavformat/movenc.c         | 125 +++++++++++++++++++++++++++++++++--
  libavformat/movenc.h         |   1 +
  tests/ref/lavf-fate/h264.mp4 |   6 +-
  3 files changed, 123 insertions(+), 9 deletions(-)

Will this allow a user to mark a subset of keyframes as random
access points ?
A user may want seeking to preferably happen to a scene start and not a
frame before

Will this allow a user to mark a damaged keyframe as such ?
A frame might in fact have been a keyframe and maybe the only in the file
but maybe was damaged so a parser might fail to detect it.

This code will ensure all packets with an IDR picture will be listed in the Sync Sample table, and all packets with a Recovery Point SEI message will be listed in the Random Access Recovery Point table. Whatever is signaled in packets (like the keyframe flag) is ignored to prevent creating non-spec compliant output.


Thanks

[...]


_______________________________________________
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".


_______________________________________________
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