Documenation which can be found in the code

Reproduced here for searchability

/// Microsoft.Web.Media.TransformManager
/// Reference:
/// c:\Program Files\IIS\Transform Manager\Microsoft.Web.Media.TransformManager.SDK.dll
/// c:\Program Files\IIS\Transform Manager\Microsoft.Web.Media.TransformManager.Common.dll
/// Download from:
/// Or WebPI:
/// Requires: IIS Media Services 4.1,
/// Support:
/// IIS Forums:
/// Microsoft Support via support ticket or MSFT Premier account.
using Microsoft.Web.Media.TransformManager;

/// Microsoft.WindowsAzure.MediaServices.Client
/// References:
/// Download via NuGet: install-package WindowsAzure.MediaServices -Version
/// Support:
/// Windows Azure Media Services Forums:
using Microsoft.WindowsAzure.MediaServices.Client;

/// Signing your assembly:
/// You should sign your assembly using a strong name key file (.snk)
/// See MSDN:
/// Set/Create the .snk file in the project properties in the Signing tab.
/// In CreateAssetTask.xml, change:
/// <type>Codeplex.TransformManager.WAMS.CreateAssetTask, Codeplex.TransformManager.WAMS.CreateAssetTask, Version=, Culture=neutral</type>
/// To:
/// <type>Codeplex.TransformManager.WAMS.CreateAssetTask, Codeplex.TransformManager.WAMS.CreateAssetTask, Version=, Culture=neutral, PublicKeyToken=YourPublicKeyToken</type>

/// Post-Build / Deployment Steps:
/// copy /Y $(TargetPath) "C:\Program Files\IIS\Transform Manager\"
/// copy /Y $(TargetDir)Microsoft.WindowsAzure.MediaServices.Client.dll "C:\Program Files\IIS\Transform Manager\"
/// copy /Y $(TargetDir)Microsoft.WindowsAzure.StorageClient.dll "C:\Program Files\IIS\Transform Manager\"
/// copy /Y $(TargetDir)CreateAssetTask.xml "C:\ProgramData\Microsoft\IIS\Transform Manager\Configuration\Task Definitions\"
/// Installing in Transform Mananger:
/// Copy files as indicated above.
/// This task is executed by TaskEngine.exe.
/// As such, all runtime binding redirects must be in TaskEngine.exe.config.
/// Specifically, add the following to "C:\Program Files\IIS\Transform Manager\TaskEngine.exe.config"
/// <runtime>
/// <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
/// <dependentAssembly>
/// <assemblyIdentity name="Microsoft.Practices.TransientFaultHandling.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
/// <bindingRedirect oldVersion="" newVersion="5.1.1209.0" />
/// </dependentAssembly>
/// <dependentAssembly>
/// <assemblyIdentity name="Microsoft.WindowsAzure.StorageClient" publicKeyToken="31bf3856ad364e35" culture="neutral" />
/// <bindingRedirect oldVersion="" newVersion="" />
/// </dependentAssembly>
/// <dependentAssembly>
/// <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
/// <bindingRedirect oldVersion="" newVersion="" />
/// </dependentAssembly>
/// </assemblyBinding>
/// </runtime>
/// Updated versions of the above will be in this project's app.config and are managed by NuGet package updates.
/// Restart TM Service via user interface
/// Create a template for the new task.
/// Set your confirguration properties for the template.
/// Create a watch-folder.
/// You can choose *.ism as the trigger file.
/// Enable and start-up the watch folder.
/// Drop some smooth assets into the watch folder.
/// The Asset.Id and PrimaryFile.Uri are written to both the TM log file and a .json file.
/// Read the .json file your player app.
/// If you used a .ism as the watch-folder trigger and set primaryFileMask==InstanceFile,
/// then "PrimaryFileUri/manifest" is the path you need to stream back your smooth content.

/// Using this project as a template for your own TM tasks:
/// Create a .Net Framework 4 class library
/// Make sure targets full framework, not the "Client Profile"
/// Add the references for Transform Manager.
/// Add the using Microsoft.Web.Media.TransformManager;
/// Make your class derive from : Microsoft.Web.Media.TransformManager.ITask
/// Right-click that and 'Implement Interface'
/// Copy and re-use some of the base Transform Manager variables and checks.
/// Copy and change values in the task.xml, specifically, you must change
/// - the id GUID
/// - the task properties namespace and prefix
/// - the taskcode to point to your class name and dll name

/// Overriding properties of this task when submitting a smil file to TM:
/// When you use a .smil file to submit your assets to TM, you can override
/// any of the properties that you set in the TM GUI on an per-asset basis.
/// To do this, add a section to the head of the smil file with the following
/// <?xml version="1.0" encoding="utf-8"?>
/// <smil xmlns="">
/// <head>
/// <metadata id="meta-rdf">
/// <rdf:RDF xmlns:iisms="" xmlns:rdf="" xmlns:rdfs="" >
/// <iisms:task rdf:about="guid:92c19155-c012-478d-bf61-47c937616b2a" xmlns:createAsset="">
/// <iisms:id>92c19155-c012-478d-bf61-47c937616b2a</iisms:id>
/// <createAsset:alternateId>My CMS GUID for this asset</createAsset:alternateId>
/// </iisms:task>
/// </rdf:RDF>
/// </metadata>
/// </head>
/// <body>
/// <switch>
/// <video src="my.mp4" />
/// <audio src="my.mp4" />
/// </switch>
/// </body>
/// </smil>
/// For example, you could use the above in the following use case:
/// If your CMS system, which is submitting jobs to TM, is already authoring the smil file.
/// Add the a section above to to this smil and set your CMS GUID for the asset,
/// then you can find the asset easily in WAMS using the function in this sample:
/// IAsset theAsset = GetAssetByAlternateId("My CMS GUID for this asset");
/// if(theAsset != null)
/// {
/// //Do something with the asset.
/// }

/// Chaining tasks:
/// In Transform Manager, you can chain tasks to support larger workflows.
/// This task can be chained to itself, if you do this, it will exhibit a special behaviour.
/// Use case:
/// Assume you want to upload the same asset to one or more datacentres to provide origin services replication and failover.
/// Create a first instance of the task to upload and create a locator, in say, data center EAST_US.
/// Chain a second instance of the task to upload and create a locator in WEST_US.
/// The second instance will read the .json output of the first instance to see what locator Id was used.
/// It will re-use the locator id by calling the REST API directly, passing the first locator Id in the POST request to the second datacenter.
/// This will create a locator with the same path as the fist datacenter.
/// By doing this, and setting up a load-ballancer or CDN to source from either datacenter, you are creating a failover for your asset across datacenters.
/// http://yourEastUsOrigin/locatorguid/yourfile.ism/manifest
/// http://yourWestUsOrigin/locatorguid/yourfile.ism/manifest
/// This redundancy, of course, drives up both storage and origin-services costs.
/// Note that TM has an issue when the same task is repeated in a single template:
/// First add the tasks, then save and close the template.
/// Now reopen the template and make modifications to each task:
/// Add your credentials to each task.
/// Use an output folder on the first task, say "firstUpload".
/// Use the same folder as the input for the second task.
/// The second task does not need a specific ouput folder.

Last edited Nov 27, 2012 at 10:31 PM by NickDrouin, version 3


No comments yet.