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
erikhauters  
#1 Posted : Friday, June 25, 2021 4:27:05 AM(UTC)
erikhauters

Rank: Newbie

Groups: Registered
Joined: 3/11/2021(UTC)
Posts: 4
Belgium
Location: Leuven

We developed a cloud based rundown that automates vmix.
Our automation app downloads the clips stored in our rundown on the vmix device.
We automate graphics, photo's, automatic switching etc without any problems, except for playback of clips (via the http api)
To trigger the clips from our rundown towards vmix we have tried the following approaches.
But we aren't happy ;-)

Approach 1 Hacking the playlist
Every time the user triggers a clip from our automation we clear a list input, load the new clip and after a delay we cut the input to program.
This works fine, but a delay of 200ms is needed and we often have black frames between clips.

Approach 2 AB playlists
We do exactly the same thing, but we alternate between two list inputs in vmix. That avoids the black frames, but still a lot of delay, and if I may say, a bit clunky.

Approach 3 Appending a playlist
Every time the user triggers a clip we append it to a playlist and send a cuenext command. Crazy enough we still have black frames now and then when we play one clip after another. Even with a very long delay between the loadclip and cuenext command.

Approach 4 Create a new Video input
Create a new Video Input when a clip is requested from our rundown. That works fast and no black frames when playing one clip after another. But hey. You end up with hundreds of Video inputs after the show.

Does anybody know a better approach? One that is fast and without black frames in between clips?

Thanks!
237dominique  
#2 Posted : Sunday, June 27, 2021 2:09:37 AM(UTC)
237dominique

Rank: Member

Groups: Registered
Joined: 6/3/2021(UTC)
Posts: 12
Man
Cameroon
Location: Douala

Thanks: 2 times
Was thanked: 7 time(s) in 4 post(s)
Originally Posted by: erikhauters Go to Quoted Post
We developed a cloud based rundown that automates vmix.
Our automation app downloads the clips stored in our rundown on the vmix device.
We automate graphics, photo's, automatic switching etc without any problems, except for playback of clips (via the http api)
To trigger the clips from our rundown towards vmix we have tried the following approaches.
But we aren't happy ;-)

Thanks!


The web api of vMix is slow. Happy that you just have 200ms of delay.

The best is the 4. You just have to remove the input at the end of his play back:

1- The first clip will have obviously a delay
2- Is it a realtime solution i.e the media has to be played as soon as the user or the rundown request it or can he choose to postpone as he want.
3- with your app, fetch the duration of the clip (there is third party dll that can help here or you can do it with vMixAPI later). if the playback don't start at the beginning and don't end at the end of the clip, you do simple math (end-begin)
3- when the user or your rundown request to play a clip, create first unique guid with your app then send addinput command to vMix with that guid(see documentation)
4- If it's realtime transition/set to output/overlay/play (depending of how you want that clip to play) into that input providing the input guid or wait the starting time choosen by the user then transition.
5- if you didn't manage to get the duration of the clip, send an empty request to vMix and find your guid in the list of input. there is a duration parameter.
6- Do the same if you want to add another clip after this. Just start the process sometime before the end of the previous(i.e 1000ms) and then transition as soon as the other finished (remember you have store the duration to help you for that) or or if you want to play it directly you can transition over the previous input
7- Wait some seconds and remove the previous input (you have his guid) via the webapi.
8- and so on...

You can use only 2 unique guid. when you remove one input from vMix interface you resuse his guid for upcoming clip.
If your app is well done, you are good to go. This is how the vScheduler work and I think it's difficult to do it another way. You can check out the source code for more ideas!
erikhauters  
#3 Posted : Monday, June 28, 2021 1:54:02 AM(UTC)
erikhauters

Rank: Newbie

Groups: Registered
Joined: 3/11/2021(UTC)
Posts: 4
Belgium
Location: Leuven

Hi Dominique,
Thanks for your thorough response.
I'll give that a go.
It's indeed a realtime story. Postponing can be done by our automation when necessary.

From the tcp connection I can receive an event when the clip stops playing. So I can remove the input after that comes in.
What's a bit annoying in this approach is that we won't be able to attach shortcuts on the (on the fly) created vmix input, right?

Nice work on the vScheduler. Is the dll using the socket api?

All the best

237dominique  
#4 Posted : Friday, July 2, 2021 2:30:22 PM(UTC)
237dominique

Rank: Member

Groups: Registered
Joined: 6/3/2021(UTC)
Posts: 12
Man
Cameroon
Location: Douala

Thanks: 2 times
Was thanked: 7 time(s) in 4 post(s)
Originally Posted by: erikhauters Go to Quoted Post
Hi Dominique,
Thanks for your thorough response.
I'll give that a go.
It's indeed a realtime story. Postponing can be done by our automation when necessary.

From the tcp connection I can receive an event when the clip stops playing. So I can remove the input after that comes in.
What's a bit annoying in this approach is that we won't be able to attach shortcuts on the (on the fly) created vmix input, right?

Nice work on the vScheduler. Is the dll using the socket api?

All the best




No socket api. Only the Web Api. It use Web request the one you can use in any web browser not TCP/IP.

For your problem there are solutions.
Add shortcuts features to your automation app (I don't known how your automation work so)
You can program the shortcuts in you automation app for sending command concerning input sent by your app. And don't use those shortcuts in vMix. When the user press a specified key, the app send what ever command you want to the vMix with the right input guid since you have that information. You can add in The UI of you app a place where the user can choose key and shortcut.

You can build another app that will handle the shortcuts.
You use always the same 2 guid in you automation app. When you remove one input, reuse the guid of that input the next time you need to create a new input. So the new app just need to send what ever command is assigned to a keypressed to one of those 2 guid. If one failed try to send to the second.

You can uncheck the option "assign shortcuts by input" in vMix if you want vMix to use guid.
- Let you automation app create input;
- go in shortcuts menu and select the input created by your automation.
- Duplicate that shortcut and wait your automation to create the second input, then assign the duplicated shortcut to that second input.
- Now you will have duplicated shortcut for the two guid. Don't worry about duplicate it will works.
OR
- Just create shorcuts and assign them to input 1 and duplicate assign the duplicate to input2. Uncheck assign by input, then save.
- Go in vMix install folder, in shortcuts folders you will see a file corresponding to you shortcuts config. Open it. It's a XML document. There is a field named key for every shortcut. Just paste the first guid you use in those filed for the first set of shortcut and the second guid for the duplicated one.

The downside of those solution is that for a few time before your remove the previous input after transition you will have your 2 guid available. Just wait 1-2 seconds for the automation to remove completed input before using shortcuts. In the first two solutions you can check the playtime of input to know which of the two you need to send command.
Users browsing this topic
Guest
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.