This article describes a Windows service workaround to enable the Wowza Streaming Engine™ media server software Transcoder to use Intel Quick Sync hardware acceleration.
The Transcoder in Wowza Streaming Engine supports Intel Quick Sync hardware acceleration. On Windows, this acceleration relies on interaction with the hardware graphics drivers. In the Windows Vista and Windows Server 2008, Microsoft began isolating system services in a non-interactive environment called "Session 0 Isolation." Applications running in Session 0 Isolation don't have access to hardware drivers. This means that when Wowza Streaming Engine runs as a system service, it can't use hardware acceleration for transcoding.
You can try to work around this issue by creating a setup where Wowza Streaming Engine is started when a server is rebooted and the server runs in an environment with full access to the graphics hardware. The general steps involved are:
- Create a Windows scheduled task that runs Wowza Streaming Engine when a particular user logs on to the server.
- Configure the server to automatically log on after reboot.
Create Windows Scheduled Task
- Open Task Scheduler (Start > All Programs > Administrative Tools > Task Scheduler).
- On the Action menu, click Create Task action, set the following values, and then click OK:
- In Name, enter Wowza Streaming Engine.
- Click Change User or Group, and then select the user that will be used to automatically log on to the server and run Wowza Streaming Engine.
- Select Run only when user is logged on.
- Uncheck Run with highest privileges.
- Uncheck Hidden.
- Click the New button.
- In the New Trigger dialog box, in Begin the task, select At log on.
- In the Settings area, select Specific user, click the Change User button, and then select the same user as in the previous step (if not already selected).
- Clear all Advanced settings options except for Enabled, which must be selected.
- Click the New button.
- In the New Action dialog box, in Action, select Start a program.
- In the Program/script field, enter %WMSAPP_HOME%/bin/startup.bat.
- Leave the Add arguments (optional) field blank.
- In the Start in (optional) field, enter %WMSAPP_HOME%/bin.
Conditions tabClear the following options:
- Start the task only if the computer is idle for
- Start the task only if computer is on AC power
- Wake the computer to run this task
- Start only if the following network connection is available
- Select the Allow task to be run on demand option.
- Clear the Run task as soon as possible after a scheduled start is missed option.
- Clear the If the task fails, restart every option.
- Clear the Stop the task if it runs longer than option.
- Select the If the running task does not end when requested, force it to stop option.
- Clear the If the task is not scheduled to run again, delete is after option.
Set Server to Auto-Logon on RebootNext, we'll set Windows Server to automatically log on as the user for which you configured the scheduled task to run. There are several methods to configure Windows autologon. The following article describes a built-in method for setting up autologon:
- When using LogonExpert and the security setting Lock computer after logon, you may need to set the Delay computer lock for [x] seconds value to 20 seconds to enable Intel Quick Sync acceleration to work properly.
- Make sure that you configure power settings on the server such that the current user isn't automatically logged off and the server doesn't go into Sleep or Hibernation mode. Also, make sure to adjust power settings so that the server always runs at full performance.
- Running Wowza Streaming Engine in this manner shouldn't affect performance and should be as secure as when running it in standalone mode on a Windows computer. The autologon setup introduces a potential security issue because your Windows Server will always be running with a named user logged on to the system.
- When the Wowza Streaming Engine scheduled task is stopped or the user logs off the server, Wowza Streaming Engine is stopped abruptly and streams can't be closed gracefully. When this happens, not all internal events will be fired properly, which could lead to recorded files not being closed properly. One workaround for this is to always stop Wowza Streaming Engine by running the %WMSAPP_HOME%/bin/shutdown.bat script.