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
mitchstein443  
#1 Posted : Friday, March 31, 2017 11:49:07 PM(UTC)
mitchstein443

Rank: Advanced Member

Groups: Registered
Joined: 4/11/2015(UTC)
Posts: 64
Man
United States
Location: Home

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)
So I do this:

$node = http://localhost:8088/API/

then parse the xml returned..

$dura = ($node | Select-Object -ExpandProperty Duration | Out-String)

$ dura becomes the duration of the entire list, what I need to do is pull the remaining time left for the current video playing in the list..
The Keyword from API appears to be DURATION but that gives the entire time left in the list is there a keyword to pull just the time left for the current file?

WHat I'm using this for is to make a title at the bottom of the screen that displays:

UP NEXT (TITLE OF NEXT VIDEO) @ such and such time

Currently what I did is exported the list, then used power shell to pull the title of the current video playing, then it searches through the list and gets the next title that will be playing and what time it will start, BUT I pull the meta data from the harddrive of the current video playing and add that to the current time.. SO, if my script needs to stop for some reason, it will add the entire legnth of the currently playing video instead of just the time left of the currently playing video..

So If I could get the time lewft to play of the current video it would be much better..

Also is there any place that a complete list of available API functions are available, DURATION was not listed as available for a list input anywhere I looked, I just guessed that one and it sorta works lol..

Anyway by the time I finish playing with this powershell script I plan on it actually controlling the schedual and adding/removing inputs as well as creating a "TV GUIDE" in html format and uploading it to the website.. with the flexability of changing it on the fly.. As well as making the Now playing title at the top of the screen and the up next title at the bottom..

If anyone is versed in coding and wnats to help out I'll gladly post what I got and we can work on it together here.. The base of my code (and the clean neat parts of it) were gotten from the forums here and I expanded on it, not very elegant but works nonetheless..

DWAM  
#2 Posted : Saturday, April 1, 2017 2:51:20 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
Quote:
Also is there any place that a complete list of available API functions are available?


The best I found is:
http://www.vmix.com/help...utFunctionReference.html
stigaard  
#3 Posted : Saturday, April 1, 2017 3:46:17 AM(UTC)
stigaard

Rank: Advanced Member

Groups: Registered
Joined: 5/20/2015(UTC)
Posts: 493
Man
Denmark
Location: Copenhagen, Denmark

Thanks: 389 times
Was thanked: 100 time(s) in 79 post(s)
Hi Mitch,

I think you should take a look at the web API. It's normally found at the webcontroller url added /api (E.g.: http://localhost:8088/api ) and shows data of the current state of vMix. This means that if you have a list playing, this will be reflected in the web API.

You can then use the power shell script that you are talking about to track down your input, and the current position and the duration of the track. The numbers is in milliseconds.


Hope it's useful to you.

/ Jens Stigaard
stigaard attached the following image(s):
vMix api position and duration.JPG (75kb) downloaded 64 time(s).

You cannot view/download attachments. Try to login or register.
mitchstein443  
#4 Posted : Tuesday, April 4, 2017 12:03:14 AM(UTC)
mitchstein443

Rank: Advanced Member

Groups: Registered
Joined: 4/11/2015(UTC)
Posts: 64
Man
United States
Location: Home

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)
Stigaard, AHHHHH, milliseconds... that makes sense! I thought it was displaying the total seconds left for the entire list... Only because of the HUGE number and the playlist is 13 days long... got it now awesome THANX!!

All I gotta do is convert the milliseconds to seconds and then seconds to minutes hours and seconds.. easy.. Thats exactly what I needed..

DWAM, Yeah I saw that already.. And it does include everything I need to get my scheduler/ tv guide working... It doesn't however appear to explain the output from the xml returned, if it did, (or I missed it somewhere) I woulda known the duration was milliseconds for the current item from the playlist playing and not seconds for the entire playlist...

Now the next issue is, I see how to add new inputs through the webapi and I see how to jump around items in a playlist,BUT, is there a way to add and remove items from an existing playlist? I do not see that option available. IF it isn't it's not a big deal, I can just add inputs and remove them through the web api as they finish playing.. This is gonna be one hella long script lol..

