iOS 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 and later use an I-frame only playlist. The 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 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™ media server software software uses protocol version 3. See Change the EXT-X-VERSION for HLS streaming from Wowza Streaming Engine to change the version.
- I-frame playlists only work with video on demand (VOD) content.
To enable I-frame playlists in Wowza Streaming Engine, 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.
Use curl or wget to inspect the playlist:
The playlist will look something like this:
In the chunklist, the list of media segments is slightly different from a normal media list where each segment is a single keyframe rather than a complete media segment with multiple keyframes.
Inspect the chunklist:
The chunklist looks something like this:
. . .
With adaptive-bitrate streaming, you can also add an I-frame only rendition to your SMIL file that will be used by the player for seeking. The I-frame rendition of your file has a keyFrameOnly parameter that must be set to TRUE.
<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>
This code will produce similar output to the original playlist.