- Home /
Best video preparation for unity.
I'm having major issues with the sound on my GUI movie textures. Really inconsistent results...
Doesn't unity have a preferred format for movies that you import? A preferred codec? I'm currently using MOVs with h264. cheers
Answer by Paul Clay · Sep 20, 2010 at 01:33 AM
I too have had these problems. My solution: avoid unity's native importer/converter at all costs for video work. It breaks with big files and gives you inconsistent results.
Workflow to fix audio sync problems, but might have loss of video quality
Export to Mpeg2 format with the following settings:
Pixel ratio: square
Field: lower or upper
width and height adjusted to compensate for square pixels.
download ffmpeg2theora http://v2v.cc/~j/ffmpeg2theora/
on the terminal type (mac version):
cd path/to/file
ffmpeg2theora myfilename.mpg
Drag n drop new .ogv file to your unity assets folder. Done!
Work flow for top video quality, but likely will have audio sync issues.
Same as above accept instead export to H264 or Quicktime Animation (if your video is not progressive)
Use ffmpeg2theora to convert .mov to .ogv
Moral of story: always use ffmpeg2theora for your videos, especially if they are large video files.
Hope this helps!
-P
Yup, this works pretty well. Still not anything near HD quality you get from aperfect FHD video but acceptable.
How did you do that? I have replaced an .mov video by .ogv, but it seems that Unity can't import the .ogv video. On this page: http://unity3d.com/support/documentation/$$anonymous$$anual/Video%20Files, “Video files are imported via Apple QuickTime. Supported file types are what your QuickTime installation can play (usually .mov, .mpg, .mpeg, .mp4, .avi, .asf).” Should I add a codec to quick time in order to do this? Thanks!
Answer by Peter G · May 16, 2010 at 10:54 AM
According to the manual, Unity will automatically converts movies into Ogg Theora videos so your movie format does not change the end result much.
What I would do and others do, is import the highest quality you can, then use the quality slider to create an acceptable compromise between quality and performance. That way if you need a very high quality, you have it, and everywhere else, you can make a duplicate with increased performance where you need it. This is very similar to the max texture settings when importing tex 2D.
One other way to increase quality would be to turn filtering to trilinear.
Answer by ryandeluz · Mar 14, 2012 at 08:39 PM
I've used .H264 in a .MOV file with some success.
I find it important to set the audio to uncompressed, otherwise things can break!
It definitely matters what file format it starts as. I'm using Unity 3.5
Answer by ryandeluz · Mar 14, 2012 at 08:39 PM
I've used .H264 in a .MOV file with some success.
I find it important to set the audio to uncompressed, otherwise things can break!
It definitely matters what file format it starts as. I'm using Unity 3.5
Your answer
![](https://koobas.hobune.stream/wayback/20220613000653im_/https://answers.unity.com/themes/thub/images/avi.jpg)