[FFmpeg-devel] [PATCH] avformat/segment.c: add experimental -segment_list_flags iframe
Michael Niedermayer
michaelni at gmx.at
Sat May 31 05:58:31 CEST 2014
On Wed, May 21, 2014 at 01:33:52AM -0700, Aman Gupta wrote:
> The HLS spec supports [I-FRAMES-ONLY playlists][1] where BYTERANGEs
> represent locations of keyframes inside mpegts segments. These are used
> by iOS devices to show previews when a user seeks around a stream.
>
> Apple's mediafilesegmenter can generate iframe.m3u8s alongside regular
> playlists with --iframe-index-file. The stream and iframe playlists
> share ts segments, with the iframe playlist pointing to the keyframes in
> the stream. This would be a useful feature for ffmpeg, but is not
> implemented by this patch.
>
> Instead, I added a new `-segment_list_flags iframe` mode where
> a dedicated playlist and segment is generated just for previewing.
> A single .ts file is sufficient (as the playlist uses byteoffsets), and
> it contains only keyframes (making it a fraction the size of the
> original stream).
>
> Here's how to generate iframe.m3u8 and iframe0.ts for an h264 input.
> Notice that I only map the video stream into the segmenter.
>
> ./ffmpeg -i input.mkv -map 0:0 -c:v copy -bsf:v h264_mp4toannexb \
> -f stream_segment -segment_format mpegts \
> -segment_list iframe.m3u8 -segment_list_flags iframe iframe%d.ts
why not use "-skip_frame nokey" if you want to create a file made
from the keyframes ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140531/5e642d6b/attachment.asc>
More information about the ffmpeg-devel
mailing list