Offline packaging

Offline packaging for HDS

The File Packager is a command-line tool that packages on-demand media files into a format that can stream over HTTP. The File Packager can also encrypt files for protection with Adobe Access.

Note:

To package on-demand content for HTTP streaming in real-time when a client requests the content, see Stream on-demand media (HTTP) in the Adobe Media Server Developer’s Guide.

Packaging on-demand media

File Packager location

The File Packager is available from the following locations:

  • Adobe Media Server rootinstall/tools/f4fpackager folder

The File Packager requires several libraries to run. These libraries are located in the f4fpackager folder. To move the File Packager, move the f4fpackager folder and all its contents.

Input file formats and output file formats

To stream on-demand media over HTTP, process the file with the File Packager. The File Packager parses the content, translates it into segments and fragments, and writes the segments and fragments to the F4F format. You can also choose to have the File Packager encrypt the content for use with Adobe Access.

The File Packager supports the following file formats:

  • F4V/MP4 compatible files

  • FLV

Note:

The file formats can contain any codec the format supports, except Speex audio. You can package a file that includes Speex audio, the File Packager does not throw an error, but the audio will not play. The packager can package video-only and audio-only streams.

The File Packager outputs the following files:

File type

Description

.f4f

A segment. The tool outputs one or more F4F files. Each file contains a segment of the source file. Each segment contains one or more fragments of content. A player can use a URL to address each fragment.

.f4m

Flash Media Manifest file. Contains information about codec, resolution, and the availability of multi-bitrate files.

.f4x

Index file. Contains the location of specific fragments within a stream.

.bootstrap

Bootstrap file. Contains the bootstrap information for each segment of the file. The tool creates an external .bootstrap file only if you specify the --external-bootstrap option. If you don’t specify that option, the bootstrap information is included in the manifest file.

.drmmeta

DRM Additional Header file. Contains additional header information about an encrypted file. The tool creates this file only if you specify the --external-bootstrap option and encrypt the file. Otherwise, the information is included in the manifest file.

Segments And Fragments

An F4F file contains one segment of a media file. Each segment can contain multiple fragments. Use the --segment-duration and --fragment-duration options to set the length of each segment and fragment, in seconds. Specifying a segment-duration greater than 0 will create multiple files. A good size fragment is small enough to send over the internet and long enough to prevent multiple calls to Apache HTTP Server.

Run The File Packager

To package a file, pass the File Packager the name of the input file.

There are two ways to specify the name:

  • Enter the --input-file option at the command line.

  • Create a configuration file that specifies the input file and enter the --conf-file option at the command line.

Package content on Windows

  1. Open a Command Window.

  2. Change directories to the directory containing f4fpackager.exe.

  3. Enter the name of the tool and any options:

    f4fpackager --input-file=sample.f4v --output-path=c:\sampleoutput

    The following files are output: sampleSeg1.f4f, sample.f4x, and sample.f4m.

Package content on Linux

  1. Open a terminal window.

  2. On a clean installation of Linux, set the LD_LIBRARY_PATH to the directory containing the File Packager libraries.

  3. At the shell prompt, enter the name of the tool and any options:

    f4fpackager --input-file=sample.f4v --output-path=/sampleoutput

    The following files are output: sampleSeg1.f4f, sample.f4x, and sample.f4m.

Packaging multi-bitrate content

To stream multi-bitrate content, encode a piece of media at multiple bitrates, creating multiple files. Use the File Packager to process each media file individually. The media files share a manifest file that lists information about each media file. The OSMF Player uses this information for playback.

About packaging multi-bitrate files

Each time you run the File Packager, it creates a manifest file with the filename of the input file. When you pass the --manifest-file option, the File Packager adds the information from the manifest file you specify to the manifest file it creates. For example, suppose you run the following:--input-file=sample1.f4v

The tool creates the files: sample1Seg1.f4f, sample1.f4x, and sample1.f4m.

Suppose you then run the following:

--input-file=sample1.f4v
--input-file=sample2.f4v --manifest-file=sample1.f4m

The tool creates the files sample2Seg1.f4f, sample2.f4x, and sample2.f4m. The manifest file sample2.f4m contains information about sample2.f4v and sample1.f4v.

