eugenedae / vlc-scheduler Goto Github PK
View Code? Open in Web Editor NEWBasic automation & scheduling for VLC media player. [Currently not actively maintained].
License: MIT License
Basic automation & scheduling for VLC media player. [Currently not actively maintained].
License: MIT License
Hi. Is it possible to add different schedules for different days of week.
For example on monday play 8:00 - 20:00
And on tuesday play 8:00 - 23:00
Thank You.
Does this code include scheduling sources for different days of the week? I'm trying to program different material for each day of the week that loops through multiple files until the next day triggers a new source.
I'm using this to queue .mp3 files, and I noticed instead of treating item_play_duration like a video when not set - playing until the end and changing - it's treating it like an image and repeating/restarting the .mp3 for 60 seconds if its shorter, or cutting it off early if its longer
i want to add different time for different folder how it possible
it is possible in one yaml file
Hi, my ads play through the primary videos and not after it's finished like said in the ReadMe.
Is this a setting that I missed or a fault in the program. Also is there a way to only play one ad at a time, or do I need to create separate sources for that? Here is my file:
sources:
- path: D:\mvidz Assets
shuffle: True
- path: D:\Mvidz Assets\Animations
shuffle: True
play_every_minutes: 15
vlc:
path: 'C:\Program files (x86)\VideoLan/VLC\vlc.exe'
Hello! I really like the program and it will be very useful for me. Unfortunately there is a problem with the durations of the elements. The elements are read, the playlist is being built correctly and everything seems fine but on random occasions (absolutely random - I cannot find a reason) an element is played with the duration of the previous element thus it is cut in the middle if longer, or repeated several times if shorter. I think that another fellow here ( #2 ) is having the same problem but playing around with item_duration which I do not use.
I am using VLC 3.0.6 on Windows 7. Here is mycode:
sources: - path: D:\FOLDER\S1 shuffle: true - path: D:\FOLDER\A1 shuffle: true - path: D:\FOLDER\C1 shuffle: true - path: D:\FOLDER\A2 shuffle: true - path: D:\FOLDER\B1 shuffle: true - path: D:\FOLDER\B2 shuffle: true - path: D:\FOLDER\R1 shuffle: true - path: D:\FOLDER\B3 shuffle: true - path: D:\FOLDER\A3 shuffle: true - path: D:\FOLDER\C2 shuffle: true - path: D:\FOLDER\A4 shuffle: true - path: D:\FOLDER\B4 shuffle: true - path: D:\FOLDER\R2 shuffle: true - path: D:\FOLDER\A5 shuffle: true - path: D:\FOLDER\D1 shuffle: true - path: D:\FOLDER\C3 shuffle: true - path: D:\FOLDER\A6 shuffle: true - path: D:\FOLDER\B5 shuffle: true - path: D:\FOLDER\F1 shuffle: true
Nothing happens when the scheduled time comes. In the scheduler console it just says the video is playing, but does no display in vlc player. Any ideas?
After 2-3 days of uptime on remote computer very often I find, that the package crashes with this traceback:
[19:31:44] Starting new HTTP connection (1): 127.0.0.1:8080
[19:31:44] Traceback (most recent call last):
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.7/http/client.py", line 1321, in getresponse
response.begin()
File "/usr/lib/python3.7/http/client.py", line 296, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.7/http/client.py", line 265, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/urllib3/util/retry.py", line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.7/http/client.py", line 1321, in getresponse
response.begin()
File "/usr/lib/python3.7/http/client.py", line 296, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.7/http/client.py", line 265, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "src/vlcscheduler.py", line 199, in main
loop.run_until_complete(main_coro())
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "src/vlcscheduler.py", line 184, in main_coro
await asyncio.gather(*tasks)
File "src/vlcscheduler.py", line 59, in player_coro
player.add(item.path)
File "/home/monitor/Documents/VLC-Scheduler/src/vlc.py", line 116, in add
return self._command('in_play', {'input': self._format_uri(uri)})
File "/home/monitor/Documents/VLC-Scheduler/src/vlc.py", line 106, in _command
return self._request('requests/status.xml', params=params)
File "/home/monitor/Documents/VLC-Scheduler/src/vlc.py", line 91, in _request
resp = self.session.get(urljoin(self.base_url, path), **kwargs)
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/requests/sessions.py", line 525, in get
return self.request('GET', url, **kwargs)
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/home/monitor/Documents/VLC-Scheduler/venv/lib/python3.7/site-packages/requests/adapters.py", line 495, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
So periodically I have to check state of its work. Could it be caused by PC's troubles or Python's?
I added a SMB folder, vlcscheduler.yaml:
sources:
- path: smb://192.168.1.200/some/folder/
This SMB share requires username/password authentication. I don't see where to configure that.
VLC Scheduler just says:
Error: The source path is not a directory: smb://192.168.1.200/some/folder/
Can you document how this is intended to work with SMB?
Hello,
Very excited about the promise of VLC Scheduler.
Our YAML file is located in the same directory as the application, but on launch we are getting this error:
"FileNotFoundError: Cannot find the configuration file vlcscheduler.yaml in any of these places: /private/var/folders/69/f3vs7lnx55500pbdz4lx3r5h0000gr/T/AppTranslocation/8F0E6273-61CA-47F7-9A2C-6529700223B7/d/VLC Scheduler.app/Contents/MacOS/../../..."
Any advice is appreciated.
OsX10.13/VLC 3.04
Currently the app crashes and closes its terminal windows before I have a chance to read anything about why it may be crashing.
Could a flag be added to not close on failure?
I am on Windows 10 running VLC 3.0.6 64 bit. I can see VLC open for a moment then close and on the terminal window I see the names of my files load but not enough time to read why it crashes.
Is it possible to download a 32bit version for windows? Cant get the build to work
Even though my yaml file looks like this:
sources:
- path: D:\OneDrive\Videos\Test
media_recursive: false
source_mixing_function: "chain"
image_play_duration: 5
When I run vlc-scheduler, sometimes it ignores those settings.
I confirmed this via debugging the source code and adding a breakpoint right after
from config import config, logger
in vlcscheduler.py
Four times out of ten my settings are ignored and config looks like this:
While this is how it should look:
I can't figure out what's causing this.
Help :) ?
I'm just dipping my toes in the water here, and I've gotten things to work with a folder of files. But when I point to a folder with an .m3u file, it either (depending on the yaml syntax) crashes on launch, or starts up VLC and opens the playlist viewer, but the playlist is empty. Here's the yaml as it is ATM:
sources:
- path: E:\Media II\Movies II\Animation\Superman.Fleischer.1941-1943.x264-HANDJOB\playlist
shuffle: false
MEDIA_EXTENSIONS: ('.mp4', '.avi', '.mov', '.mkv')
PLAYLIST_EXTENSIONS: ('.m3u')
It's not easy to put it down in words, but this is what I mean:
Notice how the second and third time 5_Sec_video.mp4 is played, the duration remains at 11 second.
By changing the sleep time from 0.25 to 1 in
vlcscheduler.py
if play_duration == 0: await asyncio.sleep(0.25) play_duration = player.status().get('length', 0)
This issue seems to be solved (play duration matches file duration)
PS: First I tried asyncio.sleep(0.5) but the issue still occurred, although not as frequently
tried this option with the win build hosted, and it seems to have no effect, just always doing zip sort
Hi,
I've made some modifications to the code that I'd like to share but im pretty new to GitHub so I don't know how to upload them.
The modifications I've done are:
1 - Sources can now have days of the week to be played
- path: C:/Videos
playing_days: MON-TUE-WED-THU-FRI-SAT-SUN (if not defined, it will play every day)
2- Sources can now be set so that adjust the starting video to the time of the day. For this playing_time has do be set too.
For example, if a source is played from 10:00 to 12:00, and we start the VLC_Scheduler at 1:00, then it will start for the "middle" of the folder.
- path: C:/Videos
adapt_to_hours: true (false by default, always start from the beginning)
If more than one source are playing at the same time, one of them set to adapt_to_hours: true is enough for all the playlist to adapt.
3- Each file can now have a different playing time.
name_of_file t_100.jpeg
This will play the image for 100 seconds.
4- Each file can have a "sleeping" time after being played.
name_of_file s_100.jpeg
This will sleep the playlist for 100 seconds after playing the file. If a source is defined as sleeping: true, then that file will play during those 100 seconds, if not VLC will minimise.
- path: C:/Videos
sleeping:true
5- VLC minimises automatically when nothing is being played, and maximises automatically on the next rebuild.
6- If a source is defined as manual:true, then those videos are never automatically played, but instead a person can press buttons 1 to 9 to run them and then go back to the playlist.
So far only 9 files are accepted in the folder.
- path: C:/Videos
manual:true
Im happy to share with anyone who'd like to give it a try. I've been testing it for the last week now and its been working fine, but happy for other to test as I'm not an expert on python.
It'd be very useful to remember where we were at in the schedule.
Thank you for this wunderfull script.
How do I use the option: [] for vlc? would like to start vlc fullscreen and without audio?
VLC-Scheduler is always zipping files, even when source_mixing_function is set to chain.
Now is:
primary_playlist = Playlist( name='PRIMARY', **default_playlist_config, recursive=config.MEDIA_RECURSIVE, ignore_playing_time_if_empty=config.IGNORE_PLAYING_TIME_IF_PLAYLIST_IS_EMPTY )
Should be:
primary_playlist = Playlist( name='PRIMARY', **default_playlist_config, recursive=config.MEDIA_RECURSIVE, ignore_playing_time_if_empty=config.IGNORE_PLAYING_TIME_IF_PLAYLIST_IS_EMPTY, source_mixing_function=config.SOURCE_MIXING_FUNCTION )
Hi,
Thanks for creating VlcScheduler, It has very useful for me. Actually I'm having problems when I try to schedule an path folder, the program fails when I set this param on vlcscheduler.yaml config file. I'm running VlcScheduler on Raspberry Pi which uses Raspbian as operative system.
How can I solve this?
Regards
Traceback (most recent call last):
File "vlcscheduler.py", line 199, in main
loop.run_until_complete(main_coro())
File "/usr/lib/python3.5/asyncio/base_events.py", line 466, in run_until_complete
return future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "vlcscheduler.py", line 119, in main_coro
primary_playlist.add_source(source)
File "/home/pi/VLC-Scheduler-0.3.2/src/playlist.py", line 50, in add_source
self._sources.append(self.prepare_source(source))
File "/home/pi/VLC-Scheduler-0.3.2/src/playlist.py", line 43, in prepare_source
in utils.parse_time_interval(source['playing_time'])
File "/home/pi/VLC-Scheduler-0.3.2/src/utils.py", line 36, in parse_time_interval
return match[1], match[2]
TypeError: '_sre.SRE_Match' object is not subscriptable
This how I config the YAML file
good day. Firstly, thank you for your work !!! Everything works fine on windows.
There is a problem on Linux - it does not start.
In the last 2 builds, he swears at the same thing
"loop.run_until_complete..."
Here is the error log. Perhaps you have the opportunity to fix this?
Traceback (most recent call last):
File "src/vlcscheduler.py", line 221, in main
loop.run_until_complete(main_coro())
File "/usr/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
return future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "src/vlcscheduler.py", line 141, in main_coro
primary_playlist.add_source(source)
File "/home/muzik/VLC-Scheduler-0.3.1/src/playlist.py", line 50, in add_source
self._sources.append(self.prepare_source(source))
File "/home/muzik/VLC-Scheduler-0.3.1/src/playlist.py", line 43, in prepare_source
in utils.parse_time_interval(source['playing_time'])
File "/home/muzik/VLC-Scheduler-0.3.1/src/utils.py", line 36, in parse_time_interval
return match[1], match[2]
TypeError: '_sre.SRE_Match' object is not subscriptable
I'm using the last compiled Windows release, v0.3.2. Python 3.8.0 64bit,
The readme and yaml example both say to use square brackets when round brackets are required (tuples vs. lists)
It's unclear which yaml parameters are meant to be nested under sources and which are not
Also, .nfo files are let through regardless of media extensions parameter (any others?)
I was able to use the following workaround to overcome the issue with the "FileNotFoundError" message.
However, when I launch VLC Scheduler I am currently getting one line of output. (See attachment)
The VLC player does not launch or attempt to play the content that resides in the path folder.
The screenshot you included on the GitHub project looks much more verbose, compared to what I'm currently seeing.
Am I doing something wrong?
Currently, my YAML file is very short & sweet:
sources:
- path: /Users/MY_USERNAME/horizontal_images
- item_play_duration: 5
Hi EugeneDae,
I'm having problems running the code on my raspberry pi (with python3.7). I'm running VLC Scheduler at every boot, but sometimes the code gives me an error with the http server. The code puts the file in the playlist but the files are not reproduced by vlc player. I tried with default address (127.0.0.1:8080) but isn''t works.
Can you help me?
Regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.