Perform action when certain timestamp is reached

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
mips12
New Cone
New Cone
Posts: 4
Joined: 01 Apr 2018 17:59

Perform action when certain timestamp is reached

Postby mips12 » 27 Jun 2022 18:33

Hi!

I'd like to the ability to run some code when the timestamp of a file has been reached (i.e. trigger an alert)

How can this be achieved?

I was looking at this https://www.geeksforgeeks.org/python-vl ... edia-time/

However, I feel like I'm really looking for some kind of daemon (i.e. start the media file with VLC and then have this "listener" perform an action when timestamp on vlc has been reached)

What direction may I be pointed to to achieve this? Thanks!

emcodem
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Jul 2022 12:12

Re: Perform action when certain timestamp is reached

Postby emcodem » 20 Jul 2022 16:48

You can for example start vlc with -I http and periodically check status.xml if the time you are looking for has passed.

Krilya
New Cone
New Cone
Posts: 6
Joined: 02 Aug 2022 10:30

Re: Perform action when certain timestamp is reached

Postby Krilya » 02 Aug 2022 10:55

Hey mips12,
If I understood you well;

def function():
current_time = media_player.get_time()
time_stamp = str(dt.timedelta(0, 0, 0, current_time))
if time_stamp == "0:05:02": # or whatever time
# Function

create a thread for this function.

jereboss7
New Cone
New Cone
Posts: 2
Joined: 30 Aug 2022 12:13
Operating System: Windows
Contact:

Re: Perform action when certain timestamp is reached

Postby jereboss7 » 30 Aug 2022 14:57

Hi !

I had a script developed by a company last year that was designed to do just that! It was for a project of a multimedia terminal at the entrance of a supermarket which had to launch an application at a precise moment of the video.

However, in order to negotiate the price of the development of this script, we did not take the rights to it. But if you want to contact the company in question to ask them, it was them: https://amj74-informatique.fr/

It's a French company but they speak very good English. Tell them you are interested in the script that was developed for the Leclerc stores in France.

Hoping to have helped you ;)
Jeremie
IT Manager

emcodem
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Jul 2022 12:12

Re: Perform action when certain timestamp is reached

Postby emcodem » 15 Sep 2022 11:05

Or just ask for help with your script here, including your code and a description of the problem you face :D


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 12 guests