To create a manifest file for multi-bitrate content, pass the --manifest-file option and specify the manifest file of the previously processed file. Package the files from lowest bitrate to highest bitrate. Do not pass the --manifest-file option for the first file you process.

Package multi-bitrate files

Note:

This example uses Windows. For Linux commands, see Package content on Linux.

  1. Encode a media file at several bitrates, for example, 150 kbps, 700 kbps, and 1500 kbps.

    This example uses three files: sample1_150kbps.f4v, sample1_700kbps.f4v, and sample1_1500kbps.f4v. On Adobe Media Server, these files are installed to rootinstall\applications\vod\media.

  2. Copy the files to the same folder as the File Packager.

    On Adobe Media Server 5, the File Packager is located in the rootinstall\tools\f4fpackager folder.

  3. Open a Command Window.

  4. Change directories to the directory containing f4fpackager.exe.

  5. Enter the following:

    f4fpackager --input-file=sample1_150kbps.f4v --bitrate=150

    The following files are output: sample1_150kbpsSeg1.f4f, sample1_150kbps.f4x, and sample1_150kbps.f4m.

  6. Enter the following to process the second file:

    f4fpackager --input-file=sample1_700kbps.f4v --manifest-file=sample1_150kbps.f4m --bitrate=700

    The following files are output: sample1_700kbpsSeg1.f4f, sample1_700kbps.f4x, and sample1_700kbps.f4m. The manifest file sample1_700kbps.f4m includes information from the input file and information from the sample1_150kbps.f4m manifest file.

  7. Enter the following to process the third file:

    f4fpackager --input-file=sample1_1500kbps.f4v --manifest-file=sample1_700kbps.f4m --bitrate=1500

    The following files are output: sample1_1500kbpsSeg1.f4f, sample1_1500kbps.f4x, and sample1_1500kbps.f4m. The manifest file sample1_1500kbps.f4m includes information from the input file and information from the sample1_700kbps.f4m manifest file. The sample1_700kbps.f4m file contains information about the sample1_150kbps.f4v file and the sample1_700kbps.f4v file.

  8. To play the file, pass the URL of the sample1_1500kbps.f4m file to OSMF Player. Because this manifest file was created last, it contains information about all three files.

Packaging and encrypting content

Use the File Packager to both package and encrypt content for use with Adobe Access.

Adobe Access includes a license server implementation based on the Adobe Access SDK called Adobe® Access™ Server for Protected Streaming. Adobe Access Server for Protected Streaming is designed for use with HTTP Dynamic Streaming. For more information about this Adobe Access, see Adobe Access documentation.

Generate a common key

To use the File Packager to encrypt content, you must generate a common key file. The common key file must contain 128 bytes of randomly generated data. The File Packager uses this key with the content ID to generate the content encryption key.

Note:

Although the base key is 128 bytes, only the first 128 bits (16 bytes) are used to generate the key.

You can use the open source tool Open SSL or Adobe’s Scramble utility to generate random data and output a common key file. Download Open SSL from www.openssl.org.

Generate random data and output a common key file:

openssl rand -out commonKey.bin 128

Pass commonKey.bin as the --common-key command line option or in the <common-key> element of a configuration file.

Use a configuration file to package and encrypt content

Many command-line options are required to encrypt a file. It’s easier to use a configuration file to set options than it is to set options at the command line.

  1. Open the file f4fpackager_config.xml in a text editor.

    By default, the tool looks for f4fpackager_config.xml in the same directory as the File Packager. However, you can move it to any directory and give it any name.

  2. Enter values for the following required options (sample values are included here):

    <offline> 
        <input-file>someFile.f4v</input-file> 
        <content-id>contentId</content-id> 
        <common-key>commonKey.bin</common-key> 
        <license-server-url>http://server1.com:9999</license-server-url> 
        <license-server-cert>licenseServer.der</license-server-cert> 
        <transport-cert>transportCert.der</transport-cert> 
        <packager-credential>packagerCredential.pfx</packager-credential> 
        <credential-pwd>mYpwd</credential-pwd> 
        <policy-file>policyFile.pol</policy-file> 
    </offline>

    You can add additional elements to change their default values.

  3. Save the configuration file.

  4. Open a Command Window.

  5. Change directories to the directory containing f4fpackager.exe.

  6. Enter the following:

    f4fpackager --conf-file=f4fpackager_config.xml

