Time v3

VLC Extensions

Source (required if based on other people's work):

2
Score 63%
Description:

Time is VLC extension that displays running time on the screen in a playing video.
(Extension script "time_ext.lua" + Interface script "looper_intf.lua")
Features:
- supported tags: [e], [efps], [d], [r], [t], [o], [n], [_];
- 9 possible positions on the screen;
- elapsed time with milliseconds;
- playback speed rate taken into account for duration time;

Time v2.x/v3 (intf)
Simple instructions:
1.) "time_ext.lua" > Copy the VLC Extension Lua script file into \lua\extensions\ folder;
2.) "looper_intf.lua" > Copy the VLC Interface Lua script file into \lua\intf\ folder;
3.) Start the extension in VLC menu "View > Time v3 (intf)" or "Vlc > Extensions > Time v3 (intf)" on Mac OS X and configure the Time interface to your liking.

** The Interface script can be activated from the CLI (batch script or desktop shortcut icon):
vlc.exe --extraintf=luaintf --lua-intf=looper_intf
** Otherwise the Extension script (First run: "Time > SETTINGS" dialog box) will help you to set appropriate VLC preferences for automatic activation of the Interface script or you can do it manually in VLC Preferences:
Tools > Preferences > Show settings=All > Interface \
\ Main interfaces: Extra interface modules [luaintf]
\ Main interfaces \ Lua: Lua interface [looper_intf]
* Then use the Extension ("Time" dialog box) to control the active Interface script.
The installed Extension is available in VLC menu "View" or "Vlc > Extensions" on Mac OS X.

Time v1.0
The extension works in VLC-2.0.x. VLC archive: http://download.videolan.org/vlc/
Time is VLC extension (extension script "time.lua") that displays running time on the screen in a playing video.
Lite version of this extension - Time (lite): http://addons.videolan.org/content/show.php?content=149619

