Add possibility for autoplay to follow timed scheduling rules similar to .htaccess

Feature requests for VLC.
jahan
New Cone
New Cone
Posts: 4
Joined: 20 Dec 2019 01:00

Add possibility for autoplay to follow timed scheduling rules similar to .htaccess

Postby jahan » 17 Jan 2020 20:03

Hi all,

As described below this is the feature that I'm desperately trying to implement cause it looked interesting to me and I thought it's a good start to deep dive into VLC.
I'm completely new to VLC even though I already sent a trivial pull request [git]https://code.videolan.org/videolan/vlc-android/commit/b7ebee1e9d6b03b12176c1acd79e4b5e5e13d15f[/git] ;-)

It's on [ticket]https://trac.videolan.org/vlc/ticket/23005[/ticket] as well.
We have lots of videos on a memory stick our kids are watching. We would like to schedule videos so that (for example) in the morning only files or folders containing physical activities (sports etc.) are playing (when in autoplay mode) and near the sleeping times only sleepy videos are playing.

Someone has suggested crontab scheduling in ticket #4619, but we are looking for something that works transparently within the autoplay.

We could achieve this by adding a file similar to .htaccess into file folders. The file could configure play times for either the whole folder or specify on a file-to-file basis what time the file can be played through the autoplay. For example (the fileset syntax could be similar to java Ant fileset):

Code: Select all

<playtimegroup start="8:00" end="10:00"> <fileset dir="."> <include name="**/*.*" /> <exclude name="**/*sleep*" /> </fileset> </playtimegroup>
You could specify one or more playtimegroup in each .playtimegroup file.

The default setting would also be that if a significant portion (e.g., more than 4 minutes) of the video is still playing while the playing time window ends, autoplay would skip to next video. You could change this setting with an attribute spilloverlimit="180" seconds to the playtimegroup tag, for example.

Furthermore, because this would require minimal GUI changes (maybe some kind of notification if some files queued into autoplay are skipped due to timing restrictions), the feature should be rather easy to implement. Due to its good effort to benefits ratio, I would also give the feature a high priority (ability to create high goodwill with modest effort).
Here are paths I went down:
  • Trying to implement it using Lua to let it be as unobtrusive as possible which failed when I learned that `vlc.playlist` object is not accessible in playlist module on android.
  • The second try was changing the stream_filter.c and neighbor files under [url]https://code.videolan.org/videolan/vlc/blob/master/modules/lua/stream_filter.c[/url] to enable access to vlc.playlist object in lua scripts.
  • Third try was looking at AbstractPlaylist.cpp [url]https://code.videolan.org/videolan/vlc/blob/master/modules/demux/adaptive/playlist/AbstractPlaylist.cpp[/url] and trying to extend it to meet the above requirement.
  • And last one was imitating m3u.c [url]https://code.videolan.org/videolan/vlc/blob/master/modules/demux/playlist/m3u.c[/url] and buidling it at vlc core so that it will be portable to any platform.
What do you think of my approach and which route do you recommend to give it a go?
Appreciate any help to a newcomer to join the VLC community of contributors.

Cheers,
Jahan

Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 35 guests