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
viktor_r  
#1 Posted : Monday, February 3, 2020 9:12:58 PM(UTC)
viktor_r

Rank: Newbie

Groups: Registered
Joined: 2/3/2020(UTC)
Posts: 2
Sweden
Location: Västerås

Thanks: 1 times
For some of the broadcasts that I do we have the need to provide sponsors with statistics on how long their logo or commercial have been showing and we need to connect that with how many views our stream had at that particular time.

Is there a way to get stats like that out of the program. As a first step it would be great to have just how many seconds/minutes the input was live, either through a multiview, on its own or as an overlay.

Is this possible?

/Viktor
doggy  
#2 Posted : Monday, February 3, 2020 11:04:01 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
you could get some information from the API xml with some script checking if the commercial is active and running and if one is streaming and count the time all these criteria match maybe ?
viktor_r  
#3 Posted : Tuesday, February 4, 2020 1:06:06 AM(UTC)
viktor_r

Rank: Newbie

Groups: Registered
Joined: 2/3/2020(UTC)
Posts: 2
Sweden
Location: Västerås

Thanks: 1 times
Originally Posted by: doggy Go to Quoted Post
you could get some information from the API xml with some script checking if the commercial is active and running and if one is streaming and count the time all these criteria match maybe ?


All I really need to know is what time a specific input becomes active and when it becomes inactive and to record that to a database. If that's possible with the API, that would work. Would I have to create a script for every input that I need to have on record or can you siphon that information from somewhere?
MartLeib  
#4 Posted : Tuesday, February 4, 2020 2:08:53 AM(UTC)
MartLeib

Rank: Advanced Member

Groups: Registered
Joined: 2/23/2017(UTC)
Posts: 189
Estonia

Thanks: 1 times
Was thanked: 52 time(s) in 42 post(s)
http://127.0.0.1:8088/API

Will give you all inputs under /vmix/inputs/input XPath. Make note of key and number. Subtract 1 from the number (so input number 1 will be 0, input number 5 will be 4 etc.) Save this data to your database after you have built your preset and you are no longer moving the inputs. You may also periodically poll this if input numbers change during the broadcast.

Now use vMix TCP api: https://www.vmix.com/help20/TCPAPI.html

Subscribe to TALLY messages: SUBSCRIBE TALLY

Now you will get message for each time you transition, overlay something. Status values are following: 0 = off, 1 = program, 2 = preview.

If you get the tally message, it will look something like:

001020

Every number in this string is separate status for input, starting from index 0 (remember, subtract 1 from the input number from the /API endpoint?)

Then just keep track how long each input has been live.


Tally message reports your every need, overlay, multiview and good old program. If you need this script written by someone else, contact me at mart.leib.estonia@gmail.com
thanks 1 user thanked MartLeib for this useful post.
viktor_r on 2/4/2020(UTC)
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.