- Home /
Run movie in VLC player
The reason for this question is that I'm not satisfied with the quality of the video from Movie texture. I used Miro converter to import FullHD movie inside Unity, but when I display it on large screen the movie playback does not look smooth - it looks like some frames are lost. Therefore, I thought about playing a movie in full screen VLC player which is run from the Unity, but I don't know how to run external application from Unity. Are there any other solutions to my issue? Or suggestions? Thank you very much in advance. My regards, Aleksandra
Answer by Marnix · Jul 18, 2011 at 09:07 AM
You can run other applications from outside Unity with C#, but it will open a new window with your movie.
Have a look at System.Diagnostics.Process
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx
If you are looking for another way of playing movie files, maybe you should search for external libraries and embed them into your game. Like BINK or something. But these libraries are quite expensive. AND you need a pro license to import dll's.
Maybe you should ask for related libraries at gamedev stackexchange. Maybe there is some simple DLL that you can embed into your game.
Answer by Alexx · Jul 18, 2011 at 03:09 PM
Thank you very much. I used the following code:
string _path = "C:\\Users\\Saska\\Desktop\\Videi\\intro.mpg --fullscreen vlc://quit --intf dummy";
foo = new Process();
foo.StartInfo.FileName = "C:\\Program Files\\VideoLAN\\VLC\\vlc.exe";
foo.StartInfo.Arguments = _path;
foo.StartInfo.CreateNoWindow = true;
foo.StartInfo.WindowStyle = ProcessWindowStyle.Minimized;
foo.Start();
But VLC player minimizes my Unity app, and when the movie finishes, I have to click on taskbar in Windows to make Unity window in full screen. How I can avoid minimization of Unity window, so it runs underneath VLC player in full screen?
@$$anonymous$$x Fullscreen windows will probably always get $$anonymous$$imized when you run another process. You could run Unity in windowed mode or create a plugin for VLC that maximizes unity again. But I'm sure there are other ways for this as well.
Ok, I thought this is an issue of Windows. I don't know what I can do because transition from Unity to VLC goes via my Desktop and this really looks awkward. I want to avoid this as well, so plug-in for VLC isn't the best solution. Thank you anyway.
@$$anonymous$$x updated my answer about 3rd party libraries
Answer by chassets · Apr 12, 2016 at 07:24 AM
If you're still interested in using VLC from Unity, I created a VLC for Unity plugin: check out this thread http://forum.unity3d.com/threads/released-vlc-player-for-unity.387372/ or the package on the asset store here, where you can try out a demo.
Your answer
Follow this Question
Related Questions
MovieTexture Quality 0 Answers
Improve shadow quality? 4 Answers
Ingame Quality Settings not recognized 1 Answer
FBX Importer Quality not soo good as in Blender 2 Answers
NGUI Volume And Quality Controle With Sliders Not working 1 Answer