Difference between revisions of "Windows service"

From VideoLAN Wiki
Jump to navigation Jump to search
m (Added "Troubleshooting" section)
Line 24: Line 24:
  
 
4. Optional, add Service Description.
 
4. Optional, add Service Description.
4.1. Run regedit
 
4.2. Goto HKLM/System/CurrentControlSet/Services
 
4.3. Locate the Key with the same name you use on 3.1 or 3.2 (The service name)
 
4.4. Add a new String Value, the Key must be "Description" write whatever you want as service description.
 
  
5. Optional, add Service dependancy
+
== Troubleshooting ==
If you want this service to depend on another to delay execution, add a Key "DependOnService" of type REG_MULTI_SZ and write there the service name that this service is dependant. I put this service dependant on Tcpip service, this way the service VLC-CLASICAL does not start after having connection to the IP Network.
+
 
 +
=== VLC Windows Service Hangs ===
 +
From this [http://forum.videolan.org/viewtopic.php?f=14&t=50434#p211639 post] in the forums.
 +
 
 +
VLC as windows service (starting with 0.9.x and also with 1.x) sometimes hangs because it is actually trying to display the following dialog boxes:
 +
# "Privacy and Network Policy" dialog box (occurs the first time you run VLC, or if launched with the --reset-config option).
 +
# "Crash reporting" dialog (occurs the next time VLC is launched after a crash)
 +
 
 +
Using the following two options as part of the service installation command solves the issue:
 +
* --no-qt-privacy-ask
 +
* --no-qt-error-dialogs
 +
 
 +
for example:
 +
'''c:\Program Files\VideoLAN\VLC\vlc.exe -I ntservice --ntservice-install --ntservice-name=VLC-Service --ntservice-extraintf=rc --ntservice-options="--no-qt-privacy-ask --no-qt-error-dialogs ..." vlc://quit'''

Revision as of 16:16, 5 August 2009

Description

Windows service (called ntservice) is feature in VLC, which allows to run VLC as Windows service.

Usage help

copied from here

This config can be usefull to broadcast remote stations, recording internet radio propuse, etc.

I am sending you the final configuration for future reference:

1. To install the services, go to de command prompt Start->Run->cmd

2. Then go to the VLC install directory. (for example cd c:\software\vlc)

3. Install the Autoplay Stream Service, with an http Administrative remote console on ports 1080 and 1081.

3.1. Autoplay for radio station #1 (Clasical), output device directX audio #1: vlc -I ntservice --ntservice-install --ntservice-name=VLC-CLASICAL --ntservice-extraintf=http --ntservice-options="--http-host=0.0.0.0:1080 --volume=250 --directx-audio-device=1 --directx-audio-float32 --force-dolby-surround=2 http://dir.xiph.org/listen/1391606/listen.m3u"

3.2. Autoplay for radio station #2 (Jazz), output device directX audio #2: vlc -I ntservice --ntservice-install --ntservice-name=VLC-JAZZ --ntservice-extraintf=http --ntservice-options="--http-host=0.0.0.0:1081 --volume=250 --directx-audio-device=2 --directx-audio-float32 --force-dolby-surround=2 http://dir.xiph.org/listen/1003756/listen.m3u"

4. Optional, add Service Description.

Troubleshooting

VLC Windows Service Hangs

From this post in the forums.

VLC as windows service (starting with 0.9.x and also with 1.x) sometimes hangs because it is actually trying to display the following dialog boxes:

  1. "Privacy and Network Policy" dialog box (occurs the first time you run VLC, or if launched with the --reset-config option).
  2. "Crash reporting" dialog (occurs the next time VLC is launched after a crash)

Using the following two options as part of the service installation command solves the issue:

  • --no-qt-privacy-ask
  • --no-qt-error-dialogs

for example: c:\Program Files\VideoLAN\VLC\vlc.exe -I ntservice --ntservice-install --ntservice-name=VLC-Service --ntservice-extraintf=rc --ntservice-options="--no-qt-privacy-ask --no-qt-error-dialogs ..." vlc://quit