Difference between revisions of "Control VLC via a browser"

From VideoLAN Wiki
Jump to navigation Jump to search
 
m (Add page to Category:Control VLC)
 
(14 intermediate revisions by 11 users not shown)
Line 1: Line 1:
It is now possible to Control VLC via a browser.
+
{{howto|Use the HTTP interface to control VLC from a web browser}}
 +
[[Image:VLC http intf.png|thumb|right|The new HTTP interface in VLC 2.0]]
 +
[[Image:Android webintf.jpg|thumb|right|The new Mobile interface in VLC 2.0]]
 +
* [[Documentation:Modules/http_intf#VLC_2.0.0_and_later|Start VLC on the server with the Web Interface]].
 +
* Type the IP address (or URL) of the host in the location field (address bar). You may need to specify the port (VLC defalts to using port 8080)
 +
*: An example is http://127.0.0.1:8080 - 127.0.0.1 refers to the local machine.
 +
* If you want to control VLC from a computer that is not the one running VLC then you will need to enable access in the .hosts file (from 0.9.6 onwards)
 +
* Add the files to be streamed to the playlist like /home/file.mpg (unless you use the UI to select the file in the next step)
 +
* Add streaming destination to the server in the sout field udp://<client>:1234, using these steps in the UI:
 +
**Go to File -> Open File
 +
**Click Browse to select the file you want to play
 +
**Select Stream/Save and click Settings
 +
**Optional: Select Play Locally to make sure everything is working correctly
 +
**Select UDP and fill in the client IP address and port number (default: 1234)
 +
**Click OK, OK, and press play
 +
* Open VLC on the client to receive the video stream, in one of two ways:
 +
**At the terminal, with '''vlc udp://@:1234'''
 +
**Start up VLC normally
 +
***Go to File -> Open network stream...
 +
***Leave the default options (Radio button UDP selected, port set to 1234)
 +
***Press OK
  
To use this interface as the primary interface, launch vlc with the parameter -I http or set http to be the primary interface via the preferences. To launch it as a secondary interface you should launch vlc with the parameter --extraintf=http or set http as an extra-interface in the preferences.
+
Note: the VLC Web Interface does not have an option to adjust the server's input stream. Direct to the host is required for changing the input media.
  
Now when you start VLC, a web interface will be created on port 8080. The options --http-addr and --http-port can be used to specify an IP and the port on which you want to run the interface.
+
[[Category:Control VLC]]
 
 
It is now also possible to customize the Web interface. See the html pages in share/html (within the VLC directory for Windows, within the VLC.app package on Mac OS X and somewhere in /usr/local for Linux). This can be a very cool interface if you spent some time developing nice UI elements. If you would like to contribute a new 'Default' html interface, you are also very welcome (keep it small).
 
 
 
Back to Additional Interfaces
 
Back to HomePage
 

Latest revision as of 07:34, 22 January 2019

This page describes how to use the HTTP interface to control VLC from a web browser. Other "how to" pages
The new HTTP interface in VLC 2.0
The new Mobile interface in VLC 2.0
  • Start VLC on the server with the Web Interface.
  • Type the IP address (or URL) of the host in the location field (address bar). You may need to specify the port (VLC defalts to using port 8080)
    An example is http://127.0.0.1:8080 - 127.0.0.1 refers to the local machine.
  • If you want to control VLC from a computer that is not the one running VLC then you will need to enable access in the .hosts file (from 0.9.6 onwards)
  • Add the files to be streamed to the playlist like /home/file.mpg (unless you use the UI to select the file in the next step)
  • Add streaming destination to the server in the sout field udp://<client>:1234, using these steps in the UI:
    • Go to File -> Open File
    • Click Browse to select the file you want to play
    • Select Stream/Save and click Settings
    • Optional: Select Play Locally to make sure everything is working correctly
    • Select UDP and fill in the client IP address and port number (default: 1234)
    • Click OK, OK, and press play
  • Open VLC on the client to receive the video stream, in one of two ways:
    • At the terminal, with vlc udp://@:1234
    • Start up VLC normally
      • Go to File -> Open network stream...
      • Leave the default options (Radio button UDP selected, port set to 1234)
      • Press OK

Note: the VLC Web Interface does not have an option to adjust the server's input stream. Direct to the host is required for changing the input media.