[Extension] Time

Discuss your Lua playlist, album art and interface scripts.
pisomojado
New Cone
New Cone
Posts: 7
Joined: 22 Aug 2013 04:43

Re: [Extension] Time

Postby pisomojado » 17 Sep 2021 05:38

Please provide instructions on how to use your extension. Specifically all these abbreviations: {E} / [D}[_][T]/-[R} etc. It took me a half an hour to figure it out.

brendanefro
New Cone
New Cone
Posts: 4
Joined: 15 Mar 2021 13:58

Re: [Extension] Time

Postby brendanefro » 27 Sep 2021 16:50

Hi Mederi!

Just wanted to ask if you've had any time to update this extension to VLC 4 yet?

Thank you!

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: [Extension] Time

Postby mederi » 03 Oct 2021 16:23

I have just uploaded updated time_intf.lua for VLC 4 in addons site. I could not make it work due to some msvc++rl error in VLC 4. Please try the script in your system.

brendanefro
New Cone
New Cone
Posts: 4
Joined: 15 Mar 2021 13:58

Re: [Extension] Time

Postby brendanefro » 03 Oct 2021 18:27

Hi Mederi, Thank you so much for updating this! Unfortunately though I'm getting this error message whenever I click the "Start" Button:
Image

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: [Extension] Time

Postby mederi » 06 Oct 2021 13:25


mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: [Extension] Time

Postby mederi » 13 Oct 2021 02:03

@brendanefro
Please try to edit the "time_intf.lua" script for VLC 4 in a text editor to replace 1111111111 with nil value in line 110> vlc.osd.message(TIME_Decode_time_format(), nil, TIME_osd_position)
What is your operating system?

brendanefro
New Cone
New Cone
Posts: 4
Joined: 15 Mar 2021 13:58

Re: [Extension] Time

Postby brendanefro » 14 Oct 2021 08:29

Ahhh that did it! Thank you so much. I'm using windows 10 and so far it seems to be working. I'll test it out and let you know if any problems occur. When I was using VLC 3 I modified the time_intf.lua to change the hours from 24 hour to 12 hour and also removed the decimal from the percentage. So I will make those modifications with this new file and see if that works as well.

Thank you again!

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: [Extension] Time

Postby mederi » 14 Oct 2021 15:46

Thank you for the feedback. It is not the proper fix, but I will work on it. I can report findings and discuss them with VLC developers.

bcourts
New Cone
New Cone
Posts: 9
Joined: 26 Feb 2014 03:28

Re: [Extension] Time

Postby bcourts » 11 Nov 2021 05:00

I apologize for posting here with an unrelated question, but I remember mederi being helpful before, and I hope I can get help again.
I contributed the Clipper extension several years ago, which created a playlist with user-specified start and end times for each file. I have created a new version (Clipper2) that actually creates clips using ffmpeg and has some convenient features. I would like to contribute that extension, but I don't understand the process. How can I contribute my new extension?

bcourts
New Cone
New Cone
Posts: 9
Joined: 26 Feb 2014 03:28

Re: [Extension] Time

Postby bcourts » 13 Nov 2021 21:57

I didn't find information on how to contribute a new extension to addons.videolan.org, so I went through the process myself and wrote down the steps required.

I posted a comment with those steps on https://forum.videolan.org/viewtopic.php?f=29&t=98644 (..Scripting in lua, Getting Started?)

I welcome suggestions for other appropriate places to post that information, or where to direct others who wish to share an extension.

franc
Blank Cone
Blank Cone
Posts: 53
Joined: 12 May 2007 10:06

Re: VLC extension: Time

Postby franc » 19 Feb 2024 12:59

Patches published at http://addons.videolan.org/content/show ... ent=149618
Elapsed time with miliseconds:
...
Thank you mederi for the nice plugin.
I just installed it on my Mac OS 10.11.6 with VLC 3.0.11.1 and I want to contribute a little how-to for this Mac OS:

I downloaded the Time-Plugin: Time_v3.2_(intf).zip and unpacked it.
There are two important files in it, time_intf.lua and time_ext.lua.
I put the time_intf.lua to the intf-folder, here:
/Users/f/Library/Application Support/org.videolan.vlc/lua/intf/time_intf.lua
and the time_ext.lua to the extension folder, here:
/Users/f/Library/Application Support/org.videolan.vlc/lua/extensions/time_ext.lua
(where f is my user name).
Then I noticed that the font is too big and pushy, so I searched and found your comment and hack about it in the 3rd page of the commenting area, starting with: "There is a workaround using marquee filter reading a text file..."


The work-around is for windows and I first thought that I would need this text file (timemarquee.txt), download it from somewhere, but it is just to push the time contents in it and read it, while VLC and the plugin are running, so I created an empty text file in:
/Users/f/Library/Application Support/org.videolan.vlc/lua/intf/time_marquee.txt
(named it time_marquee.txt and not timemarquee.txt for better reading).

In VLC preferences I changed:
'Show all' > Video > Subtitles/OSD > Overlays > [x]Marquee display
and also (still with 'Show all'):
Video > Subtitles/OSD > Marquee > (Text: is empty) Textfile: /Users/f/Library/Application Support/org.videolan.vlc/lua/intf/time_marquee.txt
And also there I can change Font and Position of this Marquee.
With Font > Opacity: 140 and Font > Size: 12 the time pattern is very unpushy :)

Then I changed the code in:
/Users/f/Library/Application Support/org.videolan.vlc/lua/intf/time_intf.lua
(it was in line 108) from:

Code: Select all

... vlc.osd.message(TIME_Decode_time_format(), 1111111111, TIME_osd_position) ...
to:

Code: Select all

... local f = vlc.io.open("/Users/f/Library/Application Support/org.videolan.vlc/lua/intf/time_marquee.txt", "w") if f then f:write(TIME_Decode_time_format()) f:close() end ...
And it worked :)
Thanks again.
frank

EDIT: On Windows 10 I put the extension into the User dir, in:

c:\Users\f\AppData\Roaming\vlc\lua\intf\time_intf.lua
c:\Users\f\AppData\Roaming\vlc\lua\intf\time_marquee.txt
c:\Users\f\AppData\Roaming\vlc\lua\extensions\time_ext.lua

(here also my user name is "f")

and changed the line
vlc.osd.message(...
(see above) in time_intf.lua to:

Code: Select all

... local f = vlc.io.open(vlc.config.userdatadir().."\\lua\\intf\\time_marquee.txt", "w") if f then f:write(TIME_Decode_time_format()) f:close() end ...
The Opacity I have set to 144, font white 18, this is unpushy enough :)
I just installed the stuff on my new Raspberry Pi 5 and here the path in the file (lua/intf/) time_intf.lua for time_marquee.txt is:

Code: Select all

local f = vlc.io.open(vlc.config.userdatadir().."/lua/intf/time_marquee.txt", "w")
The full path for time_intf.lua would be (for user pi):

Code: Select all

/home/pi/.local/share/vlc/lua/intf/time_intf.lua
I think the whole thing could be in an own addon, so the path could be by variables coming from the system and not hardcoded. But for me its ok :)
Thank again mederi!


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 14 guests