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:
The following is required for running Transform Manager job from command line:
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 commandline:
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
<body> <seq> <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="" /> </seq> </body>
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):
@echo offrem Running Transform Manager Job Template in command linerem keyseed XVBovsmzhP9gRIZxWfFta3VVRPzVEWmJsazEJ46Irem instanceID 20120501134250_66232A9905A844749A9404A8146E303A
SET INSTANCE_ID=%1@echo INSTANCE_ID=%INSTANCE_ID%SET TASK_ENGINE="%systemdrive%\Program Files\IIS\Transform Manager\TaskEngine.exe"SET RUNNING_FOLDER=%systemdrive%\inetpub\media\Transform Manager\WF_MP4_SS_PR\WorkQueue\RunningSET DESTINATION_FOLDER="%systemdrive%\Workspace\Destination\TM_CommandLine_Output\%INSTANCE_ID%"SET MANIFEST="%RUNNING_FOLDER%\%INSTANCE_ID%\%INSTANCE_ID%.smil"
SET SMOOTH_FOLDER="%RUNNING_FOLDER%\%INSTANCE_ID%\SmoothStreams"SET PROTECT_FOLDER="%RUNNING_FOLDER%\%INSTANCE_ID%\Protected"
@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 folderRMDIR /S /Q %SMOOTH_FOLDER%
@echo deleting Protected folderRMDIR /S /Q %PROTECT_FOLDER%
@echo Job finished
The output (PlayReady protected smooth streaming files) will be located in the folder as specified by