Use the command line to package and encrypt content

  1. Open a Command Window.

  2. Change directories to the directory containing the File Packager.

  3. Enter the following:

    f4fpackager --input-file=someFile.f4v --license-server-url=http://server1.com:9999 --transport-cert=transportCert.der --license-server-cert=licenseServer.der --packager-credential=packagerCredential.pfx --credential-pwd=mYpwd --policy-file=policyFile.pol --common-key=commonKey.bin --content-id=contentId

Updating DRM information

Broadcasters who use different license servers for testing and production, package the content individually for each license server causing bottlenecks during testing and publishing. The f4fpackager enhancements enable broadcasters to package content only once using multiple Adobe Access license servers.

f4packager package-once model

The packager enhancements include updates to various DRM parameters, such as license server URL, license server certificate, and usage policies using a new command-line option.

You can also use the update-drm-info option to generate a new manifest file with updated DRM metadata from the source manifest file. When you pass this option to the packager, repackaging of the original content is not performed. The remaining contents of the generated manifest file are similar to those of the source manifest file.

Update DRM information using the command line

To generate multiple manifest files that contain different license server URLs embedded in the DRM metadata, follow this workflow:

  1. Generate the manifest file with single-bitrate or multi-bitrate encrypted streams, using the f4fpackager.

  2. Generate a manifest file with modified license server URL by running the f4fpackager again with the following parameters:

    1. Specify the no value parameter --update-drm-info.

    2. Specify the manifest file generated in Step 1 through the --manifest-file option.

    3. Specify the encryption parameters with the same values as specified in Step 1, except for the --license-server-url parameter, which contains the new value.

    4. (Optional) Specify the --output-manifest-file option. If you use the packager to update the DRM information without specifying the --output-manifest-file option, a name from the input manifest file is generated with a number. For example, <input-manifest>_<n>.f4m, where n denotes a natural number.

      If a file with the generated name exists in the output directory, an incremental number is used in the file name. The --output-manifest-file option works while performing the packaging operation. In this case, the manifest file is created with the given name. Other assets (.f4f, .booststrap, and .drmmeta) are created using the base name (without extension) of this parameter. Any existing files are overwritten without any warning.

  3. Repeat Step 2 for all the new manifest files to be generated with the various license server URLs.

Update DRM information using configuration parameters

You can use a configuration file to package and encrypt content. The following snippet shows the sample values for the f4fpackager_config.xml file:

<offline> 
    <input-file>someFile.f4v</input-file> 
    <output-manifest-file>sample.f4m</ 
    output-manifest-file> 
    <update-drm-info>true<update-drm-info> 
    <content-id>contentId</content-id> 
    <common-key>commonKey.bin</common-key> 
    <license-server-url>http://server1.com:9999</license-server-url> 
    <license-server-cert>licenseServer.der</license-server-cert> 
    <transport-cert>transportCert.der</transport-cert> 
    <packager-credential>packagerCredential.pfx</packager-credential> 
    <credential-pwd>mYpwd</credential-pwd> 
    <policy-file>policyFile.pol</policy-file> 
</offline>
Note:

For an MBR manifest file, the DRM metadata of the streams are updated with the encryption parameter values specified in Step 2c. You cannot use different DRM metadata for individual bitrate streams of an MBR manifest file.

You can use the previously mentioned workflow to update encryption parameters in the DRM metadata of the source manifest file (including license server URL, license server certificate, and usage policies). You cannot use this method to update encryption parameters, such as content ID and common key. You shouldn’t update content ID and CEK in the DRM metadata because they are unique.

File Packager reference

Command-line options to fragment files

You can use the command line to set all the options for the File Packager. Options set at the command line override any options set in the configuration file. The only required option is --input-file.

Option

Description

Required

Default value

--allowed-drift

As the tool rounds off durations, it drifts from the real time. This option specifies how far the tool can vary from the real time, in seconds.

No

1

--bitrate

Specifies the bitrate of the content to fragment and adds it to the manifest file. Use this option to serve files encoded at multiple bitrates. Use this option or manually edit the manifest file to add the bitrate.

