The primary input of Transform Manager jobs is through watch folders. However, in order to integrate Transform Manager job templates into an existing content workflow, sometimes we may wish to use command line to run Transform Manager jobs. The benefits of using commands includes the following:
- Do not have to use Transform Manager watch folder to submit a job. This means one does not have to move asset files from original location to submit a job;
- To be able to run a Transform Manager job synchronously.
The following is required for running Transform Manager job from command line:
- Install and configure Transform Manager on Windows Server 2008 R2;
- Create a job template fulfilling your asset transformation needs. As a demonstration, let’s consider a job template containing the following
tasks, as well as its watch folder configuration:
- MP4 to Smooth Streams;
- PlayReady Protect;
- Robocopy of output to destination location.
PREPARE A JOB:
For each asset transform job, the following items need to be prepared before the asset can be submitted to Transform Manager via command
Job manifest file: The job manifest file includes tasks, video, audio asset file locations, as well as key ID and key seed used for
PlayReady protection of Smooth Stream;
Job instance ID, uniquely identifying the job. This needs to be added to job manifest file.
Key ID and key seed for PlayReady protection. Key ID and key seed also need to be added to job manifest file.
Notice that in the job manifest file, you can specify the original location of the media asset file such as below
<ref src=”C:\Workspace\Source\Asset1\H264_200.mp4″ xmlns=”” />
<ref src=”C:\Workspace\Source\Asset1\H264_400.mp4″ xmlns=”” />
<ref src=”C:\Workspace\Source\Asset1\H264_1000.mp4″ xmlns=”” />
<ref src=”C:\Workspace\Source\Asset1\H264_1500.mp4″ xmlns=”” />
<ref src=”C:\Workspace\Source\Asset1\H264_2000.mp4″ xmlns=”” />
<ref src=”C:\Workspace\Source\Asset1\H264_2500.mp4″ xmlns=”” />
Hence, to submit a job, you do not have to move files around.
In order to prepare for the PlayReady Protect task, we need to put in the key ID and key seed for a particular asset, as shown below.
RUNNING A JOB:
A Windows batch file (TM.cmd) has been developed and can be used to run a job synchronously.
In a default installation of Transform Manager, the running folder should be:
where [JOB_TEMPLATE] is the name of the job template. You should run the job in this folder.
The batch file (TM.cmd):
rem Running Transform Manager Job Template in command line
rem keyseed XVBovsmzhP9gRIZxWfFta3VVRPzVEWmJsazEJ46I
rem instanceID 20120501134250_66232A9905A844749A9404A8146E303A
SET TASK_ENGINE=”%systemdrive%\Program Files\IIS\Transform Manager\TaskEngine.exe”
SET RUNNING_FOLDER=%systemdrive%\inetpub\media\Transform Manager\WF_MP4_SS_PR\WorkQueue\Running
@echo Task 1: MP4 to Smooth
%TASK_ENGINE% /taskIndex 1 /manifest %MANIFEST%
@echo Task 2: PlayReady Protect
%TASK_ENGINE% /taskIndex 2 /manifest %MANIFEST%
@echo Task 3: Robocopy
%TASK_ENGINE% /taskIndex 3 /manifest %MANIFEST% Robocopy.exe “Protected” %DESTINATION_FOLDER% *
@echo deleting SmoothStreams folder
RMDIR /S /Q %SMOOTH_FOLDER%
@echo deleting Protected folder
RMDIR /S /Q %PROTECT_FOLDER%
@echo Job finished
The output (PlayReady protected smooth streaming files) will be located in the folder as specified by