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

9
Score 80.6%
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 \lua\extensions\ folder;
2) "time_intf.lua" > Copy the VLC Interface Lua script file into \lua\intf\ folder;
3) Start the Extension in VLC menu and configure the Time interface to your liking:
- Windows/Linux: "View > Time v3.x (intf)";
- Mac OS: "Vlc > Extensions > Time v3.x (intf)".

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]

Lua 5.1! like in VLC-32bit for Windows (later I will fix it for Lua 5.2/5.3)
INSTALLATION location \lua\extensions\ for an Extension script (Create directory if it does not exist! Then Interface script in \lua\intf\):
* 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/

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

v3.2 (intf) (27.8.2018) 1 year ago

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

bpinto

6 months ago

at line 258. I changed from "loadstring" to "load" at the Get_config function of the time_ext.lua.

Report

C

mederi

6 months ago

Thanks. VLC for Windows contains Lua 5.1 interpeter. Loadstring has really disappeared in Lua 5.2 and 5.3. I did not know, that Linux useres can use different/newer Lua version. Then you should fix it in time_intf.lua, too. Perhaps the rest of the code will work. The active _intf script is the main one doing all the running time in a playing video and the _ext script is the control panel and the settings dialog box, where you can activate the _intf script. What do you mean by "to see real time"? Is it [E] elapsed time or [T] system time?

Report

bpinto

6 months ago

ok, _ext isn't activating _intf as far as I understand, because with/without changing the _intf the result is the same..., it's something between the two...

Report

bpinto

6 months ago

I also changed the time_intf.lua and still doesn't work. The debug also doesn't help me on this one for now. Well I want to record a video and the that the real time of the recording be on the video when I play it again later on. That's what I call real time recording :) . I'm looking software to do it on linux. Any ideas are welcome.

Report

C

mederi

6 months ago

_ext (Settings) helps you to set related VLC preferences for automatic activation of _intf when launching VLC. You can check them manually as described in the description here (Alternative activation ... >> luaintf (all checkboxes disabled!) & time_intf in related input fields). Then you should start VLC with logging into a file and then check the logs file (search time_intf activation):
vlc -vv --logfile=vlclog.txt, or vlc -vv 2>&1 > logfile.txt
What is Lua version you use? You can insert following line into time_ext, into activate() function, then check logs in messages window:
vlc.msg.info(_VERSION)
What video source are you trying to record (file, video stream, ...)? How do you record in VLC (View > Advanced controls > Record button)? You should transcode video, if you want to hardburn text overlay like subtitles. If it is system actual date/time only, then you can use marquee filter in VLC.

Report

bpinto

6 months ago

Hi, I have done something wrong :( . I don't get the "View > Time v3.2 (intf)" option. At the beginning again...

Yes I use the record button like you describe and I want to record a file. I went to see Lua version and strangely I have two: liblua5_1-5 and liblua5_3-5. Can this generate conflict?. I'm lost..., not to much experience...

I went to see marquee and as far as I understand, it display time but after recording when I play the video time is not there and I need it.

I will try again for a few day before I give up. Then I must find an easier solution to record video and real time and playback a video with time like in debut (only for windows).

thanks for your help :)

Report

C

mederi

6 months ago

This conversation nesting has shrinked the text in too narrow column on my computer (1152x864, 4:3) so I better start on the top again marked as [2-nd thread].

Report

unknow0059

7 months ago

I followed the instructions correctly. I selected the pattern [E]. I clicked Start. I played the video. The extension is not displaying the timestamp anywhere.

Report

C

mederi

6 months ago

I fixed the description here as upgrade of the portal removed all backslashes. I understand that paths were confusing without backlashes.

Report

C

mederi

7 months ago

\lua\intf\time_intf.lua
\lua\extensions\time_ext.lua
Then SETTINGS in dialog box to set the automatic activation of the intf script. Actually the Interface script is the main one doing all the running time in a playing video. It really should work on all 3 systems (Windows, Linux, MacOS) as happy users reported.

Report

unknow0059

6 months ago

I misread one of the folders as being luaintf instead of \lua\intf. It's now working as it should, thanks.

Report

baibhav

8 months ago

how to control and stop time in this version. how can i slow down the video in miliseccond

Report

C

mederi

8 months ago

Check the screenshots and read the instructions in description here.

Report

torr3

10 months ago

Hi. Is there a way to use this extension to calculate and display the record time of the video? If I know the start time of the video could I add the [E] time to that to get the record time displayed? Something like: 13:50:30 + [E] This would be very helpful to me. Thanks for your support and help!

Report

C

mederi

10 months ago

The code for [E+seconds] tag ([E+49830]):
local addend=tonumber(string.match(osd_output,"%[E%+(.-)%]"))
if addend then
osd_output = string.gsub(osd_output, "%[E%+.-%]", tostring(TIME_Time2string(et+addend, 0, not TIME_Enoms)))
end

