Time v3.2 Original

VLC Extensions

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

8
Score 67%
Description:

Time is VLC Extension that displays running time on the screen in a playing video.
(Extension script "time_ext.lua" + Interface script "time_intf.lua")
Features:
- supported tags: [E], [Efps], [D], [R], [T], [O], [P], [n], [_];
- 9 possible positions on the screen;
- elapsed time with milliseconds;
- playback speed rate taken into account for duration time;

Time v3.1+ (intf)
Simple instructions:
1) "time_ext.lua" > Copy the VLC Extension Lua script file into luaextensions folder;
2) "time_intf.lua" > Copy the VLC Interface Lua script file into luaintf folder;
3) Start the Extension in VLC menu "View > Time v3.x (intf)" on Windows/Linux or "Vlc > Extensions > Time v3.x (intf)" on Mac and configure the Time interface to your liking.

Alternative activation of the Interface script:
* The Interface script can be activated from the CLI (batch script or desktop shortcut icon):
vlc.exe --extraintf=luaintf --lua-intf=time_intf
* VLC preferences for automatic activation of the Interface script:
Tools > Preferences > Show settings=All > Interface >
> Main interfaces: Extra interface modules [luaintf]
> Main interfaces > Lua: Lua interface [time_intf]

INSTALLATION location luaextensions for an Extension script (Create directory if it does not exist! Then Interface script in luaintf):
* Windows (all users): %ProgramFiles%VideoLANVLCluaextensions
* Windows (current user): %APPDATA%VLCluaextensions
* 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/

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

Last changelog:

v3.2 (intf) (27.8.2018) 7 months ago

- option to disable milliseconds in elapsed time
- option to show system/ending time in "h:m" format

pablo_kks

8 months 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

9 months 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

9 months 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

9 months 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

9 months 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

9 months 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

9 months 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

9 months 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

9 months 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

pablo_kks

9 months ago

Still the same error occurs in the log file :(

Report

C

mederi

9 months ago

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

Report

pablo_kks

9 months ago

https://pastebin.com/GRZjMNyj

Report

C

mederi

9 months 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

9 months ago

https://pastebin.com/Dyssgw8X

Report

C

mederi

9 months 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

9 months 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

GregoireLeGrand

1 year ago

I like this add-on. Can I use it from commandline in a python script? I am working on a simple audiobook player for use by a blind person. I want to save position in the book and resume it later. Best wishes

Report

neokix

1 year ago

Love this script. I'm glad I can use it with VLC v3.0!!

Report

NeM

1 year ago

Mederi - Thank you for the reset preferences suggestion. The issue is gone now.

Report

NeM

1 year ago

Excellent extension

Report

NeM

1 year ago

Thanks mederi for releasing v3 for VLC 3 but I still see a minor issue. Could you check if it is just me or everyone else too? Steps to reproduce it:
Time format used: E:[O] -[R] [E]/[D]
1) open video
2) press f to enter fullscreen
3) press a to cycle through the aspect ratios settings
4) The time appears in center of the screen with a big black square background covering most of the video when it runs in these ratio settings: Default, 16:9, 4:3, 1:1, 16:10 and 5:4
5) The time appears correctly with no issues in these ratio settings: 2.21:1, 2.35:1, 2.39:1
6) The time appears correctly with no issues when video is not in fullscreen and in all aspect ratio settings.

Report

C

mederi

1 year ago

I cannot reproduce the issue. I have no problem here with default settings in VLC 3 (win32.7z package, portable - "portable" subfolder within vlc folder). Try to reset preferences. What OS, VLC version? You could further investigate the issue: video format, different video output module, enable/disable hardware acceleration, check the logs. You can wait for VLC 3.0.1 whether it gets better or not. Then probably you need to file a bugreport at https://trac.videolan.org/vlc

Report

NeM

1 year ago

Extension has stopped working correctly with VLC 3.0.0

Report

C

mederi

1 year ago

Fixed for VLC 3.

Report

lukkysv

1 year ago

Hi Mederi,
Many thanks for the plugin. Works like a charm for me on the latest version of VLC v2.2.6.

Want to bring to your attention, I was also using "VLC remote" by hobbyist software (https://hobbyistsoftware.com/vlc). I use it primarily to be able to control my VLC player for play/pause/playlist management etc. To my surprise, this suddenly stopped recognizing my VLC on my mobile(remote). I tried resetting preferences, and re-installing multiple times. But, with no luck. If Time 2.1 is installed, then "VLC remote" is not working, and if i run the "VLC remote helper", then Time v2.1 is not working.

Any insights for my enlightenment when you get some time here. Much appreciated.

Thanks again.. Nice work though.

Report

v3.2 (intf) (27.8.2018) 7 months ago

- option to disable milliseconds in elapsed time
- option to show system/ending time in "h:m" format

v3.1 (intf) (19.8.2018) 7 months ago

- fixed numeric locale issue on Mac
- VLC version detection so the script works also in older VLC versions
- auto-format time (s > m:s > h:m:s > D/h:m:s)
- percentage playback position tag [P]
- always show "Settings" dialog box for disabled interface script
- respect other enabled VLC interfaces when saving settings
- "Settings" button in "Control panel" dialog box
- ">STOPPED<" status in title bar
- "looper_intf.lua" script file renamed to "time_intf.lua"

v3.0 (intf) (11.2.2018) 66127 1 year ago

- fixed time in microseconds for VLC 3;

v2.1 (intf) (5.9.2016) 58019 2 years ago

- fixed several bugs in Interface script;

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

v2.0 (intf) (28.4.2016) 53798
- resurrection attempt;
- Interface script "looper_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/ending time;

File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
GPLv2 or later
version
updated Sep 01 2018
added Mar 19 2012
downloads today
70
page views today 357
System Tags addon gplv2-later