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
antardwip  
#1 Posted : Tuesday, June 24, 2014 9:07:18 AM(UTC)
antardwip

Rank: Member

Groups: Registered
Joined: 1/2/2014(UTC)
Posts: 25
Location: india

Thanks: 1 times
Is there any way to tell when a recording has stopped playing via the API? I want to return to live broadcast when a series of recordings have finished.
I need to know either way so I can either do it - or stop trying,
Thanks in advance.
drklump  
#2 Posted : Saturday, June 28, 2014 7:08:24 AM(UTC)
drklump

Rank: Newbie

Groups: Registered
Joined: 6/13/2014(UTC)
Posts: 5
Man
Location: Sweden

Was thanked: 2 time(s) in 2 post(s)
Hi, I believe that's possible. I wouldn't say completely from the API, but kind of.

When an empty request is sent to vMix, it responds with a very useful XML-file containing lots of useful things about the what's in vMix for you to play with.

Below is a snippet from the XMl-file, displaying one of my inputs in my example project.

Code:

<input key="035d71ae-c1f6-4efc-93c3-ce634e253d41" number="4" type="Video" title="myVideo.MP4" state="Running" position="25630" duration="629200" muted="False" loop="False">myVideo.MP4</input>


What you're looking for is the "state" attribute, which tells you whether the input is "Running" or is "Paused".

With this information you can do lots of things! For example you could once a second or so send empty requests to vMix to check if the state still is "Running", or if it's "Paused". Though this might be bad performance wise.

If I'd do something of the sorts, I'd take the duration of the video, subtract that with the position (both are displayed in seconds), let a timer go in the background and after the amount of seconds send the request to change the active input to the live broadcast instead.

The second solution should work for a series of recordings as well, but then you'd have to combine the durations of each video file. (I haven't used playlists, but I suppose you might get the total duration of that as well?) With this you could also create a kind of custom playlist app if you'd want that.

Hope this help!
/Kristoffer
admin  
#3 Posted : Saturday, June 28, 2014 7:21:03 AM(UTC)
admin

Rank: Administration

Groups: Administrators
Joined: 1/13/2010(UTC)
Posts: 5,152
Man
Location: Gold Coast, Australia

Was thanked: 4146 time(s) in 1491 post(s)
If you don't have to use the API, here is a way using Triggers:

1. Create a List with all the videos you would like to play.
2. In the List Input Properties under the Triggers tab add a OnCompletion trigger to fade to whatever input you like.

Regards,

Martin
vMix
antardwip  
#4 Posted : Tuesday, July 22, 2014 2:38:50 AM(UTC)
antardwip

Rank: Member

Groups: Registered
Joined: 1/2/2014(UTC)
Posts: 25
Location: india

Thanks: 1 times
Really helpful - thank you very much.
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.