Media Flow Controller Configuration Tasks : Policy Configurations : Virtual Player Options

Virtual Player Options
Create virtual players to customize how videos are delivered; once created, they are assigned to a namespace. This is optional; if a namespace does not have a defined virtual player assigned to it, it uses the network connection settings.
You may want to create a virtual player for each type of video you deliver; for example, if you deliver YouTube® videos, create a type youtube virtual-player for use in the corresponding namespace. Media Flow Controller virtual players support and complement client-side video players. Whereas namespaces allow you to define what gets fetched from where and how, virtual players let you fine-tune video delivery.
There are five types of virtual players: Type generic virtual player offers all generic virtual player options; Type break players are a sub-set of Type generic, Type qss-streamlet virtual players allow multiple settings of assured flow via a rate-map, Type yahoo players are for YouTube™ videos and include a health-probe option and a special authentication option. Type smoothflow players for SmoothFlow are documented after this section. Type youtube players are for YouTube media. A sixth player type, smoothstream-pub is Not Supported in Release 2.0.2.
Review the following sections Using query-string-parm and Using hash-verify for implementation details; then you can proceed to “Configuring Virtual Player Type generic,” or see virtual-player for CLI details.
Note! Media Flow Controller provides an API you can use to create custom virtual players. For more information, contact Juniper Networks Customer Support; see “Requesting Technical Support” on page 32.
Note! In Release 2.0.2, the show options command ? (question mark), displays all virtual player options no matter what virtual player type you are configuring; however, if you try to set an option that does not apply to that player type, an error displays.
Using query-string-parm
The query-string-parm argument, used extensively in virtual player configurations, allows you to use query params. Query params, a string with an associated value, are a way of passing information through a URL. The query param part of the URL is designated with a question mark (?) followed by defined query params. The query param is a name that is associated with a pre-defined value. Additional queries in the URL are separated by ampersand signs (&). Query params are composed of a name and value pair. For example, a request for a query param for assured-flow-rate could be shown in a URL like this:
http://xyz.com/test.flv?afr=100
In the above example, the query-string-parm <string> is afr and its value is 100. The namespace for this connection tells Media Flow Controller that when it finds afr in the query params part of the URL it is to use the value following it for that function. So, if the URL has ?afr=100 Media Flow Controller knows (through the URL’s defined namespace and associated virtual player or configured network connection properties) to use 100 Kbps for the assured-flow rate.
In the Media Flow Controller CLI, you can only specify the query param <string> and should know the units of the value for that query parameter as query params can be defined to mean many different things and are used to signal the start or value of assured flow, fast-start, full-download, seek, and smooth flow functions, and the match value for hash-verify and rate-map.
Important! The virtual player query-string-parm values you configure in your Media Flow Controller origin must match the corresponding query-string-parm values configured in your Media Flow Controller edge.
Using hash-verify
Media Flow Controller computes an md-5 hash of an incoming URL by combining a specified part of the URL along with a pre-shared secret value (configured via Media Flow Controller CLI). The computed hash digest value is then compared with the hash value provided in the incoming URL via a pre-specified match query-string-parm (configured via Media Flow Controller CLI). If a match between the computed and provided hash values is unsuccessful, then the incoming request is denied.
Example URL showing match query-string-parm h (configured in Media Flow Controller):
http://video.example.com/public/2010/qwerty.flv?fs=5000&ri=300&rs=1234567&h=<128-bit-md-5-hash>
If Media Flow Controller encounters the above URL, it takes the entire URL (shown in blue), until it encounters the provided match query-string-parm, e.g., h (shown in red above).
The hash value is then computed by either appending or prefixing to the URL the configured shared-secret value as specified in the CLI, and comparing the computed value with the value provided via the match query-string-parm (shown in green above).
Example if shared-secret is appended:
Computed hash value = MD5(http://video.example.com/public/2010/qwerty.flv?fs=5000&ri=300&rs=1234567 + shared-secret)
Example if shared-secret is prefixed:
Computed hash value = MD5(shared-secret + http://video.example.com/public/2010/qwerty.flv?fs=5000&ri=300&rs=1234567)
Note! The secret key is called a shared-secret key, because the same key is also used by the browser/video player that generates the request for the object, to compute the hash value which is present in the pre-specified query parameter for comparison.
Note! Types 1 and 4 virtual-players have a default match query-string-parm of h, this can be changed in the CLI.
Using virtual-player type qss-streamlet rate-map
Virtual player type qss-streamlet allows you to configure a rate-map to ensure a specified delivery rate is applied to certain requests. The configuration calls for you to specify a match <string> to a rate <kbps>; when the request arrives the match <string> is extracted from the URL and its corresponding rate (in kbps) is used for the delivery rate.
By default, the match string (length must be 2 bytes, i.e. 01) is extracted by going to the end of the URL and skipping 12 Bytes from the end; the value in that location is mapped to the configured rate in kbps. Example:
http://video.example.com/public/BBB87026/xy_750_1938344/AC60E15B2A7C4A45AC4C1472E2AC0816_030000003F.flv
In the URL above, the value 03 (12 Bytes from the end of the URL) is extracted, and the corresponding assured flow rate (1000Kbps) is applied.
The configured CLI looks like this:
virtual-player my_virtual_player type qss-streamlet
rate-map match 01 rate 300
rate-map match 02 rate 500
rate-map match 03 rate 1000
In this way, URLs containing 01 in the correct place (12 bytes from the end) map to an assured flow rate of 300; with 02 the assured flow rate is 500; and so on. Defaults are:
Match: 00 Rate: 150 kbps
Match: 01 Rate: 180 kbps
Match: 02 Rate: 270 kbps
Match: 03 Rate: 330 kbps
Match: 04 Rate: 420 kbps
Match: 05 Rate: 470 kbps
Match: 06 Rate: 520 kbps
Match: 07 Rate: 575 kbps
Match: 08 Rate: 700 kbps
Match: 09 Rate: 800 kbps
Match: 0A Rate: 900 kbps
Match: 0B Rate: 1300 kbps
Match: 0C Rate: 1750 kbps
Match: 0D Rate: 1920 kbps
Important! Media Flow Controller checks for an underscore ( _ ) before the 14th byte; if the underscore is missing, the URI does not map correctly.
Configuring Virtual Player Type generic
This section describes configuring the type generic (formerly Type 0) virtual player.
1.
Configure a virtual player with a name and type generic (enters you to virtual-player configuration mode). Use no virtual-player <name> to delete; use virtual-player <name no <option> to make changes to configurations (either reset default or remove setting).
virtual-player <name> type generic
2.
Configure hash verification options. Note! In Release 2.0.2, only md-5 digest is supported. Set a shared secret value to be appended or prefixed to the URL as specified, for matching against the hash value provided in the URL and indicated by the match query-string-parm you configure.
hash-verify digest md-5 shared-secret <string> {append | prefix} match query-string-parm <string>
3.
Set download parameters for delivering files at the fastest possible speed. If you choose always, then file downloads are always delivered at the fastest possible speed; otherwise, you must have either a query param or a header name that indicate that a full download should be processed.
full-download {always | match <string> {query-string-parm <string> | header <header_name>}}
4.
Optionally, configure assured-flow delivery optimization. Note! The auto option is not supported in Release 2.0.2. A query param can be used or define a static rate value in kbps, a value of 0 (zero) means no throughput at all. Once a value is entered, this parameter is enabled. See “AssuredFlow™” on page 48 for more information.
assured-flow {auto | query-string-parm <string> | rate <kbps>}
5.
Optionally, configure connection max-bandwidth delivery optimization. Default is 0 (unbounded) with the Media Flow Controller license, 200 kbps without it; you must have the license to change the unlicensed default. Use no connection to reset default.
connection max-bandwidth {0 | <kbps>}
6.
Optionally, configure fast-start delivery optimization.
fast-start {query-string-parm <string> | size <KB> | time <seconds>}
7.
Optionally, configure seek delivery optimization specifying a query param for when seek should start and how long it should last. Query params must be used.
seek query-string-parm <string> [seek-length query-string-parm <string>]
8.
Optionally, configure smooth-flow delivery optimization. A query param must be used. See “SmoothFlow™” on page 49 for detailed descriptions.
smooth-flow query-string-parm <string>
9.
Type exit to leave virtual-player configuration mode.
Example:
test-vos (config) # virtual-player test type generic
test-vos (config virtual-player test) # hash-verify digest md-5 match query-string-parm h shared-secret zpzp prefix
test-vos (config virtual-player test) # assured-flow query-string-parm afr
test-vos (config virtual-player test) # full-download always
test-vos (config virtual-player test) # connection max-bandwidth 0
test-vos (config virtual-player test) # fast-start time 90
test-vos (config virtual-player test) # seek query-string-parm sk
test-vos (config virtual-player test) # smooth-flow query-string-parm sf
test-vos (config virtual-player test) # exit
test-vos (config) #
10.
Verify configurations with show virtual-player <name>.
To make these configurations using the Management Console, go to the Service Config > Virtual Player page. Enter a Virtual Player Name and select a Virtual Player Type from the drop-down list; click Add to create the virtual player, and then Configure in the list of virtual players to open a new window and make configurations. Click Add/Update at the bottom of each virtual player configuration page and simply close the window when you are done. You can then click Show in the virtual player list and get a new window showing the configurations you made.
Configuring Virtual Player Type smoothFlow
This section describes configuring the type smoothflow (formerly Type 4) virtual player.
Note! All virtual-player parameters are disabled until a value is set.
1.
Configure a virtual player with a name and type smoothflow (enters you to virtual-player configuration mode).
virtual-player <name> type smoothflow
2.
Configure the control point for signalling bandwidth changes at the client side; either server or player for SmoothFlow signaling. If server, Media Flow Controller detects the bandwidth variations at the client side and adjusts the bit-rate of the video accordingly. If player, the player at the client side explicitly signals the bandwidth changes and Media Flow Controller adjusts the bit-rate of the video accordingly.
control-point {player | server}
3.
Set signal names for session-id, state, and profile delivery functions. Your client player must understand the query params you use; for example sid (for session-id), sf (for SF state), pf (for profile). See “virtual-player type smoothflow” on page 245 for further information on SmoothFlow states.
signals session-id query-string-parm <string> state query-string-parm <string> profile query-string-parm <string>
4.
Configure hash verification options. Note! In Release 2.0.2, only md-5 digest is supported. Set a shared secret value to be appended or prefixed to the URL as specified, for matching against the hash value provided in the URL and indicated by the match query-string-parm you configure.
hash-verify digest md-5 shared-secret <string> {append | prefix} match query-string-parm <string>
5.
Optionally, configure connection max-bandwidth delivery optimization. Default is 0 (unbounded) with the Media Flow Controller license, 200 kbps without it; you must have the license to change the unlicensed default. Use no connection to reset default.
connection max-bandwidth {0 | <kbps>}
6.
Optionally, configure seek delivery optimization specifying a query param for when seek should start and how long it should last. Query params must be used.
seek query-string-parm <string> [seek-length query-string-parm <string>]
7.
Verify configurations with show virtual-player <name>. Type exit to leave virtual-player configuration mode.
Example:
test-vos (config) # virtual-player testSF type 4
test-vos (config virtual-player testSF) # control-point player
test-vos (config virtual-player testSF) # signals session-id query-string-parm sid state query-string-parm sf profile query-string-parm pf
test-vos (config virtual-player testSF) # hash-verify digest md-5 match query-string-parm h shared-secret zpzp prefix
test-vos (config virtual-player testSF) # connection max-bandwidth 0
test-vos (config virtual-player testSF) # seek query-string-parm toff
test-vos (config virtual-player testSF) # exit
test-vos (config) # show virtual-player testSF
Virtual Player : testSF
Type : 4
Control Point : player
Signals Configuration:
Enabled: yes
Session-Id string: sid
State string: sf
Profile string: pf
Hash Verify Configuration
Enabled: yes
Digest: md-5
Data String:
Data UOL Offset: 0
Data UOL Length: 0
Match query string: h
Shared secret: ****
Connection Configuration
Max Bandwidth: 0 kbps
Seek Configuration
Enabled: yes
URI Query: toff
test-vos (config) #
To make these configurations using the Management Console, go to the Service Config > Virtual Player page. Enter a Virtual Player Name and select a Virtual Player Type from the drop-down list; click Add to create the virtual player, and then Configure in the list of virtual players to open a new window and make configurations. Click Add/Update at the bottom of each virtual player configuration page and simply close the window when you are done. You can then click Show in the virtual player list and get a new window showing the configurations you made.
About Virtual Player Type youtube
YouTube encodes media content using industry standard video and audio compression schemes such as H.264/AVC for video and AAC for audio. It stores the encoded bit streams using either FLV, MP4 or 3GP containers, depending on the spatial resolution of the video. Currently, YouTube supports the following different formats as outlined in Table 7 below.
Associations to one of these formats is signaled through a request originating from the player via a query parameter typically of the type fmt or itag
 
320x240
640x480
480x360
480x270
Requests originating from a YouTube player for a video asset have been observed to typically come in the following two forms (underlining highlights important details):
(a) GET “http://www.youtube.com/get_video?video_id=fBE7y6Uba5M&t= vjVQa1PpcFPfHDFKYQ1s_RIHTM?GxADM8vFGLxxc_rs=&el=detailpage&ps=&fmt=34&asv=2&noflv=1”
(b) GET “http://v8.nonxt7.c.YouTube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor&fexp=904405&algorithm=throttle?factor&itag=34&ipbits=0&burst=40&sver=3&expire=1266310800&key=yt1&signature=66222E9350B9BB5AC68297F12AC1DCB4C53AAFDE.55B33FFFA04EBF001AF39A4F316E657FC318E0E5&factor=1.25&id=efa3a0434887fdc0&redirect_counter=1”
It is observed that above 2 request formats do not have an explicit association or reference to the media object, and the URI themselves are not cache friendly. The association to the media object is provided using a combination of an id and format tag.
For case (a) this association is provided by the video_id and fmt query parameters.
For case (b) this association is provided by the id and itag query parameters.
Media Flow Controller uses a combination of these query parameters to generate an internal cache name for the media object. YouTube videos in Media Flow Controller are cached with a cache name format as:
yt_video_id_efa3a0434887fdc0_fmt_34
Media Flow Controller also supports random access via seek/scrub for YouTube videos. YouTube signals a seek point via a query parameter, begin, with units of milliseconds. Media Flow Controller translates this seek point to the correct position in the video file for both the FLV or MP4 container formats and data that is delivered to the player is from the seek point onwards to the end of the file.
Configuring YouTube Video Caching
1.
Configure a namespace with the proper URI prefix (/get_video or /videoplayback) and domain name association to filter YouTube video requests
2.
a.
b.
For case (a) described above the cache name configuration is video_id and fmt. For case (b) described above the cache name configuration is id and itag
c.
For seek configuration, the URI query is begin (seek length is not required)
3.
Default cache age allowed for YouTube assets can be over-ridden using the namespace origin-fetch options offered by the Media Flow Controller CLI to enable longer cache intervals.
Example configuration to enable YouTube caching in Media Flow Controller:
test-vos (config) # virtual-player ytplayerA type 5
test-vos (config virtual-player ytplayerA) # cache-name video-id q uery-string-parm id format-id query-string-parm itag
test-vos (config virtual-player ytplayerA) # seek query-string-parm begin
test-vos (config virtual-player ytplayerA) # exit
test-vos (config) # show virtual-player ytplayerA
Virtual Player : ytplayerA
Type : 5
Cache Name Configuration
Video-Id : id
Format Tag : itag
Seek Configuration
Enabled: yes
URI Query: begin
Seek Length URI Query :
Assured Flow Configuration
Enabled: no
Rate: 0 kbps
URI query:
Auto: no
Fast Start Configuration
Enabled: no
Size: 0 kBytes
time: 0 seconds
URI query:
Connection Configuration
Max Bandwidth: 0 kbps

Report an Error
Media Flow Controller Administrator's Guide and CLI Command Reference
Copyright © 2010 Juniper Networks, Inc.