No

0

--config-dump

Dumps the configuration settings. This option does not fragment the file.

No

None

--conf-file

The configuration file that contains settings for the packaging process.

You can specify an absolute path or a path relative to the directory containing the tool. You can use the filename f4fpackager_config.xml or any other legal filename.

Suppose the tool is in the c:\media directory and the configuration file is in the c:\media\test directory. Run the following from the command line: f4fpackager --conf-file=test\f4fpackager_config.xml.

No

f4fpackager_config.xml

If the f4fpackager_config.xml file is not in the current directory, the default value is “none”.

--duration-precision

How precise the fragment durations are, in seconds. When using a time-based fragment duration, duration precision controls how much rounding is applied to the fragment durations in the fragment run tables. This prevents small variations in the fragment durations from causing the run tables to grow too large.

No

0.1

--edit-list

If you specify this option, the File Packager follows the edit list in the input file. By default, the packager does not follow the edit list.

No

None

--external-bootstrap

Outputs the bootstrap box to a .bootstrap file. If you omit this option, the information in the bootstrap box is placed in the manifest file (F4M).

Outputs DRM additional header information to a .drmmeta file when a file is encrypted. If you omit this option, the additional header information is included in the manifest file.

No

None

--fragment-duration

The target length of each fragment, in seconds. The actual length of each fragment depends on properties of the input file, such as the keyframe interval.

No

4

--frame-precision

This option is the frame-based equivalent to the --duration-precision option. This value is the number of frames to round to in the fragment run tables.

No

1

--frame-rate

The frame rate of the original content, in frames per second (fps). The value is floating point; for NTSC, use the value 29.97.

No

--frames-per-keyframe-interval

The number of frames between each keyframe. For example, 30 fps video with a keyframe every 2 seconds contains 60 frames per keyframe interval.

No

--input-file

The path to the source container file. The path can be absolute or relative to the directory containing the File Packager.

If you specify the --conf-file option and the configuration file contains an <input-file> value, you do not need to use the --input-file option.

Yes

None

--inspect-bootstrap

Inspects the bootstrap file. If a .bootstrap file is provided as an input, it inspects the file. If not, it inspects the bootstrap box in an F4F file.

No

None

--inspect-fragments

Inspects the F4F fragments in an F4F file.

No

None

--inspect-index

Inspects the AFRA index file if an AFRA file is provided.

No

None

--keyframe-intervals-per-fragment

The number of keyframe intervals per fragment. The default value is 1 which sets the fragment size to the same size as the keyframe interval.

No

1

--manifest-file

Updates an existing manifest file. Use this option to package a file encoded at multiple bitrates for dynamic streaming. For example, you could package three files (sample_500kpbs.f4v, sample_1000kbps.f4v, and sample_1500kbps.f4v) and add them all to the same manifest file.

If you omit this option, the tool creates a Flash Media Manifest file (F4M).

No

None

--output-manifest-file

Creates a manifest file with the name provided.

No

None

--output-path

The path to the directory to which the packaged files are output. If the directory doesn’t exist, the tool creates it. The path can be absolute or relative to the directory containing the File Packager.

No

Current directory

--sample-dump

Dumps the samples and the fragments they’re set to. This option does not fragment the file.

No

None

--segment-duration

The length, in seconds, of a segment. The default value is 0 which creates 1 segment.

No

0

Setting fragment duration based on frames or time

The File Packager has options that determine the size of fragments. There is a frame-based option, --keyframe-interval-per-fragment, and a time-based option, --fragment-duration. Each option has additional options that refine how the tool creates fragments.

Use the frame-based option when the source media contains video encoded at a constant frame rate. The frame-based option lets you carefully match the fragment size to the video's keyframe interval. Use the time-based option for media that contains audio or data but not video.

Frame-based options: --keyframe-interval-per-fragment, --frames-per-keyframe-interval, --frame-rate, --frame-precision. Time-based options: --fragment-duration, --duration-precision. The frame- based option overrides the time-based option. If you don't provide a --keyframe-interval-per-fragment option, the File Packager uses the --fragment-duration option. If you don't provide values for --keyframe-interval-per-fragment or --fragment-duration, the File Packager uses the default fragment duration, which is 4 seconds.

Command-line options to encrypt files

Use the File Packager to encrypt files for use with Adobe Access. Some of the following options require digital certificates. To obtain digital certificates, see the Adobe Access Certificate Enrollment Site.

A month before a DRM certificate expires, the server generates a relevant message in the Apache error logs and on the console. The message is generated only when content is requested by a client and the frequency of this message is only once per hour.

Option

Description

Required

Default

--transport-cert

The DER encoded transport certificate file.

Yes

None

--license-server-url

The URL of the license server that handles license acquisition for this content.

Yes

None

--license-server-cert

The DER encoded license server certificate file used for content protection.

Yes

None

--packager-credential

The PFX file containing the packager's protection credentials.

Yes

None

--credential-pwd

The password string used to secure the packager credentials.

Yes

None

--common-key

A file containing the common key. The common key is used with the content ID to generate the content encryption key. The common key must be randomly generated and 128 bytes. Although the common key is 128 bytes, only the first 128 bits (16 bytes) are used to generate the key.

For dynamic streaming, use the same common key and content ID for an entire set of content. Using the same key and id allows a single license to decrypt a set of content.

Yes

None

--content-id

The content ID used with the common key to generate the content encryption key.

Yes

None

--policy-file

The file containing the policy for this content. Currently only a single policy can be applied to content packaged with this tool.

Yes

None

--encrypt-audio

Specifies whether to encrypt the audio in the file.

No

true

--encrypt-video

Specifies whether to encrypt the video in the file.

No

true

--encrypt-data

Specifies whether to encrypt the data in the file. This option supports both FLV and F4V/MP4 formats.

No

true

--ms-unencrypted

The number of milliseconds at the beginning of the content that remains unencrypted. Use this option to improve stream start times because it allows the client to acquire the license asynchronously as playback begins.

No

0

--video-encrypt-level

The level of encryption for H.264 content. Possible values are 0 (low), 1(medium), and 2 (high). The default value is 2.

Note: Using this option on non-H.264 content won’t generate an error, but it won’t change the encryption level.

The values “0” and “1” mean “partial encryption”; only important samples like video keframes are encrypted. This setting creates fewer frames to decrypt. Use this setting to improve playback performance on the client.

The value "2", encrypts all video samples (after --ms-unencrypted, if specified)..

No

2

File Packager configuration file

The File Packager uses an XML configuration file to read values for command-line options. The default configuration file, f4fpackager_config.xml, is located in the same directory as the File Packager. It is often easier to specify options in a text file that you can reuse than it is to enter options at the command line.

Options you set at the command line override options set in the configuration file. This feature lets you create a configuration file for a set of content but edit a few settings for individual files.

Note:

You do not need to use the configuration file to run the tool.

Enter the --conf-file option at the command line to pass the name and location of a configuration file. If you don’t enter the --conf-file option, the tool checks for a file called f4fpackager_config.xml file in the same directory as the tool.

You can enter all the options for packaging and encrypting, including the input file, in the configuration file.

The following is the format of the configuration file:

<offline> 
    <input-file>/media/input-file.f4v</input-file> 
    <output-path>/media/http</output-path> 
    <fragment-duration></fragment-duration> 
   ... You can set as many options as you want ... 
</offline>

For options that take a path, you can specify absolute paths or paths relative to the directory containing the tool.

Errors

The File Packager outputs the following errors:

Error code

Error message

Description

1

File not found

The input file, the manifest file or the configuration file could not be found.

2

Input File not given

No input file has been specified. To run the File Packager, you must specify a path to a supported file type.

3

Invalid input file

The input file, manifest file, or configuration file is an invalid input file.

4

Can’t access file

The input file, manifest file, or configuration file cannot be accessed.

5

Unsupported codec

The input file contains unsupported codecs.

6

No supported tracks

The input file doesn’t contain any supported tracks.

7

Write error

A write error occurred. Verify that the input file is structured correctly and that there is enough memory to run the File Packager.

8

XML library error

An error occur ed when parsing the configuration file. Verify that the XML is structured correctly.

9

Program Options error

The program options library failed. Verify that the command line arguments are structured correctly.

10

Offline Encryption info error

The File Packager doesn’t have enough information to encrypt the file. Verify that there aren’t any missing inputs.

11

Encryption library error

The encryption library threw an error while encrypting the content.

12

Standard error

A Standard Exception has occur ed. Verify that there is enough memory to run the File Packager.

13

Invalid Bootstrap error

The bootstrap file is corrupt and cannot be parsed.

14

FLV Error

The FLV file cannot be read.

999

Internal error

There has been an internal error in the File Packager.

1000

Invalid Input file warning

Invalid input file warning.

2000

Invalid Error code

The error code is invalid.

Offline packaging for HLS

The Adobe Media Server installation includes a command line tool for packaging on-demand media files into fragmented video content that can be streamed over HTTP. This offline packager can also encrypt files for protection with Adobe Access.

The hlspackager is the command line tool that takes F4V source and produces fragmented HLS VOD content. You can pass various options to the packager either through the command line or through a configuration file. However, options passed through the command line will override the corresponding options specified in the configuration file.

note: The packager can recognize only F4Vand MP4 files.

The packager tool generates several types of output files during the packaging process. They are:

  • m3u8 file (single-stream playlist)

  • TS segments listed in the m3u8 file

The following command shows the syntax of hlspackager:

hlspackager --input-file=<input> --output-path=<output> --base-url=<baseurl> --audio-only=<bool> --config-dump --help --media-target-duration=<fragmentLength> --conf-file=<confFile>
Note:

The HLS Offline Packager does not prefix the names of the assets generated by the stream or filename. Hence, it will overwrite any files in the output directory that has the same file name as the generated content. You must use the output-path option to specify different directory paths for generated content for MBR and batch job use cases.

The various supported options are described in the following table:

Option

Description

Default

Required

--input-file

Path to the source file.

None

Yes

--output-path

Path for the HLS files to be created.

Current directory

No

--base-url

Base URL to append in the TS file names in the m3u8 file.

No base URL, relative to the m3u8 file

No

--media-target-duration

Target duration for each TS segment.

8000 ms

No

--conf-file

Specifies the configuration file that contains additional settings for the packaging process.

hlspackager_config.xml in working directory

No

--config-dump

Output the finally applied configuration. In this case, packaging does not happen.

No output by default

No

--audio-only

Whether to extract audio only stream ("true"/"false") .

false

No

--protection-scheme

Encryption scheme to be used ("Vanilla" or "FlashAccessV4").

None (No encryption)

Yes

--transport-cert

Specifies the DER-encoded transport certificate file to be used for content protection.

None

Yes, if scheme is FlashAccessV4

--license-server-url

The URL of the license server that will handle license acquisition for this content.

None

Yes, if scheme is FlashAccessV4

--license-server-cert

Specifies the DER-encoded license server certificate file to be used for content protection.

None

Yes, if scheme is FlashAccessV4

--packager-credential

Specifies the PFX file containing the packager’s protection credentials.

None

Yes, if scheme is FlashAccessV4

--credential-pwd

Specifies the password string used to secure the packager credentials.

None

Yes, if scheme is FlashAccessV4

--common-key-file

The base key used (along with the content ID) to generate the final content encryption key.

Using the same common key and content ID for an entire set of content allows a single license to decrypt a set on content, which is useful for multi-bitrate use cases.

To generate the common key, see Hosting and key generation

None

Yes, if scheme is FlashAccessV4

--content-id

The content ID for this content. Used along with the common key to generate the final content encryption key.

input-file-name

Optional (only for the FlashAccessV4 scheme)

--policy-file

Specifies the file containing the policy to be used for this content.

Currently only a single policy can be applied to content packaged with this tool.

None

Yes, if scheme is FlashAccessV4

--key-rotation-interval

The Key rotation interval for the "FlashAccessV4" protection scheme. Specifies after how many segments, keys should be rotated.

0 , -1, or invalid values mean key rotation will be disabled.

No key rotation

Optional (only for the FlashAccessV4 scheme)

--embed-leaf-license

Whether to embed the leaf license or not.

false

Optional (only for the FlashAccessV4 scheme)

--license-server-cred-file

License server credential used when protecting content for the specified location.

None

Yes, if embed-leaf-license is set to true (only for the FlashAccessV4 scheme)

--license-server-cred-pwd

License server credential password for the configured license server credential file.

None

Yes, if embed-leaf-license is set to true (only for the FlashAccessV4 scheme)

--key-file-path

Key file path for “Vanilla” encryption (Base-64 encoded key).

To generate the common key, see Hosting and key generation

None

Yes, if scheme is Vanilla

--key-file-url

Key file URL for "Vanilla" encryption (plain 16-bit key only) .

To generate the common key, see Hosting and key generation

None

Yes, if scheme is Vanilla

--faxskey-server-url

The URL of the Adobe Access key Server that will handle serving keys to the iOS clients.

None

Yes, if scheme is FlashAccessV4

--key-server-cert-file

Key server certificate file for the remote key serving.

None

Yes, if scheme is FlashAccessV4

Instead of passing the options along with the command, you can also pass a configuration file containing the options to the packager. The configuration file is an XML file that can be used to specify settings for the packaging process.

The packager checks whether a configuration file has been passed by the user. If not, it checks for the hlspackager_config.xml file in the same directory as the command-line program. The configuration file is not needed to run the packager. The format of the configuration file is:<offline> <input-file>/media/input-file.f4v</input-file> <output-path>/media/http</output-path> <media-target-duration></media-target-duration> ... other options... </offline>

<offline> 
    <input-file>/media/input-file.f4v</input-file> 
    <output-path>/media/http</output-path> 
    <media-target-duration></media-target-duration> 
     
    ... other options... 
</offline>

Hosting and key generation

You can host the fragmented content directly from the server’s webroot directory. For instance, if you keep the fragmented content inside the webroot/myOfflineContent/ directory, you can playback the content through the URL - http://server-name/myOfflineContent/prog_index.m3u8.

Key generation for Vanilla content

The content fragmentation for the Vanilla encryption protection scheme will take base-64 encoded key as input. To generate the base-64 encoded key, run the OpenSSL command as shown below:openssl rand -out keyfile.bin -base64 16

The generated keyfile.bin file has the base-64 key and can be used for content fragmentation. To generate the key for hosting, run:openssl base64 -d -in keyfile.bin -out plain-keyfile.bin

The plain-keyfile.bin file can be hosted for key delivery.

openssl rand -out keyfile.bin -base64 16
openssl base64 -d -in keyfile.bin -out plain-keyfile.bin

Key generation for Adobe Access content

To generate the base-64 encoded key, run the OpenSSL command as shown below:openssl rand -out keyfile.bin -base64 16

openssl rand -out keyfile.bin -base64 16

Error codes

The following table describes the various error codes raised by the packager:

Error Code

Description

Example

1

Input file is not found or invalid

Wrong or invalid input file path is specified.

2

Input file parameter is not mentioned

--input-file parameter is missing.

3

Input file is not valid or corrupt

Corrupted mp4 file.

4

Cannot access the input file

Unable to open or access the input file .

7

Write error to disk

Unable to write m3u8 or ts segments to disk.

8

Unable to parse input xml file

Parsing issue.

9

Invalid program options

Parsing issues in the command line errors.

10

Invalid encryption parameters

Wrong license file or invalid key file.

12

System standard input or output errors

Inputs casting issue.

16

m3u8 generation error

Not able to generate m3u8 files.

17

ts file generation issues

Not able to generate the ts file.

18

Invalid target duration

Target duration is too less or too large.

19

Protection scheme is not valid

If a scheme other than "FlashAccessV4" or "Vanilla" is specified,

999

Internal processing error

-

Licensing configurations and restrictions (HDS and HLS)

You can add a license path by adding the license-path element. This element must contain the path to the license directory in Adobe Media Server. If the value is not explicitly specified, ‘../../’ will be assumed as the license path considering that the offline packagers for both HDS and HLS are in the tools directoy.The path specified by the license-path element in the configuration file can be absolute or relative to the directory containing the offline packagers. For instance:<license-path>C:\Program Files\Adobe\Adobe Media Server 5\</license-path>

<license-path>C:\Program Files\Adobe\Adobe Media Server 5\</license-path>
Note:

The license configurations and restrictions are applicable for both f4fpackager and hlspackager.

Adobe logo

Sign in to your account