VLC
MS communicates with VLC using the Web (http) interface module
Enable HTTP Interface
Open VLC:
- Tools Menu -> Preferences
- In the bottom left change Show Settings from
SimpletoAll - In the updated window select
Interface -> Main interfaces- In the Extra interface modules section enable Web and verify that
httpis shown in the textbox
- In the Extra interface modules section enable Web and verify that
- Select
Interface -> Main interfaces -> Lua- In Lua HTTP -> Password -> set a password in this box
- Click Save at the bottom to persist your changes
- In the bottom left change Show Settings from
- Restart VLC
- Verify the HTTP interface is accessible by navigating to
http://localhost:8080in your browser
If the interface is accessible, after typing in your password, VLC is now ready to be used by MS.
Setting VLC Interface and Port
These can be set by starting VLC from command line with specific options:
vlc --http-host yourHostIp:yourPortorvlc --http-port yourPortor- modify the configuration file for VLC by editing keys with the same values as from the command line (
http-hostandhttp-port)
Filename Parsing
If the file being played in VLC does not have ID3 tags/metadata information multi-scrobbler can attempt to extract artist, title, and album information from the raw filename using regular expressions. Mutli-scrobbler will only do this if there is no other information reported by VLC about these fields.
To extract this information use named capture groups in your expression matching the field that should be extracted: artist title and/or album. MS accepts multiple expressions, the first one that matches a filename will be used.
Example
Example usage in a file-based config:
[
{
"name": "MyVlc",
"enable": true,
"data": {
// ...
},
"options": {
"filenamePatterns": [
// Extracts artist and title from filenames that look like:
// My Artist - My Cool title.mp4
"/^\\s*(?<artist>.+?) - (?<title>.+?)\\.\\w+$/i"
],
// logs to DEBUG when MS tries to extract data from a filename
"logFilenamePatterns": true,
}
}
]
Vlc Information Reporting
If you find that VLC is incorrectly reporting track information (in its interface) but multi-scrobbler is not parsing it correctly it may be due to the name of the fields VLC is reporting. mutli-scrobbler uses the most common field name but does not cover all use cases. Before reporting an issue please turn on metadata logging and include output from your logs while it is turned on:
Metadata Logging Configuration
[
{
"name": "MyVlc",
"enable": true,
"data": {
// ...
},
"options": {
"dumpVlcMetadata": true
}
}
]
Configuration
- ENV
- File
- AIO
This is configuration for the ENV Config Type.
| Environmental Variable | Required? | Default | Description |
|---|---|---|---|
VLC_URL | No | localhost:8080 | |
VLC_PASSWORD | Yes |
Config Structure
This displays the structure of the File Configuration for a vlc type Source with all possible properties, their shape, and descriptions/types. Use this to understand how to write a valid config.
Config Example
This displays an example config file of a vlc Source File Configuration that adheres to the shown Config Structure.
- text mode lets you edit the JSON directly.
- tree mode gives you a guided point-and-click editing experience that always keeps the JSON syntax valid.
Both modes validate that the configuraion is correct. Any errors show up as squiggly lines.
After you finish editing, switch to text and then copy all text to get a completed config.
Config Example Mobile Experience
This displays an example config file of a vlc Source File Configuration that adheres to the shown Config Structure.
The example config file editor is meant for a larger screen experience so only the read-only example is shown. Please use this site on a tablet/laptop/desktop to enable file editor features.
[
{
"enable": true,
"name": "MyVlc",
"data": {
"url": "localhost:8080",
"password": "changeme"
}
}
]
Config Structure
This displays the structure of the all-in-one (config.json) configuration with all possible properties, their shape, and descriptions/types. Use this to understand how to write a valid config.
Select the vlc type from the respective sources node below, then expand it.
Config Example
This displays an example config file of a all-in-one (config.json) configuration that includes a vlc Source that adheres to the shown Config Structure.
- text mode lets you edit the JSON directly.
- tree mode gives you a guided point-and-click editing experience that always keeps the JSON syntax valid.
Both modes validate that the configuraion is correct. Any errors show up as squiggly lines.
After you finish editing, switch to text and then copy all text to get a completed config.
Config Example Mobile Experience
This displays an example config file of a all-in-one (config.json) configuration that includes a vlc Source that adheres to the shown Config Structure.
The example config file editor is meant for a larger screen experience so only the read-only example is shown. Please use this site on a tablet/laptop/desktop to enable file editor features.
{
"sources": [
{
"enable": true,
"name": "MyVlc",
"data": {
"url": "localhost:8080",
"password": "changeme"
},
"type": "vlc"
}
]
}