Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I can only comment on pre-recorded video, not live streaming...</p> <blockquote> <p>Do I have to convert mp4 video to M8U8?</p> </blockquote> <p>I think you mean .m3u8. Basically, you need to take your .mp4 file and:</p> <ol> <li><p>Encode it to a friendly bitrate for mobile bandwidths. You can use Apple's Compressor* app for this, it has presets for HTTP Live Streaming. Pick something around 1000kbps if you're playing around.</p></li> <li><p>Slice it up the output using Apple's mediafilesegmenter. You'll end up with lots of small .ts files and a manifest (.m3u8) which lists them.</p></li> <li><p>Hit the .m3u8 file in your player (initWithContentURL...) and you're off.</p></li> <li><p>Repeat steps 1 and 2 above and specify differing bandwidths. We went for the presets in Compressor.</p></li> <li><p>You'll end up with different versions of your video, 1 for each bandwidth, use the variantplaylistcreator tool from Apple to create a master playlist file which will point your player to each bandwidth so it can switch automatically.</p></li> <li><p>Stick all your .ts files and .m3u8 files on the net and use the mediastreamvalidator tool to check your master playlist file is ok and points to each version correctly.</p></li> </ol> <p>Make sure a decent quality bitrate is first in the master playlist file as this is the version that's played first. We went for something around the 1000kbps mark.</p> <blockquote> <p>Do I have to use MPMoviePlayer?</p> </blockquote> <p>I can't comment on other libraries, we used MPMoviePlayer.</p> <blockquote> <p>Can I convert mp4 video to M8U8 format during run-time and how to implement live streaming</p> </blockquote> <p>You can for live streams but for pre-recorded video do it all before. Put all your files online, validate your playlist (.m3u8) and play your videos using the master .m3u8 file.</p> <blockquote> <p>Is there any example code available for HTTP live streaming?</p> </blockquote> <p>In our implementation the client in iOS does all the work (e.g. switching streams depending on the available bandwidth). As such you just need to make sure all your files are in the right place before hand.</p> <p>Compressor - <a href="http://www.apple.com/finalcutpro/compressor/" rel="nofollow noreferrer">http://www.apple.com/finalcutpro/compressor/</a> The mediafilesegmenter and mediastreamvalidator tools command lines tools available to download from the Apple developer network site.</p> <p>These articles have everything you need to know: <a href="https://developer.apple.com/library/ios/#documentation/networkinginternet/conceptual/streamingmediaguide/Introduction/Introduction.html" rel="nofollow noreferrer">https://developer.apple.com/library/ios/#documentation/networkinginternet/conceptual/streamingmediaguide/Introduction/Introduction.html</a> <a href="https://developer.apple.com/library/ios/#technotes/tn2288/_index.html#//apple_ref/doc/uid/DTS40012238" rel="nofollow noreferrer">https://developer.apple.com/library/ios/#technotes/tn2288/_index.html#//apple_ref/doc/uid/DTS40012238</a></p> <p>Open this up in Safari: <a href="https://developer.apple.com/resources/http-streaming/examples/advanced-stream.html" rel="nofollow noreferrer">https://developer.apple.com/resources/http-streaming/examples/advanced-stream.html</a> - Each 'Gear' is a different bitrate stream</p> <p>Crack open this .m3u8 file in a text editor for an example master playlist file: <a href="https://devimages.apple.com.edgekey.net/resources/http-streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8" rel="nofollow noreferrer">https://devimages.apple.com.edgekey.net/resources/http-streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8</a></p> <p>Hope that all makes sense :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload