Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Importing movies into Unity

Discussion in 'Scripting' started by flurp, Mar 20, 2011.

  1. flurp

    flurp

    Joined:
    Aug 7, 2009
    Posts:
    19
    I have been trying to import movies into Unity. It will import the movie (I used a .mp4) and sets up the separate audio file. The problem I am having is that it doesn't change it to a.ogg file. The file in my assets/resources/video folder remains a .mp4 video and isn't converted to .ogg. It will play in the game just fine but I need it to be a .ogg so I can move it to other places. Any idea on how to make unity create an actual .ogg file?
     
  2. Frank Oz

    Frank Oz

    Joined:
    Oct 13, 2010
    Posts:
    1,560
    Do you have convert on import switched off in the preferences?
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Unity will never convert files to other types, except for use internally. Use an external converter app to make an .ogg file.

    --Eric
     
  4. bonii

    bonii

    Joined:
    Jan 27, 2010
    Posts:
    84
    I think it's because Unity basic version can't import videos, just audio. The Unity Pro can import video.
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Just to prevent confusion: the free unity has no reason to import movies as movie textures on desktop as well as native movie on mobile are Pro only features, you can not play back movies with the non Pro licenses
     
    Lahmeck likes this.
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I think you missed where flurp said "It will play in the game just fine". The issue is not about Pro, it's about trying to use Unity as a file converter, but that won't work; as I mentioned you need an actual converter app for that.

    --Eric
     
  7. flurp

    flurp

    Joined:
    Aug 7, 2009
    Posts:
    19
    The only preferences I am aware of are in the Edit drop down menu. It doesn't have that. Can you tell me where you would find the preferences to change the setting?
     
  8. flurp

    flurp

    Joined:
    Aug 7, 2009
    Posts:
    19
    When I convert to .ogg before importing, Unity won't split out the audio file. After researching it I found in the Unity manual that you can only import files that can be opened in Quicktime.
     
  9. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Frank is referring to "Compress assets when importing", but that won't help you here. As I mentioned, you need to use an actual converter app (not Unity) to do what you want.

    --Eric
     
    Lahmeck likes this.
  10. flurp

    flurp

    Joined:
    Aug 7, 2009
    Posts:
    19
    What converter app have you used? I bought the top rated one on CNET (MyVideoConverter) converted my video to .ogg and tried importing it, but it wouldn't create the audio file. I found this article: http://unity3d.com/support/documentation/Manual/Video Files.html that told me you couldn't import .ogg files. Now I need to figure out how to get it done.
     
  11. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    I use Miro for conversion, its free and uses the same thing everything that targets ogg theora uses (ffmpeg and ffmpeg2theora)
    When you do that, you get an ogv which you can just use in unity (drop into editor or use from WWW) which has the movie and as "child" the corresponding audio clip
     
  12. flurp

    flurp

    Joined:
    Aug 7, 2009
    Posts:
    19
    Great tip Dreamora! I downloaded Miro and it worked perfectly. Thanks for the help!!
     
  13. Lahmeck

    Lahmeck

    Joined:
    May 14, 2015
    Posts:
    5
    Hi all!!

    I am using Unity 5.3.4f1, non PRO Edition, and I was trying to import a video and use as a Texture as well. After many attempts, you can imagine, looking for a proper video converter (my video is a MP4 file), following many instructions from internet forums and so on, I couldn´t import the video so Unity is able to use it as a Texture.

    Finally, and it sounds crazy, I drag the video, converted to OGG and even the original MP4 one, to "Materials" folder in Assets. I was doing that in other folder before. And it worked. Amazing, stupid, unexpected and useful.

    I hope it works for you all too.

    PS: Installed QuickTime is needed, I didn´t mention that.