Insert the code right above following line in "time_intf.lua":
local fps=tonumber(string.match(osd_output,"%[E(.-)%]"))

Report

torr3

10 months ago

Wonderful! Thank you!
Another question. How do I get the Time v3.2 information to be on the image when I use the 'Take Snapshot' function in VLC?
Thanks again!

Report

C

mederi

10 months ago

It is not supported in VLC. You can use an external screenshot taker (like IrfanView - hotkey C; you can switch VLC to Minimal Interface Ctrl+H).

Report

torr3

9 months ago

Hi again. Could you also please tell me how to calculate and display the record time of the video using the endtime of the video (instead of the start time, as I previously asked you)? So, if I know the endtime, perhaps the code would look like [(seconds-D)+E]. Many thanks for your help!

Report

C

mederi

9 months ago

Just store the duration in a new variable (dt) before it changes a number value to a formatted string:
local duration = vlc.input.item():duration()
local dt=duration
Then you can use your calculation: addend-dt+et (instead of et+addend).

Report

afa269

9 months ago

Hi, thanks for your help! I am working with torr3 on this. Can you please tell me how to create/store a new variable? Where should I type this: local duration = vlc.input.item():duration()
local dt=duration
Thanks a lot for your help!

Report

C

mederi

9 months ago

Find following line in "time_intf.lua":
local duration = vlc.input.item():duration()
Then insert next new line there:
local dt=duration

Report

afa269

9 months ago

Thank you very much, very helpful!

Report

frob

10 months ago

How do I change the position of the timer besides the nine options? I'm trying to place it further to the top left. Is there anyway to customize it?

Report

C

mederi

10 months ago

There is a workaround using marquee filter reading a text file (Tools > Preferences > Show settings=All > Video \ Subtitles/OSD
: [v] Marquee display
\ Marquee: Text file [D:\vlc-3.0.2+\portable\timemarquee.txt] / Position / Font / Misc).

Edit the "time_intf.lua" in a text editor, find following line:
vlc.osd.message(TIME_Decode_time_format(), 1111111111, TIME_osd_position)
Replace it with following new lines of code:
local f = vlc.io.open(vlc.config.userdatadir().."\\timemarquee.txt", "w")
if f then
f:write(TIME_Decode_time_format())
f:close()
end

I could add this option in Time extension in the future version.

Report

dementia

11 months ago

Instead of specifying the FPS in the [E] tag, you can get it from VLC directly. At that point, you can use it to create a new [F] tag if you wish, or use it to display the frame number in the time stamps, instead of milliseconds. NOTE: if a video file contains more than one video stream and they are at different frame rates, then the following code will need to be changed to detect which stream is actually playing.

Put the following code in the function TIME_Decode_time_format()

local input_object_info = vlc.input.item():info()
local key
local value
local fps
for key, value in pairs( input_object_info ) do
if value["Frame rate"] then
fps = value["Frame rate"]
end
end
if not fps then fps="--" end

Report

v3.2 (intf) (27.8.2018) 1 year ago

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

v3.1 (intf) (19.8.2018) 1 year 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 3 years ago

- fixed several bugs in Interface script;

old (before changes on this portal in September 2016) 1 year 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;

12345678910
13
product-maker sldgehammer Oct 25 2019 9 excellent
9 excellent
product-maker pascal Sep 28 2018 9 excellent
+
product-maker artistmatej Sep 12 2018 9 excellent
+Thank you very much! Now I can view FPS of my animation.
product-maker khant45 Sep 05 2018 9 excellent
Useful
product-maker GKidM-A-A-DCity Aug 27 2018 9 excellent
+
product-maker neokix Feb 18 2018 9 excellent
Love this script. I'm glad I can use it with VLC v3.0!!
product-maker NeM Feb 12 2018 9 excellent
Excellent extension
product-maker dimitrovden Jul 09 2017 9 excellent
product-maker Storm77 Apr 12 2017 9 excellent
product-maker ipers Feb 26 2017 9 excellent
product-maker CPaddict Dec 20 2016 9 excellent
product-maker Safranriz Oct 05 2016 9 excellent
product-maker 3demax Apr 08 2013 9 excellent
product-maker Base: 4 x 5.0 Ratings
yaanu
Sep 28 2019
lukas089
Apr 24 2019
jaramazovic
Feb 14 2019
praneet
Dec 28 2018
engdarkrosealchemist
Nov 13 2018
gu5tavo
Nov 09 2018
artistmatej
Sep 12 2018
arnoldwaswaiga
May 19 2018
neokix
Feb 18 2018
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
GPLv2 or later
version
updated Sep 01 2018
added Mar 19 2012
downloads 24h
85
mediaviews 24h 0
pageviews 24h 575
System Tags addon gplv2-later