Download Formats

Progressive download

New in version 1.4.35.

There are devices that may only support progressive download, or you may want to make available a direct download for your users. Instead of storing an additional copy of the presentation, you can create an MP4 file on disk that only contains the necessary meta-data and references the actual movie data from the original (fragmented) video.

The MP4 file stored on disk is only around 10K - 100K in size. When requested by the client, the webserver reads the MP4 file and 'expands' it into a single progressive video.

Let's take for example a video presentation that has a 'video-512k.ismv' file containing two, an audio and video, track. You can create a progresssive version of this presentation by running:

#!/bin/bash

mp4split -o video-512k.mp4 --use_dref \
  video-512k.ismv

where --use_dref stands for 'use as a data reference'.

Since the input and output file are in the same directory, the output MP4 file needs to be in the same directory as the input file. If you specify an absolute URL (http://), then the reference that is stored in the MP4 file is absolute and the files can be stored separately.

You will then have the following files in the /var/www/video directory:

Streaming format Description
video.ism The USP server manifest file.
video-512k.ismv The video presentation used for all adaptive streaming playback.
video-512k.mp4 The video presentation as progressive download (internally referencing the media data in the video-512k.ismv file).

and the following Player URLs:

Streaming format URL
HTTP Smooth Streaming http://www.example.com/video/video.ism/Manifest
HTTP Live Streaming http://www.example.com/video/video.ism/video.m3u8
Progressive Download http://www.example.com/video/video-512k.mp4

The default major brand that the file uses depends on the features used in the generated MP4 file. The packager defaults to "iso2", but bumps the brand when features require this.

The "iso4" brand is set when negative composition times / version of the "ctts" box is used.

If you want to not want to use the "iso4" brand (e.g. because a player framework doesn't support negative composition times), then you can force the brand with the option --brand=iso2 and an edit-list is used instead.

Download to own

New in version 1.7.2.

Note

Download to own requires the Apache version of USP Origin.

Download to own may be sometimes more convenient than streaming movies. A user downloads the movie once and can watch the movie a number of times without having to have a broadband connection.

The video presentation is optionally protected by PlayReady DRM and is made available in the "PIFF" (Protected Interchangeable File Format) format.

The option used to enable this feature is the following:

--progressive_playout

Allows the download of the full presentation as an MP4 video file, including all the audio/video tracks. (Defaults to false).

As an example we create a server manifest that has the information of the audio and video tracks to include in the downloaded version. We also specify the DRM settings to use.

The source file is 'video-512k.ismv' and contains two, an audio and video, track. All the tracks specified in the server manifest file are included in the downloadable version.

You can create a download-to-own server manifest of this presentation by running:

#!/bin/bash

mp4split -o download.ism \
  --iss.key_id=00000010001000101000100000000001 \
  --iss.content_key=3A2A1B68DD2BD9B2EEB25E84C4776668 \
  --iss.license_server_url="http://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayRight=1&UseSimpleNonPersistentLicense=1" \
  --iss.key_iv=0000000000000000 \
  --progressive_playout \
  video-512k.ismv

Note that we pass the option --progressive_playout. The default of the Origin is to disallow downloading the complete presentation as a single file, so you have to specifically enable this.

You will then have the following files:

Streaming format Description
download.ism The USP server manifest file.
video-512k.ismv The video presentation.

and the following Player URLs:

Streaming format URL
HTTP Smooth Streaming http://www.example.com/video/download.ism/Manifest
Download-to-own http://www.example.com/video/download.ism/download.ismv

Note the extension of the Download-to-own URL. This is ".ismv" and tells the USP Origin to serve out the file in the fragmented Smooth Streaming PIFF format.

Resume and scrubbing features

New in version 1.7.17.

It is now possible to support HTTP Range requests, with features including resume and timeline scrubbing with your download-to-own implementation. In order to support this, you must first create a dref'd file of your content which becomes an index file for your downloadable file.

#!/bin/bash

mp4split -o video-512k-ref.mp4 \
  --use_dref video-512k.ismv

Once you have done that you can create the download-to-own manifest as you would normally and instead of adding the original content as the source, you would add the newly created dref file instead. This then in turn points to the original file, as the dref'd file is now serving as it's index for the range requests.

#!/bin/bash

mp4split -o download.ism \
  --iss.key_id=00000010001000101000100000000001 \
  --iss.content_key=3A2A1B68DD2BD9B2EEB25E84C4776668 \
  --iss.license_server_url="http://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayRight=1&UseSimpleNonPersistentLicense=1" \
  --iss.key_iv=0000000000000000 \
  --progressive_playout \
  video-512k-ref.mp4