So far though it has been running for 4+ months just about as flawless as can be on a windows computer. The only issue is that when the computer reboots, it takes it up to 15 minutes to load the playlist.. not a huge issue but a real annoyance that there has to be an easy solution to..
DWAM  
#5 Posted : Tuesday, April 4, 2017 2:57:30 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
Hi

I understand you are using vMix as a playout server which is not really what it is designed for... There are much better solutions for that on the market...

Some thoughts about it:

- why don't you use List instead of Playlist? Lists are much easier to manage

- if you want to stick to Playlists, you can use the ability to name your playlists and do a playlist by day. This wouldn't take 15 minutes to load. The API has the command to select a playlist by name...

- alternatively you could also use VLC playlist function with NDI plugin to feed vMix
mitchstein443  
#6 Posted : Tuesday, April 4, 2017 3:40:24 AM(UTC)
mitchstein443

Rank: Advanced Member

Groups: Registered
Joined: 4/11/2015(UTC)
Posts: 64
Man
United States
Location: Home

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)
I misspoke, I use the LIST feature in Vmix, "List - ", it takes so long to load because the list feature apparently checks each video before it loads the input.. As the list gets longer the load time gets longer.. what I do is create a "playlist" file (.m3u) and load it in a "list" input..

As far as VLC for streaming, it's extremly "dirty" in that it leaks alot of ram, causing my old pc to lockup or become completely unstabble within a day or two.. While vmix has now been running 21 days only rebooted once due to a windows update that forced a reboot.. and it is just as stable as it was on day one.

BUT, if there are other alternatives I'd be happy to try them out, I'd really like one that can in a virtual box, I know vmix is supposed to be able to, but it uses so much processor in a virtual machine that it's pointless to run it in one, you can only run 1 instance of it on an I7 3.4 GHZ machine.. Where as on a physical machine I have it running on a pentium core2 6500 processor with 4 gigs ram and it's perfect (under windows 7 enterprise), of course the mix is only 480p but thats all I need..

DWAM  
#7 Posted : Tuesday, April 4, 2017 4:03:14 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
OK.

You can create many small lists instead of a long one...

I didn't suggest to use VLC for streaming, only to build playlists and play them with NDI export to vMix

Alternatives? Look for "playout server" in Google. If you want free ones, add the word "free" in your keywords... There are plenty of solutions, some of them can easily run as a virtual machine...
mitchstein443  
#8 Posted : Tuesday, April 4, 2017 4:38:12 AM(UTC)
mitchstein443

Rank: Advanced Member

Groups: Registered
Joined: 4/11/2015(UTC)
Posts: 64
Man
United States
Location: Home

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)
Oh creating the playlist is simple..

I import a directory of mp4 files with vmix into a list, then export the list to m3u file, then use a powershell script to add my adroll before each video and then reimport it into vmix as a new list.. Doing this each time I add more videos...

But splitting it up and using powershell through the web api to change imputs seems to make alot more sense, then the single list input I am doing now. thanx for the idea, thats one of the reasons I love this product, I can make a long winded ridiculous post about an idea and people here will help expand it..



I did spend a long time looking for streaming options about a year ago, trying many many free and paid softwares.. I've found VMIX to be the most stable, and since I already owned a copy of it for live mixing of four cameras and live streams, I said hey, I'm going put it on my old video editing pc and see how it works 24/7.. and I don't have any issues with it..

I'm not familiar with what NDI is for or what it does, I thought it was a camera control of some sort for studios.

As far as things like smooth streaming through IIS I use soreson squeeze for that and I unreal media server for server the HLS feed and recieving the vmix rtmp feed.. The nice thing is when I'm doing a live event I can use my second copy of vmix to send up to my server, there pull it to my home pc running vmix from the server and send it back it on the same channel that streams the lists without interuption from prerecorded to live broadcasting..

Oh and another advantage of using vmix for it, is the less then 3 second delay from vmix to end user.. very few other streaming mixers can do it so well and efficiently.
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.