logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
dror  
#1 Posted : Sunday, January 7, 2024 6:52:55 PM(UTC)
dror

Rank: Member

Groups: Registered
Joined: 10/17/2020(UTC)
Posts: 21
Israel

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?
doggy  
#2 Posted : Sunday, January 7, 2024 8:21:52 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,188
Belgium
Location: Belgium

Thanks: 288 times
Was thanked: 947 time(s) in 782 post(s)
Originally Posted by: dror Go to Quoted Post
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
dror  
#3 Posted : Sunday, January 7, 2024 8:32:09 PM(UTC)
dror

Rank: Member

Groups: Registered
Joined: 10/17/2020(UTC)
Posts: 21
Israel

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
doggy  
#4 Posted : Sunday, January 7, 2024 9:12:22 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,188
Belgium
Location: Belgium

Thanks: 288 times
Was thanked: 947 time(s) in 782 post(s)
Originally Posted by: dror Go to Quoted Post
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-Time
something about taking into account start recording time, frame counts etc
Peter1000  
#5 Posted : Sunday, January 7, 2024 10:11:59 PM(UTC)
Peter1000

Rank: Advanced Member

Groups: Registered
Joined: 1/25/2019(UTC)
Posts: 302
Switzerland

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)
dror  
#6 Posted : Sunday, January 7, 2024 10:53:40 PM(UTC)
dror

Rank: Member

Groups: Registered
Joined: 10/17/2020(UTC)
Posts: 21
Israel

thank you !
i what language is the code written?
Peter1000  
#7 Posted : Monday, January 8, 2024 3:37:31 AM(UTC)
Peter1000

Rank: Advanced Member

Groups: Registered
Joined: 1/25/2019(UTC)
Posts: 302
Switzerland

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
Users browsing this topic
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.