VideoController

Plugins VideoController

VamSander

Active member
Featured Contributor
Messages
15
Reactions
135
Points
28
VamSander submitted a new resource:

VideoController - Play videos direct from your PC over multiple screens - no WebPanel needed


VideoController v1.0

This uses the built in Unity Video Player to play videos directly from your PC hard drive inside VAM. It is fast and lightweight and can cope with lots of videos simultaneously.


It supports most video formats including mp4, mpg, m4v, mpeg, webm, wmv, vp8, ogv, mov, dv, avi and asf.
It supports audio playback which will be played from the centre of the screen, depending on your videos this can be quite noisy when...

Read more about this resource...
 
Love the plugin

Couple of things I spotted to add to the to do list you no doubt have
  • Verticle movies are being stretch
  • You can adjust the code for ranges so adding extra screen doesn't have "0.1" which doesn't make sense e.g. (from givemefps)
    • HairMultiplierSlider = CreateSlider(HairMultiplierValue, true);
      HairMultiplierSlider.slider.wholeNumbers = true;
      HairMultiplierSlider.rangeAdjustEnabled = false;
      HairMultiplierSlider.autoSetQuickButtons = false;
      HairMultiplierSlider.ConfigureQuickButtons(-1.0f, -2.0f, -5.0f, -10.0f, 1.0f, 2.0f, 5.0f, 10.0f);
  • The default size seems overly large compared with a VAM character - especially when adding multiple screens - though makes sense when adding a 1 single "cinema" size screen
  • Very easy to crash system by dragging the add screen slider and multiplying 8x1 -> 8x8! - I'm on a 8 core 32GB system - 16 is about maxium I could run - perhaps some restruictions in place with a toggle for advanced users
Anyway, fantastic plugin! keep up the good work
 
Sounds great.
Love it being that easy as just playing all clips from a folder.
I am still waiting for someone who could do a plugin that simply shows
all images in a folder on an simple image panel for a given time.
Should be extremely easy compared to this.
 
I get this error "Attempted to use GetFilesAtPath on a path that is not inside game directory. That is not allowed".

I've tried different loction ALL inside subfolders of the game folder. Last tried "...\GAMES (VR)\-! Virt-A-Mate @@@@@\Videos\".

Maybe the plugin have some problem with special characters in the pathname? I'll do some test...

EDIT: Just tried "...GAMES (VR)\Virt-A-Mate\Videos\". Same error. I'm on Win10, the game folder is on my E: drive...
 
Last edited:
Love the plugin

Couple of things I spotted to add to the to do list you no doubt have
  • Verticle movies are being stretch
  • You can adjust the code for ranges so adding extra screen doesn't have "0.1" which doesn't make sense e.g. (from givemefps)
    • HairMultiplierSlider = CreateSlider(HairMultiplierValue, true);
      HairMultiplierSlider.slider.wholeNumbers = true;
      HairMultiplierSlider.rangeAdjustEnabled = false;
      HairMultiplierSlider.autoSetQuickButtons = false;
      HairMultiplierSlider.ConfigureQuickButtons(-1.0f, -2.0f, -5.0f, -10.0f, 1.0f, 2.0f, 5.0f, 10.0f);
  • The default size seems overly large compared with a VAM character - especially when adding multiple screens - though makes sense when adding a 1 single "cinema" size screen
  • Very easy to crash system by dragging the add screen slider and multiplying 8x1 -> 8x8! - I'm on a 8 core 32GB system - 16 is about maxium I could run - perhaps some restruictions in place with a toggle for advanced users
