Log playlist automatically

Discuss your Lua playlist, album art and interface scripts.
frleon
New Cone
New Cone
Posts: 4
Joined: 26 Sep 2013 13:55

Log playlist automatically

Postby frleon » 27 Sep 2013 01:56

For statistics stuff I want to see when I played which file with VLC. I'd like the player to write the system time and the path of the file whenever it's starting to play a new one into a file, each datum in a new line (or something like that, as long as it's possible to evaluate it somehow).
Probably it's just a couple of code lines, but I have no idea how to get this done and it's not important enough for me to immerse myself into the matter. Thus my request: Could someone tell me how to do this or, if it turns out not to be much work in the end, just write an extension for me? Thank you much in advance,
Leon

drewkeller
Blank Cone
Blank Cone
Posts: 25
Joined: 17 Sep 2013 14:59

Re: Log playlist automatically

Postby drewkeller » 28 Sep 2013 18:58

I wrote one very similar to this, but instead of logging every played file, it only logs it when you press a hotkey (well, adds it to a playlist file). Basically, you load up a bunch of videos and then hit the hotkey for each one that's "interesting" for later editing and then end up with a playlist file of just those. To log for every file automatically, I think it would need to work as a meta script or playlist script (and possibly modified to work as one of those). Or maybe there is a libvlc function that would get triggered when vlc changes input.

I put it up here https://github.com/drewkeller/vlc-playlist-creator. There's an option to download it as a zip on the lower right of that page.

You can add a new format easily enough by adding a pattern in the patterns section near the top of the file (example below for what it sounds like you'd want). To get the system date, a new meta item would need to be added in GetMediaInfo() ({system_datetime} below), I imagine lua has a function that gets a system time/date.

Code: Select all

["log"] = { ["header"] = "timestamp,name,title,length_seconds,length,time_seconds,time", ["format"] = "{system_time},{name},{title},{length_seconds},{length},{time_seconds},{time}", },
The problem I'm having is VLC 2.1 doesn't seem to load the interface scripts, and interface scripts are the only type that accept hotkeys.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 4 guests