Unity 5.6.0f3 VideoPlayer does not play video in standalone EXE or APP made on OSX only

I have an MP4 video in my game that runs fine in the editor on Windows and OSX.

If I build the game with Unity 5.6 on Windows (and the same video files) it plays video fine in a standalone Windows EXE.

If I build the game on OSX 10.11.6 then the video will not start playing in standalone on OSX or Windows, so the game hangs.

Play() is called, but the video never starts playing and is always at frame 0.

I have exactly the same issue. using unity 5.6.1, the video doesn’t start in standalone windows.

Apparently, few other people had the same problem:

I am using OSX 10.10.5 and Unity 5.6.0f3 and I am experiencing the same issue. It works in the Editor, but the moment I deploy a standalone for mac and run it, the video does not work. :frowning:

I tried manually playing, stopping and checking the videoplayer component status (isPlaying) and no matter what I try, I cannot make it work in standalone builds.

I also tried the same video in different formats as one of the threads suggests that @Kef-niark linked, however, I had no success at all.

Facing the same problem on android build.

I have this working for me. I chalk this up to poor documentation and switching the supported codecs between movietexture and videoplayer.

Movie Texture required OGV and would not work with MP4. Video Player requires MP4 and does not work with OGV.

So you need to convert all of your video to mp4 and import as video clip.

Lastly it’s annoying that you can use unsupported codecs in the editor and you wont know if it will work stand alone until you build it.

My videos are MP4 already and I still have this problem.

1 Like

I have similar problem, using MacOS 10.12 and Building to Android. Run in Editor Mode and same when setted VideoClip it run too, but not when it is configured via script.

Any responses from Unity on this issue?

I’m having the same issue on Windows 7 x64 with both Unity 5.6.0p4 and 2017.1.0b4 when trying to use video player as a 360 degree video player.

As a test project I started here: https://forum.unity3d.com/threads/playing-360-videos-with-the-videoplayer.461290/

I think that video player doesn’t support all types of ‘.mp4’-files. You guys can try this out to see if it runs on your machines:
Download one of Video LAN’s 360 demo videos ( http://streams.videolan.org/streams/360/eagle_360.mp4 ) and try using it with Unity’s video player. This should work because you can see that there is compatible meta data with frame height and width. You can check your own videos in Windows with right click->properties and the metadata should show up.
I didn’t find a way how to generate a video file with this type of metadata in Adobe Premiere CC, though.

Maybe anyone can help me out with this?

It would be also very interesting if this demo video from VLC works for you as well.

I tried to contact the poster of the topic I mentioned but I didn’t get any response until now.

Good news! It was necessary to use MP4 and also to set the video to Transcode. There were no errors to indicate this, but switching on Transcode fixed it.

3 Likes

I confirm that setting the MP4 as Transcode fixed it for me too.

Thanks @Rob-Davis !

Just to clarify something, there are at least two slightly different issues here:

  1. We all seem to agree that the new VideoPlayer works correctly in the editor on both Windows and macOS;
  2. For some people (such as me), it does NOT work in a Windows build but is fine in a Mac build;
  3. For others, it does NOT work in a Mac build but is fine in a Windows build.

My solution was to just go back to the old MovieTexture way of playing back video. For our purposes, that’s all we need.

Hi @daisyDynamics ,
That approach is OK for some users, but we specifically upgraded to Unity 5.6 to use the new video player because the MovieTexture method is not compatible with some export platforms (e.g. Xbox).
Cheers, Rob

Unfortunatley the fix we found is only a partial fix:
We discovered that once we switch on Transcode, we can build on OSX and see video on OSX; we can build on Windows and see video on Windows. BUT we cannot build on OSX and run on Windows. Once again, the video player fails.
So we would need to switch off Transcode when we want to build for Windows on OSX. This is annoying because it takes a lot of time to change this option as Unity seems to re-render the videos.

1 Like

CORRECTION: It is not possible to build a Windows executable on OSX if you have the above issue with the Video Player. Whether Transcode is on or off, the OSX built game will not run on Windows. We now need to have 2 separate compilation machines to build with Unity, one for Windows and one for OSX.

This is a major blow to our workflow. We were reliant on being able to build our Windows game on OSX.

1 Like

Rob, we’re using MovieTexture fine on our Xbox One dev kits - no issues at all.

It won’t work for PS4 though - you need to use Sony’s classes, but they’re very straightforward and rock-solid.

Hmm - I think we are using Video Player on both PS4 and XB1 - will double check.

In meantime, we still have no Windows build capability on OSX which is problematic (e.g. need to be able make new PC builds at a live show, using a Macbook, so going to have to install Windows Unity on a Bootcamp partitiion just to make Windows builds).

When switching Build Settings from OSX to Windows, Unity does a lengthy transcoding on any video files, but the result is still a Windows build that freezes on video playback.

I had the same problem while building an EXE from windows and use it on windows. My video’s did not play. I’m using .Webm video’s with Alpha. For me the fix was to do the opposite and turn off transcoding.

I’m having this issue as well. I’m developing on OSX and videos are not displaying properly on Windows build (black screen if full screen or white material if played on material)…unless I use VP8 as the transcode option. The problem is, the VP8 transcode option has terrible compression issues, so the video looks horrible. I’ve tried multiple H.264 options in handbrake but nothing is working. Anyone have any updates on this?

1 Like

My project is encountering issues like these as well. We’re using Unity 5.6.3p4. Are these issues improved in newer versions of Unity?