Anyway, fantastic plugin! keep up the good work
Thanks, the range stuff will go into my TODO.
Default size - yeah, it was kind of intended to be a large single screen like a backdrop. It's easy to change so unless I get a lot of similar feedback I'll leave it for now.
On limiting - yeah, I started with 5x5 as max then thought - "there's gonna be some guy" or maybe "somebody will want 8x1". I'll see if there's some API Meshed allows that will give me base system specs and try and add a sanity check there.
Vertical movies stretched - that's a tough one. On the slightly ancient version of Unity VaM is on, I can't easily figure out the aspect ratio of the video before it starts playing. That's why I added the aspect ratio control. However won't work if you mix different aspect ratios. I think the best I can do is wait till the movie is playing then get the aspect ratio and tell Unity to put black bars in - maybe a few frames of stretched.
 
Last edited:
I get this error "Attempted to use GetFilesAtPath on a path that is not inside game directory. That is not allowed".

I've tried different loction ALL inside subfolders of the game folder. Last tried "...\GAMES (VR)\-! Virt-A-Mate @@@@@\Videos\".

Maybe the plugin have some problem with special characters in the pathname? I'll do some test...

EDIT: Just tried "...GAMES (VR)\Virt-A-Mate\Videos\". Same error. I'm on Win10, the game folder is on my E: drive...
Let me DM you as I'd like to fix this.
 
Sounds great.
Love it being that easy as just playing all clips from a folder.
I am still waiting for someone who could do a plugin that simply shows
all images in a folder on an simple image panel for a given time.
Should be extremely easy compared to this.
I think the hardest part is doing proper slideshows with mixed cross-fades and Ken-Burns effect stuff (panning and zooming). If all you need is a crossfade - then this could be adapted easily (if you're a programmer and know Unity).
 
Nice plugin!

Would be great to be able to have the video save with a scene and have it package inside of a VAR so it can be used in sharable scenes. Also play / stop and select a particular video would be nice too.
 
Nice plugin!

Would be great to be able to have the video save with a scene and have it package inside of a VAR so it can be used in sharable scenes. Also play / stop and select a particular video would be nice too.
Okay. interesting feature request. I'll look into it - but I suspect that all you need to do is add the folder to the package? (that's the way var packages are supposed to work).
 
I think the hardest part is doing proper slideshows with mixed cross-fades and Ken-Burns effect stuff (panning and zooming). If all you need is a crossfade - then this could be adapted easily (if you're a programmer and know Unity).

That's the problem. I am the graphics guy and extremely bad in scripting. That is why I am waiting for someone to do a simple slideshow plugin that long. No need for fading. Just load one image after an other.
 
Aside from creating a folder for each individual video that someone would like to play, would there be a way to individually select videos from the plugin itself?
 
Aside from creating a folder for each individual video that someone would like to play, would there be a way to individually select videos from the plugin itself?

The UI we have available in VAM doesn't really support doing anything sophisticated with lists like selection - which is a nuisance as there's so much more I could do with a good custom scrollable list. What I'll probably do in the short term is look at adding triggers - so you could e.g. trigger a video to play on a screen by name. I know doing UI stuff will just turn into a slippery slope so I'm going to knock out some of the lower hanging fruit first.
 
That's a bummer, but thanks for the plugin though. Having the only option being streaming with the in-game TV was a major inconvenience
 
Okay. interesting feature request. I'll look into it - but I suspect that all you need to do is add the folder to the package? (that's the way var packages are supposed to work).
Yeah okay, I'm not obeying root relative paths correctly. So that's in my priority TODO list - it'll work provided they use exactly the same path as you - currently.
 