DOWNLOAD:
- save the .zip file
INSTALLATION:
- extract (unzip) the .lua file and put it in VLC subdir \lua\extensions\ (Interface script in \lua\intf\), by default:
* Windows (all users): %ProgramFiles%\VideoLAN\VLC\lua\extensions\
* Windows (current user): %APPDATA%\VLC\lua\extensions\
* Linux (all users): /usr/lib/vlc/lua/extensions/
* Linux (current user): ~/.local/share/vlc/lua/extensions/
* Mac OS X (all users): /Applications/VLC.app/Contents/MacOS/share/lua/extensions/
* Mac OS X (current user): /Users/%your_name%/Library/Application Support/org.videolan.vlc/lua/extensions/
(create directories if they don't exist)
- Restart VLC or just reload extensions (Tools > Plugins and extensions > Active Extensions tab: Reload extensions button).
USAGE:
Then you simply start the extension in VLC menu "View" or "Vlc > Extensions" on Mac OS X.

Forum: https://forum.videolan.org/viewtopic.php?f=29&t=97639
Last changelog:

v3.0 (intf) (11.2.2017) 66127 6 months ago

- fixed time in microseconds for VLC 3;

mvastola

25 days ago

This plugin is great, but is there any way you can remove the different editions for different VLC versions? At least between 2.2 and 3.0 the only difference is one line in the interface script, and the misc.version() method could be used to determine which code to use. Thanks!

Report

C

mederi

25 days ago

ok

Report

bowow0708

1 month ago

Hello I followed all the instructions for installation, but I can't seem to get it to work. I can see the interface alright and it's showing up in my extension tab, but the time stamp does not appear for me no matter what I try. I'm on el capitan Mac and tried using VLC 2.4.8, 3.0.0, and 3.0.4 with all appropriate files. any advice to help?

Report

C

mederi

1 month ago

I cannot test it on Mac as I am on Windows. It is important to copy/install the looper_intf.lua script file in the proper directory for interface scripts \lua\intf\. Then you have to activate the script in VLC. The extension script time_ext.lua installed in \lua\extensions\ and available in VLC menu can help you to set appropriate VLC settings on its first run. Later it is again available in VLC menu in the extensions's submenu. You can also manually check settings in VLC preferences (luaintf, looper_intf > some screenshots for different addon but lua seetings are visible there above the marked ones: https://hobbyistsoftware.com/VLCSetup-mac-manual). Successfully activated interface script is already displaying the time in a playing video or you simply check the activity of the interface script in logs in VLC menu (like in VLC for Windows: Tools > Messages). If the interface script is running in VLC, you can control it with the extension script in VLC menu.

Report

pablo_kks

1 month ago

Same here, maybe it simply doesn't work now for Mac? I have the interface but no time stamp. I am on High Sierra OS

Report

C

mederi

30 days ago

Mac is always different. You could help me to debug the sript on your Mac. You can check the logs with verbosity level 2=debug (⌘+Shift+m, https://wiki.videolan.org/Vlc_MacOS_Window/). Better if you check the logs from the start of VLC in a log file (VLC menu > Preferences > Show All > Advanced > Logging). Perhaps there should be just "lua" instead of "luaintf" in VLC preferences (>Interface > Main interfaces > Lua > Extra interface modules [luaintf] or just [lua]?). Please try it.

Report

C

mederi

27 days ago

Interface script location:
~/Library/Application/Support/org.videolan.vlc/lua/intf/looper_intf.lua
Then run VLC from command line (logging to vlc_log.txt file + interface script activation):
/Applications/VLC.app/Contents/MacOS/VLC --verbose=2 --file-logging --logfile=vlc_log.txt --extraintf=luaintf --lua-intf=looper_intf
Check the log file, post it at pastebin.com and then paste the link here.

Report

pablo_kks

25 days ago

https://pastebin.com/Dyssgw8X

Report

C

mederi

25 days ago

There should be more logs in the vlc_log.txt file.

Report

pablo_kks

24 days ago

https://pastebin.com/GRZjMNyj

Report

C

mederi

23 days ago

Thank you. I can see that the location of the script is correct and the VLC preferences settings or CLI options activating the script are correct, too (line 76 in the logs).
There is an error (line 83): "lua error: Error loading script .../Library/Application Support/org.videolan.vlc/lua/intf/looper_intf.lua:49: malformed number near '0.1'".
I do not know what it really means. Line 49 in the "looper_intf.lua" code is "Sleep(0.1)" function call. Could you try to edit the script in a text editor? Try to change the number that function call: "Sleep(.1)" or "Sleep(1)". Then check the logs whether it helped a bit. Then you could try to move "function Sleep(st) ... end" in front of "function Looper() ... end" so it is defined first before it is called.
The script works well in Windows and Linux, just not in the macOS. I need some clues to solve the issue or to report a VLC bug.

Report

pablo_kks

23 days ago

Still the same error occurs in the log file :(

Report

pablo_kks

21 days ago

Is there any chance that this problem will be fixed in near future? Maybe I can do more tests for you? It sucks that I can't have such a simple thing as time displayer in VLC on Mac.

Report

C

mederi

20 days ago

Are you sure if you just use the integer value "1" instead of "0.1" on the line 49: "Sleep(1)", that you get an error on the same line and not on a different one?
Could this error mean a locale issue and so not appearing on all Macs only on some of them, a decimal separator issue? What happens if you replace dot by comma in numbers (like 0.1 --> 0,1)?

Report

pablo_kks

20 days ago

"What happens if you replace dot by comma in numbers (like 0.1 --> 0,1)" – well... it's working!!! THANK YOU SO MUCH FOR YOUR PATIENCE, finally i can enjoy your lovely extension

Report

pablo_kks

20 days ago

Ok not there yet... it's partly working, only when I am launching VLC from the terminal using the command which you gave me.(/Applications/VLC.app/Contents/MacOS/VLC --verbose=2 --file-logging --logfile=vlc_log.txt --extraintf=luaintf --lua-intf=looper_intf)
Any ideas how to turn it permanent?

Report

C

mederi

20 days ago

The extension script "time_ext.lua" installed in "\lua\extensions\" and available in VLC menu can help you to set appropriate VLC settings on its first run only (VLC > Extensions > Time v3 (intf)). Next time it is available in the extensions's submenu after activation of the extension (VLC > Extensions > Time v3 (intf) > Settings). I hope it works. I need to improve this so it could always appear automatically if the interface script is not active. Otherwise you can set the settings ("luaintf", "looper_intf") manually in VLC preferences as described in some previous post here and in the main description (**) of the extension. Plese let me know whether it works. Thank you for cooperation. I will need your further assistance.

Report

pablo_kks

20 days ago

I was managed to activate it by typing "luaintf" in Tools > Preferences > Show settings=All > Interface \
\ Main interfaces: "Extra interface modules" text box and looper_intf in \ Main interfaces \ Lua: "Lua interface" text box but it is unstable. It is working when launching VLC, but has a problems with subtitles (showing only some of the lines) and after switching to another video add-on stops working completely and VLC its not showing any subtitles at all. Same every time I am launching VLC.

Report

pablo_kks

20 days ago

Same when launching VLC through terminal, add-on working only with first video, but causing problem with subtitles, with next video add-on is not working at all, neither the subtitles

Report

C

mederi

18 days ago

Does the Extension not work ( VLC > Extensions > Time: 2 dialog boxes: Settings and Control panel)?
Please try to edit the original Interface script "looper_intf.lua" and insert a following new line somewhere on the top whether it helps to recognize the dot in numbers as decimal separator:
os.setlocale("C", "all")

Report

pablo_kks

18 days ago

With "os.setlocale("C", "all")" in the interface script add-on seems to be working 100% correctly! :) I don't know only what you mean by this "settings", in VLC > extensions > I only have "Time v3 (intf)" and my another extension VLsub, I don't have any "settings and control panel". Could you clarify?

Report

C

mederi

17 days ago

I am glad we have the solution for the Interface script.

As for the Extension script, does the "Time v3 (intf)" dialog box window like in the picture at the top of the page here appear on the screen? It is the control panel for the running Interface script. Does it work? Can you customize the "Time format" during the playback of a video and is it remembered when you close VLC and play a video next time? You can watch messages for any errors/warnings (⌘+Shift+m, verbosity level 2=debug) when you click the "START!" button there.
Then if the "Time v3 (intf)" dialog box window is on the screen, do not close it and check again the VLC menu where you activated the Extension. Now the Extension "Time v3 (intf) > ..." should contain submenu consisting of "Control panel", "Settings" and "Deactivate" options. Here you can activate the "Settings" dialog box containing "[v] Enable Interface" checkbox, "[looper_intf]" input field and the buttons: "SAVE" and "CANCEL". The saving button should set the settings automatically for you. Please again watch the messages when you click it.
The "Settings" dialog box should automatically appear only on the very first activation of the Extension. Next time whenever you activate the Extension, only the "Control panel" should appear on the screen and the "Settings" are again available in Extension's submenu in VLC menu (VLC > Extensions > Time v3 (intf) > Settings). Is there any sumbenu at all after activation of the Extension when there is a dialog box on the screen?

Report

pablo_kks

17 days ago

Yes, Time v3 (intf) is the control panel and appears when I click it just like on the screen on this page, and it works fine, I can customize it whenever I want and it saves configuration for the next time I am lunching VLC, so like I sad I can fully enjoy add-on now thanks to that line you gave me added to interface script and activation made manually in VLC preferences. I don't see any errors in this "⌘+Shift+m" panel when I am clicking "START!". I am not sure what you mean by "verbosity level 2=debug" should I see it on this panel or type it somewhere? I still only have "time v3 (intf)" in vlc > extensions without any submenu and I am not following you how to activate this submenu

Report

C

mederi

16 days ago

So there is no extension's menu in VLC menu after activation of the extension on Mac. VLSub extension also uses the menu, but it has "Show help" and "Show config" button to acces another 2 dialog boxes. Then I will add the "Settings" button in my extension, too. Here I have uploaded a screenshots of VLC so you can see what I mean:
http://postimg.cz/images/xTAsF.png
Do you really not remember the "Settings" dialog box when you first activated the extension right after its installation? Please edit the extension scipt "time_ext.lua", last line (145) "bt_help = ..." within "function create_dialog() ... end" and insert next 2 new lines there for "Reset" and "Settings" buttons:
dlg:add_button("Reset", function() vlc.config.set("bookmark10", "") end,1,5,1,1)
dlg:add_button("Settings", function() trigger_menu(2) end,2,5,1,1)
Then activate the extension, click the "Reset" button, then close and reopen VLC and see whether there will automatically appear the "Settings" dialog box after activation of the extension. Please test it whether it works to enable/disable the Interface script.

As for the messages, here is the screenshot (Windows Vista):
http://postimg.cz/images/xTTAH.png
I searched the VLC forum for Mac:
https://forum.videolan.org/viewtopic.php?f=12&t=122697
So probably you do not need to worry about the messages verbosity level at all. If you see the debugging logs there (main debug: ..., lua debug: ...), then it is the verbosity level 2 (debug). If you launch VLC from the terminal, then you can use the VLC option " --verbose=2" or " -vvv" there. You can open the messages window before activation of the extension and then you can watch all the situation there.

Report

pablo_kks

9 days ago

As I remember after transferring the files into right directions I only had Time v3 (intf) in VLC -> extensions and thats it, I could lunch it but, nothing happened after clicking "START!", which I mention in the very beginning of this conversation and fortunately you figured out why. After adding new lines I have two "Time v3 (intf)"'s in VLC ->extensions, the first one like it was before, and second one with additional buttons. After clicking reset and relaunching VLC the extension is disabled and after clicking this second "Time v3 (intf)" (with two additional buttons) I have a settings screen first. Everything is working properly, only thing is that I have two "Time v3 (intf)"'s in VLC -> extension. How to remove the first one? (purely for esthetic reasons)

Report

v3.0 (intf) (11.2.2017) 66127 6 months ago

- fixed time in microseconds for VLC 3;

v2.1 (intf) (5.9.2016) 58019 1 year ago

- fixed several bugs in Interface script;

old (before changes on this portal in September 2016) 6 years ago

v2.0 (intf) (28.4.2016) 53798
- resurrection attempt;
- Interface script "time_intf.lua" + Extension script "time_ext.lua";
- new tags [efps]-elapsed frames (et*fps), [n]-name, [_]-new/next line;
- elapsed time with milliseconds;
- playback speed rate taken into account for duration time;

v1.0 (19.3.2012)
- works in VLC 2.0.x;
- supported tags: [e]-elapsed time, [d]-duration, [r]-remaining time, [t]-system time, [o]-over time;

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
GPLv2 or later
version
updated Feb 11 2018
added Mar 19 2012
downloads today
0
page views today 45
System Tags addon gplv2-later