Smooth Streaming for iPhone
Dependencies
Make sure you have both the webserver module and mp4split commandline tool.
Configuration
No extra configuration is needed.
Encoding
Recommended settings for iPhone:
- Baseline profile (no cabac, no bframes) @ Level 3.0.
- 400 x 224 resolution.
X264 options:
--min-keyint 60 --keyint 100 --bframes 0 --ref 1 --no-cabac --partitions p8x8+b8x8+i4x4 --no-8x8dct
Create the fragmented MP4 files
./mp4split -o iphone-250k.ismv iphone-250k.mp4 ./mp4split -o iphone-366k.ismv iphone-366k.mp4 ./mp4split -o iphone-472k.ismv iphone-472k.mp4
Make sure that one MP4 file contains an audio track.
Generating the M3U8 playlists
Generate the master and sub playlists:
./mp4split -o iphone.m3u8 iphone-250k.ismv iphone-366k.ismv iphone-472k.ismv
Playback
Deploy the files to your webserver (/var/www/iphone.ssm/) and point your iPhone browser to: ' http://localhost:80/iphone.ssm/iphone.m3u8'.
Helpful snippets
To create a complete stream from a .m3u8 file you can use the following command:
wget --no-verbose --base=http://localhost:80/iphone.ssm/ -i iphone-472k.m3u8 -O iphone-472k.ts
make sure to delete all the lines in the .m3u8 file that start with a '#' character first.
Feedback
If you have any questions, thoughts or ideas on Smooth Streaming you can leave a message on our forum.
