Wednesday, September 19, 2012

F4M File Format Specification Examples (HTTP Dynamic Streamin)

Example Manifest Files


A single piece of media

With a duration of 253 seconds.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://ns.adobe.com/f4m/1.0">
 <id>myvideo</id>
 <duration>253</duration>
 <media url="rtmp://example.com/myvideo"/>
</manifest>



Multiple bitrate streams and (externally specified) DRM and HTTP bootstrapping information that applies to all streams

Note that the media files and bootstrap info are specified relatively to the baseURL tag, whereas the DRM AdditionalHeader file is specified absolutely.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://ns.adobe.com/f4m/1.0">
 <id>myvideo</id>
 <duration>253</duration>
 <mimeType>video/x-flv</mimeType>
 <streamType>recorded</streamType>
 <baseURL>http://example.com"</baseURL>
 <drmAdditionalHeader url="http://mydrmserver.com/mydrmadditionalheader"/>
 <bootstrapInfo profile="named" url="/mybootstrapinfo"/>
 <media url="/myvideo/low" bitrate="408" width="640" height="480"/>
 <media url="/myvideo/medium" bitrate="908" width="800" height="600"/>
 <media url="/myvideo/high" bitrate="1708" width="1920" height="1080"/>
</manifest>

Multiple bitrate streams, each with both DRM and HTTP bootstrapping information

This example also includes an explicit moov atom for each stream. Note that the DRM and HTTP blocks are shared for some streams, but not all.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://ns.adobe.com/f4m/1.0">
 <id>ABC</id>
 <startTime>2009-11-29T21:53:12-08:00</startTime>
 <duration>253</duration>
 <mimeType>video/mp4</mimeType>
 <streamType>recorded</streamType>
 <deliveryType>streaming</deliveryType>
 <drmAdditionalHeader id="ah1">
  BASE64 encoding of DRM AdditionalHeader
 </drmAdditionalHeader>
 <drmAdditionalHeader id="ah2">
  BASE64 encoding of DRM AdditionalHeader
 </drmAdditionalHeader>
 <bootstrapInfo id="boot1" profile="named">
  BASE64 encoding of bootstrap information
 </bootstrapInfo>
 <bootstrapInfo id="boot2" profile="named">
  BASE64 encoding of bootstrap information
 </bootstrapInfo>
 <media url="http://example.com/myvideo/low" bitrate="408"
                            bootstrapInfoId="boot1" drmAdditionalHeaderId="ah1">
  <moov>
   BASE 64 encoding of moov
  </moov>
 </media>
 <media url="http://example.com/myvideo/med" bitrate="1108" 
                 bootstrapInfoId="boot1" drmAdditionalHeaderId="ah2">
  <moov>
   BASE 64 encoding of moov
  </moov>
 </media>
 <media url="http://example.com/myvideo/high" bitrate="1708"
                        bootstrapInfoId="boot2" drmAdditionalHeaderId="ah2">
  <moov>
   BASE 64 encoding of moov
  </moov>
 </media>
</manifest>



RTMFP multicast media

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://ns.adobe.com/f4m/1.0">
 <id>myvideo</id>
 <streamType>live</streamType>
 <media url="rtmfp://example.com/myapp" groupspec="G:XYZXYZXYZ" 
                              multicastStreamName="mystream"/>
</manifest>



DVR media

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://ns.adobe.com/f4m/2.0">
 <id>myvideo</id>
 <streamType>live</streamType>
 <dvrInfo windowDuration="1800" offline="false" />
 <media url="rtmpe://example.com/myapp" />
</manifest>



HDS stream with alternative audio tracks

