Page 1 of 1

Remaining time in playlist

Posted: 14 Sep 2019 08:03
by STEPHANK
Hi,

I am playing files from an m3u file. VLC shows the total time of the single mp3s (playlist total).

I there any way to show the remaining time? Or how much was played?

Thanks,

Stephan

Re: Remaining time in playlist

Posted: 05 Oct 2019 12:25
by STEPHANK
Anybody?

Re: Remaining time in playlist

Posted: 11 Nov 2019 14:05
by STEPHANK
So, it is impossible?

Re: Remaining time in playlist

Posted: 11 Nov 2019 21:50
by unidan
Hi,

Sorry for late answer,

It's currently not possible but will probably be in a later version with the new medialibrary.
Out of curiosity, where would you expect this information to be shown ?

Re: Remaining time in playlist

Posted: 24 Sep 2020 12:13
by greeter
Hello!

I don't see this being implemented, right? I think a good spot for remaining playlist time would be either of the two cycled areas: Image

Format should be something like: reverse count -> [mm:ss/mm:ss] <- total

Thanks!

Re: Remaining time in playlist

Posted: 24 Sep 2020 12:45
by Hitchhiker
That's because we're still on version 3.0 i.e the same one you were using when you posted originally. Series 4.0 will be released in the not too distant future (hopefully) and you can install a nightly build now if you wish to test it: https://nightlies.videolan.org/

Re: Remaining time in playlist

Posted: 24 Sep 2020 14:32
by greeter
Hm, that's a pretty radical departure from the old GUI. Here's what it looks when I open a playlist.

Image
Is remaining playlist time somewhere there? Because I can't see it. :!:

Re: Remaining time in playlist

Posted: 09 Jan 2021 16:12
by franc
I have the same issue, remaining time of the total playlist is not anywhere.
I am on Mac OS 10.11.6, I tried VLC 4 nightly but this is still unusable and neither can I find the remaining playlist time :(

Is there maybe another media player who can do that?

Re: Remaining time in playlist

Posted: 10 Jan 2021 14:34
by franc
OK, I changed Ben Trevor's Script "vlc-total-playlist-duration-extension" a bit, now this extension shows also the remaining time, see my entry in another forum:
Playlist auf NAS abspielen - gesamte restliche Zeit der Playlist anzeigen
The ToDo is an auto refresh and a shortcut to launch (if possible).
But at least it works :)

Re: Remaining time in playlist

Posted: 10 Jan 2021 16:14
by roland1
@franc
modified to react on play/pause/stop and changed input (vlc 3):

Code: Select all

-- Playlist total duration -- Simple extension that shows the current playlist's total duration -- Lua scripts are tried in alphabetical order in the user's VLC config directory -- lua/{playlist,meta,intf}/ subdirectory on Windows and Mac OS X or in the user's -- local share directory (~/.local/share/vlc/lua/... on linux), then in the global -- VLC lua/{playlist,meta,intf}/ directory. -- 2021-01-10: extended to show the remaining time of the whole playlist _and_ the whole playlist time: -- <remaining time in total playlist> / <total playlist time> e.g.: -- 01:26:22 / 02:58:01 -- ToDo: auto refresh -- original code from: -- https://github.com/bentrevor/vlc-total-playlist-duration-extension -- Extension description function descriptor() return { title = "Playlist total duration" ; version = "1.2" ; author = "Ben Trevor" ; shortdesc = "Displays dialog box with played, remaining and current playlist's total duration"; description = "Displays a dialog box with the played time, the remaining time and the total play time of a playlist. Refresh only on Button press" ; ------------------------------------------------------ capabilities = {"playing-listener", "input-listener"}, -- capabilities = { } ------------------------------------------------------ } end -- Activation hook function activate() window = vlc.dialog("Playlist: played / remaining / total") window:add_button("refresh", update_duration, 1, 1, 1, 1) time_label = window:add_label("", 2, 1, 1, 1) get_playlist_duration() window:show() end function update_duration() get_playlist_duration() end function get_playlist_duration() -- playing time of total playlist local total = 0 -- played time in actual track local track_played_time = 0 -- played time in total playlist local act_pl_position = 0 -- remaining time in total playlist local rem_pl_time = 0 -- gives a float between 0 and 1 for the actual position of the actual track, unfortunately... -- ...the function: vlc.player.get_position() is not working, neither is vlc.player.get_time() ------------------------------------------------------ local inp = vlc.object.input() if inp then track_played_time = vlc.var.get(inp, "position") end -- track_played_time = vlc.var.get(vlc.object.input(), "position") ------------------------------------------------------ -- iterates the whole playlist for key, value in pairs(vlc.playlist.get("playlist", false).children) do -- if the actual track is reached in playlist, get the played time in playlist if value.id == vlc.playlist.current() then -- duration of actual track * position in actual track (float between 0 and 1) + total (since this track) act_pl_position = total + track_played_time * value.duration end -- if the duration is not available it is -1 if value.duration ~= -1 then total = total + value.duration end end -- remaining playing time is total - actual playing time position in playlist rem_pl_time = total - act_pl_position -- actual playing time in playlist / remaining time in playlist / total time in playlist (hh:mm:ss / hh:mm:ss / hh:mm:ss) time_label:set_text(seconds_to_time(act_pl_position) .. " / " .. seconds_to_time(rem_pl_time) .. " / " .. seconds_to_time(total)) return total end -- convert time to readable format (hh:mm:ss) function seconds_to_time(seconds) local hours = math.floor(seconds / 3600) local minutes = math.floor((seconds % 3600) / 60) local seconds = math.floor(seconds % 60) -- leading 0 for 1 to 9 if hours < 10 then hours = "0" .. hours end if minutes < 10 then minutes = "0" .. minutes end if seconds < 10 then seconds = "0" .. seconds end -- returns hh:mm:ss return hours .. ":" .. minutes .. ":" .. seconds end -- Deactivation hook function deactivate() end -- stop the extension when the dialog window is closed function close() vlc.deactivate() end -- stops debug error messages, which stops vlc from crashing. I'm still not sure why... ------------------------------------------------------ input_changed = update_duration playing_changed = update_duration ------------------------------------------------------ function meta_changed() end

Re: Remaining time in playlist

Posted: 10 Jan 2021 20:48
by franc
Thank!!