DOWNLOAD / Windows & macOS / current version: 0.3.2.
Do you have a TV screen that plays media content non-stop? Do you want some of the content to play in the morning, and the rest during the rest of the day? Do you want to add new content to VLC as easily as dragging the file into a folder? VLC Scheduler, which is a tiny companion to the world’s best open source media player VLC, was made exactly for such purposes.
VLC Scheduler works with directories rather than individual media files. It scans the directories specified in its configuration file for media content, composes its own playlist and “feeds” it to VLC file-by-file.
You can share a directory with TV screen content over the local network (for example, via SMB or FTP) with your coworkers or family members. When they add or remove media files, VLC Scheduler would track those changes and update its playlist accordingly.
A1, A2, A3, A4
) and one with just a single file (B1
) — the resulting playlist would be: A1, B1, A2, B1, A3, B1, A4, B1
. This behavior can be changed using the source_mixing_function
parameter.playing_hours
parameter. Also — if the filename of a media file contains a date in the format that VLC Scheduler can recognize (e.g. 23-02-2019_birthday.mp4
), the file will only be played during that day.special: true
) contains one or more files, VLC Scheduler will only play those files — and nothing else — until they’re removed from the “special” directory. You will find this feature useful on the occasions when you need to air something of immediate importance, while putting aside all “regular” content.item_play_duration
parameter. Set it to 600
(seconds) and VLC Scheduler will change the view every 10 minutes. VLC will play the video from where it was left off if you configure VLC to always continue playback. image_play_duration
or item_play_duration
to control for how long they should be shown.playing_time
.vlcscheduler.yaml must reside at the same level as the program itself. (Advanced users, who want to move the configuration file to another location, should set the environment variable VLCSCHEDULER_YAML
to the full path that includes the filename of the configuration file).
macOS High Sierra/Mojave users: if you're getting the following error: FileNotFoundError: Cannot find <...> vlcscheduler.yaml in any of these places: <...>/T/AppTranslocation/<...>
, see the solution here.
The configuration must be expressed in YAML — if you don’t know anything about this format, read up on it a bit.
The only required parameter is sources
. In VLC Scheduler’s terms, a source is a path to the directory with media files, followed by the parameters that define how VLC Scheduler should play those media files.
Minimal configuration example:
sources:
- path: C:\Users\Administrator\Desktop\Videos
Now, let’s set playing_time
:
sources:
- path: C:\Users\Administrator\Desktop\Videos
playing_time: 09:00-22:00
Not hard, right? See also example.yaml.
These parameters are set for each source individually.
path
— (required) absolute path to the directory with media files. ~/
and variables are not supported.
playing_time: HH:MM-HH:MM
— (optional) the time interval during which the media files from the directory should be played. Use 24-hour clock. Example: playing_time: 09:00-22:00
(from 9 AM to 10 PM).
shuffle: true/false
— (optional) if set to true
, shuffles the media files from each directory. If set to false
, VLC Scheduler will get the files in alphabetic order. Default: false
.
recursive: true/false
— (optional) if set to true
, recurses into subfolders of each directory. Default is value of global config media_recursive which is itself defaulted to false
.
special: true/false
— (optional) if set to true
, marks a directory as special. Special directories are meant to stay empty most of the time. When a media file is added to such directory, VLC Scheduler puts aside all non-special content and only plays that file until it’s removed from its directory. Default: false
.
item_play_duration: seconds
— (optional) how much screen time each media file (an image or a video) should be given.
item_play_duration
is not set (or set to 0), each video will play until the end and each image will play for the time defined by image_play_duration
(which is — by default — 60 seconds).item_play_duration
is > 0:
item_play_duration
, it’ll play over again until item_play_duration
runs out.item_play_duration
, it’ll play only until item_play_duration
runs out. When it comes up again in the playlist, it’ll play from the start — unless VLC is configured to continue playback without asking.item_play_duration
is < 0 (a negative number, such as -600
:
-600
will be treated like 600
).abs(item_play_duration)
, it will play once.image_play_duration
is a top-level (general) parameter.Example: item_play_duration: 120
(120 seconds = 2 minutes).
play_every_minutes: minutes
— (optional) the content will be played only after X minutes. Such content is internally referred to as “ads”. If there is no content other than the “ads”, VLC Scheduler won’t play anything. VLC Scheduler doesn’t “pause” the currently playing media file to play “ads” — instead it waits for the media file to complete. The use of this parameter in conjunction with special: true
is not supported. Example: play_every_minutes: 30
.
These parameters are set globally.
source_mixing_function: "function_name"
— (optional) If you don’t want VLC Scheduler to ensure equal occurrence of the sources in the playlist, change this to chain
. Default value: zip_equally
.
media_extensions: [...]
— (optional) a list of filename extensions that defines the kinds of media files that VLC Scheduler should be looking for when scanning the directories listed in sources
. Note that each filename extension should be prepended with a dot and written in lowercase. Note that VLC Scheduler does not understand that .jpeg
and .jpg
belong to the same file format. Example: media_extensions: ['.mp4', '.avi', '.jpeg', '.jpg']
. For the default list of extensions see defaults.py.
media_recursive: true/false
— (optional) sets the default value for recursion of all sources. Default: false
playlist_extensions: [...]
— (optional) a list of filename extensions that defines the kinds of playlist files that VLC Scheduler should be looking for when scanning the directories listed in sources
. Note that each filename extension should be prepended with a dot and written in lowercase. Example: playlist_extensions: ['.xspf', '.m3u']
. For the default list of extensions see defaults.py.
ignore_playing_time_if_playlist_is_empty: true/false
— (optional) if set to true
, VLC Scheduler will ignore playing_time
of the sources if the playlist is empty. Default value: false
.
image_play_duration: seconds
— (optional) how long an image should be displayed on the screen if item_play_duration
is not set for the source. Default value: 60
.
vlc
— (optional) a dictionary of VLC-related parameters.
ping_urls
— (optional) a list of URLs to ping with the filename being started. Sends a JSON body as an HTTP POST. The JSON is simply {"name": "FILE_PATH"}
.
vlc:
# Path to VLC
path: '/Applications/VLC.app/Contents/MacOS/VLC'
# VLC HTTP server host — change only if you know what you’re doing
host: '127.0.0.1'
# VLC HTTP server port — change only if you know what you’re doing
port: 8080
# VLC HTTP server password — change if you need more security
password: 'vlcremote'
# Extra interfaces — change only if you know what you’re doing
extraintf: 'http,luaintf'
(Advanced users only).
Check your Python version with: python3 --version
.
If you want to make a binary, make sure to have Python 3.6 (see https://www.python.org/downloads/), because PyInstaller, the tool used to make VLC Scheduler into a binary, does not support Python 3.7 yet (as of writing).
If you just want to run VLC Scheduler as a Python script, you can use either Python 3.6 or 3.7.
Check if you already have virtualenv: virtualenv --version
. If you don’t:
pip3 install virtualenv
Download and extract the source code (or do git clone
) and cd
into the directory.
Create a new virtual environment and activate it.
macOS or any other *nix:
virtualenv venv --python=python3
source venv/bin/activate
Windows:
virtualenv venv --python=python3
call venv\Scripts\activate
Install the dependencies:
pip install -r requirements.pip
Create vlcscheduler.yaml and add at least one path
to sources
.
Run the script:
python src/vlcscheduler.py
On Windows:
Make.bat
On macOS:
make
In theory make
should also work on Linux, but it hasn’t been tested.
If everything goes fine, you will find either vlcscheduler.exe
(on Windows) or VLC Scheduler.app
(on macOS) in dist
directory.
Created by Eugene / Dae (dae@dae.me).
VLC folder icon by scafer31000.
License: MIT, see LICENSE.
Special thanks to: