iOS 5 supports fast forward and reverse playback. However, you don't need to produce special purpose content to support fast forward and reverse playback. All you need to do is specify where the I-frames are. I-frames, or intra-coded frames, are encoded video frames whose encoding is independent of any other frame. To specify where the I-frames are, iOS 5 introduces a new I-frame only playlist. The new EXT-X-I-FRAMES-ONLY tag indicates that each media segment in the playlist describes a single I-frame.
An I-frame only playlist is almost identical to a regular playlist. The only difference is that I-frame playlists don't have an intrinsic duration. Instead, they represent an instant in time. In an I-frame only playlist that uses the EXT-X-I-FRAMES-ONLY tag, the EXTINF tag refers to the "span" or duration of the I-frame. This is the time between the presentation time of the I-frame in the media segment and the presentation time of the next I-frame in the playlist (or the end of the presentation if it is the last I-frame in the playlist).
- I-frame playlists require protocol version 4 or greater. By default, Wowza Streaming Engine™ software uses protocol version 3. See How to change the EXT-X-VERSION for Apple HTTP Live Streaming to change the version.
- I-frame playlists only work with video on demand (VOD) content.
To enable I-frame playlists, add the following properties to the custom properties for your VOD application. See Configure properties for details about how to add custom properties to your application.
|/Root/Application/HTTPStreamer||cupertinoExtXVersion||Integer||4||Can be set from the HTTP Streamers Cupertino Settings section (default: 3).|
|/Root/Application/HTTPStreamer||cupertinoCreateKeyFrameOnlyPlaylist||Boolean||TRUE||Must be set as a Custom Property (default: FALSE).|
The cupertinoExtXVersion property must be set to a value of 4 or greater for I-frame playlists to work. Wowza Streaming Engine currently supports up to version 6.
The cupertinoCreateKeyFrameOnlyPlaylist property enables I-frame only playlists that the native players on Apple devices can use to perform faster seeks in video files. When enabled, the player will show a fast forward and a fast rewind button at the bottom of a fullscreen player. Clicking and holding down these buttons will use the I-frame only playlist to perform fast seeks in the video. Quickly clicking and releasing these buttons will skip to the beginning or end of the video.
If the I-frame only playlist functionality isn't working, the user will see the default buttons that allow skipping to the end or rewinding 30 seconds at a time.
The standard scrub bar at the top of the player doesn't use the I-frame only playlist, so seeking in the video by dragging the scrub bar pointer will still use the normal playlist. This allows you to drag the pointer to a specific point in the video.
The playlist will look something like this. Use curl or wget to inspect the playlist:
curl http://localhost:1935/vod/mp4:sample.mp4/playlist.m3u8 #EXTM3U #EXT-X-VERSION:4 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=572079,CODECS="avc1.42c01e, mp4a.40.2",RESOLUTION=424x240 chunklist_w1616510757.m3u8 #EXT-X-I-FRAME-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=215,CODECS="avc1.42c01e",URI="chunklist_w1616510757_ko.m3u8"
curl http://localhost:1935/vod/mp4:sample.mp4/chunklist_w1616510757_ko.m3u8 #EXTM3U #EXT-X-VERSION:4 #EXT-X-TARGETDURATION:6 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-I-FRAMES-ONLY #EXTINF:3.75, #EXT-X-BYTERANGE:999624@376 media_w1616510757_ko_0.ts #EXTINF:3.75, #EXT-X-BYTERANGE:999624@376 media_w1616510757_ko_1.ts #EXTINF:3.75, #EXT-X-BYTERANGE:999624@376 media_w1616510757_ko_2.ts #EXTINF:3.75, #EXT-X-BYTERANGE:999624@376 media_w1616510757_ko_3.ts . . .
<smil> <head> </head> <body> <switch> <video src="mp4:sample.mp4" width="320" height="240" video-bitrate="500000"> <param name="videoCodecId" value="avc1.66.30" valuetype="data"/> <param name="audioCodecId" value="mp4a.40.2" valuetype="data"/> </video> <video src="mp4:sample.mp4" video-bitrate="5000"> <param name="videoCodecId" value="avc1.66.30" valuetype="data"/> <param name="keyFrameOnly" value="TRUE" valuetype="data"/> </video> </switch> </body> </smil>
Originally Published: 06-19-2014.
Updated: For Wowza Streaming Engine 4.0.6 on 08-11-2014.
If you're having problems or want to discuss this article, post in our forum.