vMix Forums
»
General
»
Instant Replay
»
How To Convert Vmix Replay Inpoint/ OutPoint to Time
Rank: Member
Groups: Registered
Joined: 10/17/2020(UTC) Posts: 21
|
How can i convert Vmix replay in or out point to H:i:s is the value in milliseconds? i have tried to divide it with 1000000 but the result is not correct? any idea?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,220 Location: Belgium Thanks: 291 times Was thanked: 953 time(s) in 788 post(s)
|
Originally Posted by: dror How can i convert Vmix replay in or out point to H:i:s is the value in milliseconds? i have tried to divide it with 1000000 but the result is not correct? any idea? A search function is a cool thing ;-) Google: convert milliseconds to hh mm ss or even better google vmix instant replay timestamp = https://forums.vmix.com/...--or-something-like-that
|
|
|
|
Rank: Member
Groups: Registered
Joined: 10/17/2020(UTC) Posts: 21
|
first thank you for your help but i didnt ask for no reason
i have seen all of the posts about it,
i did convert it but i get a wrong result ,
this is the value = 170400000 in vmix the time is 10:47:23.89 but my result is 23:20:00
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,220 Location: Belgium Thanks: 291 times Was thanked: 953 time(s) in 788 post(s)
|
Originally Posted by: dror first thank you for your help but i didnt ask for no reason
i have seen all of the posts about it,
i did convert it but i get a wrong result ,
this is the value = 170400000 in vmix the time is 10:47:23.89 but my result is 23:20:00 did you see this post too? https://forums.vmix.com/...play-XML-InPoint-To-Timesomething about taking into account start recording time, frame counts etc
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 1/25/2019(UTC) Posts: 302 Thanks: 17 times Was thanked: 79 time(s) in 60 post(s)
|
i assume you are taking the times from the xml file in the replay folder. if i create a clip that is approx. 1 minute long, then i get the value of 605600000 (outpoint-inpoint), which corresponds to a value of 1:00:56. (mm:ss:ms) Quote:<event> <inPoint>162600000</inPoint> <outPoint>768200000</outPoint> <selectedAngle>0</selectedAngle> <description>Event 1 Minute</description> oneminute.JPG (10kb) downloaded 1 time(s).The value you specified 170400000 is therefore 00:17:40 the values are in ticks, the smallest available value among the windows time units (approx. 100 nanoseconds) you can convert it like this: Code:'number of ticks
dim ticks As Long = 170400000
'create TimeSpan from ticks
dim timeSpan As TimeSpan = TimeSpan.FromTicks(ticks)
'format TimeSpan as timestring (hh:mm:ss.ms)
dim formattedTime As String = String.Format("{0:D2}:{1:D2}:{2:D2}:{3:D2}",timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds)
console.writeline(formattedTime)
to get the time of the in- or outpoint, you have to calculate the tick values from the actual start time of the recording (starttime - inPoint) or (start time - outPoint), in this example 12:08:57.8940669 You can find the starttime at the bottom of the XML file: Quote:<segment> <timestamp>2024-01-07T12:08:57.8940669+01:00</timestamp> the start time can also be converted to ticks: Code:'time as string
dim timestamp As String = "12:08:57.8940669"
'change timestamp to TimeSpan
dim timeSpan As TimeSpan = TimeSpan.Parse(timestamp)
'convert TimeSpan to ticks
dim ticks As Long = timeSpan.Ticks
'result in ticks
console.writeline(ticks)
|
|
|
|
Rank: Member
Groups: Registered
Joined: 10/17/2020(UTC) Posts: 21
|
thank you ! i what language is the code written?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 1/25/2019(UTC) Posts: 302 Thanks: 17 times Was thanked: 79 time(s) in 60 post(s)
|
vb net, you can copy the code into a empty script window of vmix, see scripting in help files. you need to have 4K version or higher
|
|
|
|
vMix Forums
»
General
»
Instant Replay
»
How To Convert Vmix Replay Inpoint/ OutPoint to Time
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close