Also known as "late-binding audio".
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://ns.adobe.com/f4m/1.0">
 <id>myvideo</id>
 <streamType>recorded</streamType>
 <duration>100</duration>
 <label>English</label>
 <lang>en</lang>
 <mimeType>video/mp4</mimeType>
 <baseURL>http://example.com/</baseURL>
 <bootstrapInfo profile="named" id="boot1">
  BASE64 encoding of bootstrap information
 </bootstrapInfo>
 <bootstrapInfo profile="named" id="boot2">
  BASE64 encoding of bootstrap information
 </bootstrapInfo>
 <bootstrapInfo profile="named" id="boot3">
  BASE64 encoding of bootstrap information
 </bootstrapInfo>
 <media url="myvideo" bitrate="1300" bootstrapInfoId="boot1" />
 <media url="myvideo_audio1" bitrate="192" bootstrapInfoId="boot2" 
                    type="audio" label="Espanol" lang="es" alternate="true" />
 <media url="myvideo_audio2" bitrate="192" bootstrapInfoId="boot3" 
                    type="audio" label="Chinese" lang="zh" alternate="true" />
</manifest>



Multiple bitrate streams, each with HTTP Streaming bootstrap information

Also having alternate audio tracks.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://ns.adobe.com/f4m/1.0">
 <id>myvideo</id>
 <label>English</label>
 <lang>en</lang>
 <streamType>recorded</streamType>
 <duration>100</duration>
 <mimeType>video/mp4</mimeType>
 <baseURL>http://example.com/</baseURL>
 <bootstrapInfo profile="named" id="boot1">
  BASE64 encoding of bootstrap information
 </bootstrapInfo>
 <bootstrapInfo profile="named" id="boot2">
  BASE64 encoding of bootstrap information
 </bootstrapInfo>
 <bootstrapInfo profile="named" id="boot3">
  BASE64 encoding of bootstrap information
 </bootstrapInfo>
 <bootstrapInfo profile="named" id="boot4">
  BASE64 encoding of bootstrap information
 </bootstrapInfo>
 <bootstrapInfo profile="named" id="boot5">
  BASE64 encoding of bootstrap information
 </bootstrapInfo>
 <media url="myvideo_250" bitrate="250" bootstrapInfoId="boot1" />
 <media url="myvideo_500" bitrate="500" bootstrapInfoId="boot1" />
 <media url="myvideo_900" bitrate="900" bootstrapInfoId="boot1" />
 <media url="myvideo_1300" bitrate="1300" bootstrapInfoId="boot2" />
 <media url="myvideo_2100" bitrate="2100" bootstrapInfoId="boot3" />
 <media url="myvideo_audio1" bitrate="192" bootstrapInfoId="boot4" 
                  type="audio" label="Espanol" lang="es" alternate="true" />
 <media url="myvideo_audio2" bitrate="192" bootstrapInfoId="boot5"
                  type="audio" label="Chinese" lang="zh" alternate="true" />
</manifest>



A multi-level manifest

Note:
  • <dvrInfo> is set in the set-level manifest.
  • <bootstrapInfo> is set in the stream-level manifests.
  • Even though the two streams use the same bootstrapInfo id to refer to different bootstrap files, there’s no conflict, as the scope of <bootstrapInfo> is limited to the file that it’s in.
  • Similarly, the scope of <baseURL> is the manifest it is in.
Set-Level Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://ns.adobe.com/f4m/2.0">
 <id>myVideo</id>
 <baseURL>http://www.example.com/myvideo/</baseURL>
        <dvrInfo offline="false" windowDuration="600" />
 <streamType>live</streamType>
 <media href="stream250.f4m" bitrate="250" />
 <media href="stream500.f4m" bitrate="500" />
</manifest>
Stream-Level Manifest 1
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://ns.adobe.com/f4m/1.0">
 <id>myStream1</id>
 <baseURL>http://www.example.com/data/</baseURL>
        <bootstrapInfo profile="named" id="boot1" url="myvideo_250.bootstrap" />
 <media url="myvideo_250" bitrate="250" bootstrapInfoId="boot1" />
</manifest>
Stream-Level Manifest 2
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://ns.adobe.com/f4m/1.0">
 <id>myStream2</id>
        <bootstrapInfo profile="named" id="boot1" 
                 url=”http://www.example.com/data/myvideo_500.bootstrap” />
        <media url="http://www.example.com/data/myvideo_500" 
                        bitrate=”500” bootstrapInfoId=”boot1” />
</manifest>

No comments:

Post a Comment