prev/next

HLS (Apple iOS)

HTTP Live Streaming (also known as HLS) is a video protocol developed by Apple as part of QuickTime X and iOS applications. It works by separating the overall stream (.m3u8) into a sequence of small 10-second segments (.ts), adapting to the available bandwidth as the video plays. HTTP Live Streaming is capable of traversing any firewall or proxy server that lets through standard HTTP traffic.

How can I encrypt my iPhone streams?

Securing your iPhone streams is easy with Encoding.com's stream encrytion option. We encrypt your TS segements using AES-128 with no need for an additional processing step. The encryption passes on delivery, as opposed to requiring additional processing time. You'll need a few things to get started, so let's lay out all the details:

1)  Create 32 character hexadecimal string.

 More -->

Securing your iPhone streams is easy with Encoding.com's stream encrytion option. We encrypt your TS segements using AES-128 with no need for an additional processing step. The encryption passes on delivery, as opposed to requiring additional processing time. You'll need a few things to get started, so let's lay out all the details:

1)  Create 32 character hexadecimal string. (Noted as 128 bit key below.)

     Sample encryption key: 243F6A8885A308D313198A2E03707344. Don't confuse this with API keys, as the encryption key can only contain characters A - F & 0- 9.

     Sample of encryption key that will fail immediately: COq8MA6wT3aHxEIvGy4U3VNBa3BMch29

OR

     Create a file that contains the hex string. If you choose a file, this will overrride the hex key specified in the request.

3) Request an HLS encode with the following additions:

<format>
    <!-- Format fields -->
        <output>[iphone_stream|ipad_stream]</output>
        ...
        <encryption>[yes|no]</encryption>
        <encryption_key>[128bit-key]</encryption_key>
        <encryption_key_file>[SourceURL]</encryption_key_file> <----Use a key_file or a string value. Don't use both, as the file will override the key. 
        ...
    </format>

 

###

Full XML:

<?xml version="1.0"?>
<query>
  <action>AddMedia</action>
  <userid>[userid]</userid>
  <userkey>[userkey]</userkey> 
  <source>[source]</source>
  <notify/>
   <format>
   <output>iphone_stream</output>
  <size>480x320</size>
   <bitrate>512k</bitrate>
<destination>[URL]</destination>
   <audio_bitrate>40k</audio_bitrate>
   <audio_sample_rate>44100</audio_sample_rate>
   <audio_channels_number>2</audio_channels_number>
   <keep_aspect_ratio>yes</keep_aspect_ratio>
   <video_codec>libx264</video_codec>
   <profile>iphone_stream</profile>
   <audio_codec>libfaac</audio_codec>
   <two_pass>no</two_pass>
   <turbo>no</turbo>
   <cbr>no</cbr>
   <deinterlacing>yes</deinterlacing>
   <keyframe>300</keyframe>
   <audio_volume>100</audio_volume>
   <rotate>0</rotate>
   <file_extension>tar</file_extension>
   <hint>no</hint>
   <bitrates>600k,400k,200k,110k</bitrates>
   <framerates>29.97,29.97,15,10</framerates>
   <keyframes>90,90,45,30</keyframes>
   <pack_files>no</pack_files>
   <segment_duration>10</segment_duration>
   <add_audio_only>no</add_audio_only>
   <still_image>no</still_image>
   <still_image_time>5</still_image_time>
   <still_image_size>480x320</still_image_size>
   <encryption>yes</encryption>
   <encryption_key>[128bit-key]</encryption_key>
   <encryption_key_file>[URL]</encryption_key_file>
   </format>
</query>

For additional information on encryption of iPhone streams: https://developer.apple.com/library/ios/#qa/qa1661/_index.html

<-- Hide
tools: email  |  print  |  share  |  click to rate (rated 1 time):
  • BlinkList
  • Del.icio.us
  • Digg
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Newsvine
  • Reddit
  • Sphinn
  • Technorati
  • Twitter

Can I rotate videos without encoding the audio and video?

Have a ton of videos that just require lossless rotation? Did someone have too much fun with the iPhone and shoot everything portrait instead of landscape?

Try this on for size. Lossless rotation for use with .mov --> .mov files only.

<format>
  <output>mov</output>
  <destination>[Destination]</destination>
  <rotate>0</rotate>
  <set_rotate>90</set_rotate>
  <video_codec>copy</video_codec>
  <audio_codec>copy</audio_codec>
</format>

Have a ton of videos that just require lossless rotation? Did someone have too much fun with the iPhone and shoot everything portrait instead of landscape?

Try this on for size. Lossless rotation for use with .mov --> .mov files only.

<format>
  <output>mov</output>
  <destination>[Destination]</destination>
  <rotate>0</rotate>
  <set_rotate>90</set_rotate>
  <video_codec>copy</video_codec>
  <audio_codec>copy</audio_codec>
