- Home /
movietexture imports as black screen
In my project, every time I import a movietexture, nothing imports but a black screen. This happens regardless of file type. Nothing I can do makes the texture work properly. I'm using unity 5.1.0f3.
The video works perfectly fine when opened in an external program.
I have quicktime installed and everything. Google has yielded a grand total of nothing helpful whatsoever.
Im having the exact same problem. By any chance did you just upgrade to windows 10?
I know that oculus rift doesnt work on it at all (which is really fucking stupid if you ask me considering how much they bragged about it at E3). If you can, try this on a different computer with a different OS (i will try to do the same). If it works, then this is yet another problem with their new OS.
Video files are imported via Apple QuickTime. Supported file types are what your QuickTime installation can play (usually .mov, .mpg, .mpeg, .mp4, .avi, .asf).
Answer by Larva-UDESC · Jan 19, 2016 at 09:24 PM
I had the same problem and, in my case, it was not an encoding problem as I thought in first place. I was using Unity 5.3.1f1 in Windows 10, and had the latest version of QuickTime (7.7.6). All of my movies were been displayed as black screens in the inspector and project folder (inside Unity) although them worked in external programs, including QuickTime. Actually, even in Unity, when I pressed play in the inspector painel the movie worked, but its thumbnail stills a black screen! Maybe its a bug or something like that in Unity (in my old system, one of the first versions of Unity 5 + Windows 7 the movie thumbnails were showed normally)
Inside the game those movies were also been displayed as black boxes, but when the script activated the Play() method, it worked. Thus, for solving this problem I realize you need to play the movie first in order to start it and then stop it (if you need to) for showing something on the screen.
If one loads the movie right in the beginning of the game, he/she can use the following code:
public MovieTexture movie;
void Start() {
movie.Play();
}
void OnGUI() {
if( movie.isPlaying )
movie.Stop();
GUI.DrawTexture( new Rect(0,0,100,100), movie );
}
Note that, for some reason, if you play your video in the inspector, the movie will work without the "movie.Play()" inside Unity. However, if you build your project, all you will see is a black rect.
Hope this helps somebody
Answer by catberg · May 30, 2016 at 05:30 AM
i had the same problem but it was a video format issue, y reexported mi video as a quicktime video whit the h264 codec and the problem was solved. hope this can help u.
Answer by tribemix · Oct 26, 2016 at 12:23 PM
For me, I fixed this by exporting the video and audio separately. The video then worked fine, although it still looked black in the thumbnail. I had to play the video in the texture editor or in the game engine to see the video appear as anything other than black.
Answer by Beeblebrox · Apr 07, 2017 at 11:12 AM
Get VLC Media Player and use it to convert your movie file to the Theora + Vorbis (OGG) format. Unity deals with these natively. I think the cause of this issue is Quicktime improperly converting whatever file format that is being imported.
Your answer
Follow this Question
Related Questions
Movie texture is not playing correctly 0 Answers
What to use instead of movie texture in Unity 5 webGL? Is there any workaround? 1 Answer
Small Sound File Import - Results in 40+/mb File Size! 1 Answer
Unity2D vector sprite sheet is blurry compared to single image with the same resolution. 1 Answer
Unity import assets crash 0 Answers