vMix Forums
»
General
»
3rd Party Software and Development
»
Script Shortcuts for playing parts of a Video Clip
Rank: Newbie
Groups: Registered
Joined: 11/1/2020(UTC) Posts: 3 Location: Los Angeles
|
Hey Guys,
First time here, but been playing with Vmix for a few months now as we've transitioned to production from home only and so far its been a really good experience.
Anyway, I've been trying to automate the simple process of jumping around within a video clip input so that we don't have to chop it up and have multiple inputs.
1. I want to create shortcuts for different parts of a given video clip. One shortcut to set the clip start/end point, and another to play it. Also, maybe just one shortcut that sets up the next clip and then one to play could work too. 2. Don't want to update shortcuts, so grabbing start/end points from a data source like Google Sheets would be ideal.
So basically, I want to show a clip from say :05-:10, then jump to :30-:40, then maybe jump back to :15-:20. After looking up some script samples, I came up with this.
Clip-1-TimeCode - Title/XAML input with data pulling from the a google sheets datasource. Clip-1 - Input for the video file
We'll start by setting Markout first, so that Markin will leave the clip ready to play after.
dim i as object = Input.Find("Clip-1-TimeCode") sleep(1) api.Function("DataSourceNextRow",Value:="Google Sheets,Clip-Info") sleep(1) dim ClipInput as string = "Clip-1" dim ClipIn as string =i.Text("in-x.Text") + "000" dim ClipOut as string =i.Text("out-y.Text") + "000"
api.Function("MarkReset", Input:=ClipInput) sleep(1) api.Function("SetPosition",Value:=ClipOut, Input:=ClipInput) sleep(1) api.Function("MarkOut",Input:=ClipInput) sleep(1) api.Function("SetPosition",Value:=ClipIn, Input:=ClipInput) sleep(1) api.Function("MarkIn",Input:=ClipInput)
I ran into some problems where certain video formats like MP4 & MPG files had weird issues with Setposition & MarkIn not behaving properly, however Quicktime(prores) seems to work consistently.
I have a few questions for the group.
1. Although, this seems to work. Is it efficient? is there another simpler way to accomplish this that maybe i missed? 2. Is there really no way to initiate a video clip with predefined in & out points, without having to manually set them?
Thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Quote:1. Although, this seems to work. Is it efficient? is there another simpler way to accomplish this that maybe i missed? No, due to Quote:I ran into some problems where certain video formats like MP4 & MPG files had weird issues with Setposition & MarkIn not behaving properly, however Quicktime(prores) seems to work consistently. See https://forums.vmix.com/...etPosition-bug#post45426
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 11/1/2020(UTC) Posts: 3 Location: Los Angeles
|
Originally Posted by: doggy Quote:1. Although, this seems to work. Is it efficient? is there another simpler way to accomplish this that maybe i missed? No, due to Quote:I ran into some problems where certain video formats like MP4 & MPG files had weird issues with Setposition & MarkIn not behaving properly, however Quicktime(prores) seems to work consistently. See https://forums.vmix.com/...etPosition-bug#post45426 Thanks Doggy, that's what i figured. Does anyone know if there is any other video format besides proress that might work as well? For our workflow dealing with a format that would have a smaller file size would work best. I did get a chance to test out prores HQ,LT,Proxy from premiere, and all worked fine so in the meantime we'll probably just work with the Proxy codec.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 11/1/2020(UTC) Posts: 3 Location: Los Angeles
|
Quick follow up and something that could be useful for anyone having issues with SetPosition. We primarily use the Premiere H.264 preset "Youtube 1080P Full HD" to prep clips. That preset actually has a keyframe distance of 90 as a default, which is what causes the setposition issues on vmix. I tested a keyframe distance of 30 & 15, and the 15 render definitely seems to work properly. So a keyframe distance of half the intended FPS might do the trick.
|
|
|
|
vMix Forums
»
General
»
3rd Party Software and Development
»
Script Shortcuts for playing parts of a Video Clip
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