Some mp4 videos that aren't that large or high bit rate have stuttering audio. How can I fix that?
Unfortunately this is down to hardware and the complexity of the scene. Basically if the scene is drawing all the power - but you can't really tell as VR is doing a pretty good job of smoothing it out, you're gonna notice for things like video and audio playback though.
If that isn't the case and it still stalls in a smaller scene:
  • First off check the actual bitrate, the file size alone doesn't tell you much, right click the video -> properties -> Details Tab -> Total Bitrate. I use about 1100kbps and can play loads of clips at the same time in an empty scene on hardware from about 8 years ago and a mechanical HD. Bear in mind these screens are smaller than the VR resolution, which is already small - a 4k video or even a 1080p is overkill. 720p, whack the compression up. Plenty of free tools to re-encode the video if you have to, I use Hitfilm.
  • If you can - use an SSD?
  • Finally, I'm adding the option to trigger videos from an external source and will add the ability to start playback from any location. You could create a ramdisk if you have memory to spare - and then stream from that. If that still stalls then it's just down to the scene being too hungry and the CPU not getting enough breathing space - this version of Unity is single threaded bear in mind. Threads are probably handling the decoding, but the main game thread is swapping buffers and rendering.
 
Just made account to say

"Thank you for sharing with us mere mortals!" :eek:

It's much better than dreamhomewebtv!

I still need to play around more to understand the full potential. But so far it's amazing.

I have one question though, will we be able to scrub through videos in the future?
Unfortunately scrubbing is going to be one of the things DreamHomeWebTV does support where this doesn't. The WebTV is just browser code - probably Chrome - rendering to a texture. It supports all the things a normal browser would - this however is just a video decoder connected to a texture, there's no UI or even a real sense this is a physical object in the world. You could probably add Unity UI - but it's far from trivial.
Maybe as a half way, I could add a scrub bar to the VAM UI for the case where you have one and only one screen showing?
 
Awesome plugin. Would have made this myself if I'd realised we could just use the Unity Video player! Give me a shout if you need any help with things like triggers. BTW, I am pretty sure meshed would have no objections to accessing Video files outside of VAM folder. GetDirectoryPathDialog has a fullComputerBrowser option specifically for that use case and meshed is very good at locking down anything he doesnt want us to do - also cant see what possible risk it could entail.
 
Awesome plugin. Would have made this myself if I'd realised we could just use the Unity Video player! Give me a shout if you need any help with things like triggers. BTW, I am pretty sure meshed would have no objections to accessing Video files outside of VAM folder. GetDirectoryPathDialog has a fullComputerBrowser option specifically for that use case and meshed is very good at locking down anything he doesnt want us to do - also cant see what possible risk it could entail.
Yeah, tbh I'm sure I'd tried this before and it didn't work. Seems fine in v20.
The problem with full path browsing is that while GetDirectoryPathDialog will work - GetFilesAtPath won't.
Looks like adding play triggers should be easy though and I'll let people enter any path for that.
 
Looks like adding play triggers should be easy though and I'll let people enter any path for that.

And i hope this will be the solution form my problem also... ?

P.s. I have some new ideas about my problem but i don't want to bore you... so... let me know if i can send you my useless toughts by PM. ;)
 
Yeah, tbh I'm sure I'd tried this before and it didn't work. Seems fine in v20.
The problem with full path browsing is that while GetDirectoryPathDialog will work - GetFilesAtPath won't.
Looks like adding play triggers should be easy though and I'll let people enter any path for that.
Yes, you are right - reading files outside of the VAM folder does appear to be restricted. Never noticed that before!
 
And i hope this will be the solution form my problem also... ?

P.s. I have some new ideas about my problem but i don't want to bore you... so... let me know if i can send you my useless toughts by PM. ;)
Sure go ahead ;)
 
Yes, you are right - reading files outside of the VAM folder does appear to be restricted. Never noticed that before!
BTW: If you want to help out - I'm totally up for that. Not going to set up a github for this, but you have the source, just send me a new copy and I'll do a merge.
Probably worth warning me in advance what you're adding though so I'm not doing the same thing.
 
Why do I import the video and press play and there is no effect is a white screen,please help me
 
Why do I import the video and press play and there is no effect is a white screen,please help me

Seems you have my same issue. I'm trying to be of some help to VamSanders in solving this problem (him is aware of that). Can you please tell us the full path to the folder you stored the videos to play?

Btw... i'm happy that i'm not the only with this problem... ?
 
Back
Top Bottom