Seek to a specific time in media file #995
-
Happy user and recommender of Scene Switcher for >2 years now. I have around 20 macros and I use most of them every stream! I have a 12 hour long video file of a clock. 0:00:00 in the file is noon/midnight, 6:00:00 shows 6 o'clock, and so on. The video plays continuously during streams and keeps the time perfectly. I have to set it manually to the current time before I start every stream, unless I leave OBS running (without crashes) 24/7. :) How to achieve this on OBS startup without having to do it by hand? I have a medium-okay method but it isn't great. I wrote a formula that figures out the value of the current time in hours plus two decimal places, and I use Media Seek To Duration. But I have to copy and paste the value in. The field for Duration won't allow a variable or formula. Otherwise, I'd make a macro that runs a VBS script to get the hour decimal calculation and save it in a text file, and have Switcher read that text value into a variable which would be used for Duration. That's kludgey though. It would be awesome to just tell it 'seek to the current time' or 'seek to the hours, minutes, and seconds in this variable' or something more direct. But I'll take any solution, as long as it works. It's frustrating to have to set the time again whenever OBS crashes and I'm trying to get my stream back on. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Beta Was this translation helpful? Give feedback.
Here's an idea. In the macro Conditions include a Date condition that is ignored.
In the Actions, create a Variable using the 'Set to condition value' option and choose the Date condition. This will store the current date and time in a variable.
The time can be extracted from the variable using substring or Math expression.
The variable can then be used in the Media action.