</format>
<-- Hide
tools: email  |  print  |  share  |  click to rate (rated 3 times):
  • BlinkList
  • Del.icio.us
  • Digg
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Newsvine
  • Reddit
  • Sphinn
  • Technorati
  • Twitter

Easily Create iPhone Streaming Files with Encoding.com

If you're interested in using Encoding.com's platform to create iPhone Streaming (m3u8) files from your source content, there's a number of ways to achieve that using the options listed below. Our new HLS encoding has better adaptive bitrate distribution within the H.264 segments!

+ Use our web-based encoding software UI, located @ http://www.encoding.com/login, to designate an Amazon
 More -->

If you're interested in using Encoding.com's platform to create iPhone Streaming (m3u8) files from your source content, there's a number of ways to achieve that using the options listed below. Our new HLS encoding has better adaptive bitrate distribution within the H.264 segments!

+ Use our web-based encoding software UI, located @ http://www.encoding.com/login, to designate an Amazon S3, Rackspace CloudFiles or FTP site to use as your watchfolder. Turn an entire folder of content into iPhone Streaming (m3u8) files. All you have to do is select 'Add Task' and apply the iPhone Streaming (m3u8) preset from the dropdown menu in the watchfolder UI. 
 
+ Upload a single piece of media with our 'Add Media' feature in the web UI. Select 'Add Task' and apply an iPhone Streaming (m3u8) preset to your encoding workflow from the dropdown menu.  As with watchfolders, 'Add Media' can source from Amazon S3, Rackspace CloudFiles, FTP sites or your local drive / network.
 
+ Implement our powerful encoding API to submit source content and create Apple streaming video format files in a snap.
 
Don't forget to take a peek at our sample XML template for Apple TV creation.
 
<format>
    <output>iphone_stream</output>
    <destination>ftp://***** the output iphone index file (.m3u8) *****</destination>
    <size>400x300</size>
    <audio_bitrate>56k</audio_bitrate>
    <audio_sample_rate>44100</audio_sample_rate>
    <audio_channels_number>2</audio_channels_number>
    <keep_aspect_ratio>yes</keep_aspect_ratio>
    <video_codec>libx264</video_codec>
    <profile>iphone_stream</profile>
    <audio_codec>libfaac</audio_codec>
    <two_pass>no</two_pass>
    <turbo>yes</turbo>
    <cbr>no</cbr>
    <deinterlacing>no</deinterlacing>
    <keyframe>300</keyframe>
    <audio_volume>100</audio_volume>
    <rotate>0</rotate>
    <file_extension>tar</file_extension>
    <hint>no</hint>
    <bitrates>600k,400k,200k,110k</bitrates>
    <framerates>29.97,29.97,15,10</framerates>
    <keyframes>90,90,45,30</keyframes>
    <pack_files>no</pack_files>
    <segment_duration>10</segment_duration>
    <add_audio_only>yes</add_audio_only>
    <still_image>first_segment</still_image>
    <still_image_time>5</still_image_time>
    <still_image_size>480x320</still_image_size>
  </format>
 
HLS iPad and iPhone streaming generate two types of files per Apple spec: the master index files (.m3u8) and the segmented mpeg-4 files (.ts). Our default presets use 10-second segments at 30fps (300 frames each), per Apple Technical Note TN2224.
https://developer.apple.com/library/ios/#technotes/tn2010/tn2224.html

#1 Please be sure to set "Tar segmented files" to OFF or NO, or you will get all the files zipped into one TAR archive file. XML flag as <pack_files>no</pack_files>

#2 Please make sure your index files are set to the proper MIME type on your server (application/x-mpegURL) so they pass the Apple Validator Tool, which I have available for download here:
http://www.pixelgoat.net/encoding/info/Apple_Streaming_ValidatorTool.zip

#3 Please DO NOT use two pass encoding, or you will see a blurry I-frame "popping" at the beginning of each 10 second video segment.

#4 Be aware that 5 different bitrates will output 30 segment (.ts) files per minute of video, so a 10-minute video will be 300 files. You will probably want to encode each video to a separate destination directory to keep your server organized.

You may login to your Encoding.com queue at

https://manage.encoding.com/user/#queue

You may view our web interface tutorial for iPhone streaming at

http://www.encoding.com/video/demo.mp4

SAMPLE XML - Send direct to API at manage.encoding.com
https://www.encoding.com/sendXml/

 

<-- Hide
tools: email  |  print  |  share  |  click to rate (rated 7 times):
  • BlinkList
  • Del.icio.us
  • Digg
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Newsvine
  • Reddit
  • Sphinn
  • Technorati
  • Twitter