Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Biendeo · Sep 22, 2010 at 06:43 AM · audioimagevideoanimatedgif

Animated GIF and Audio Instead of Video?

Since I'm using Unity Free, I know I'm not able to insert any type of video file into my game. However, I have been looking around, and I've come across that animated GIF files can be used in Unity. If so, how can I project an animated GIF onto my whole screen (or more or so, just show the GIF full-screen).

Also, since I can do that, I was wondering if I could also play an audio file over that, maybe to accompany the animated GIF. Is that also possible?

-Biendeo

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Ashkan_gc · Sep 22, 2010 at 06:56 AM

it's not possible to play animated gifs in unity. you can convert them to a strip or multiple textures and then change the texture of your material yourself. see this question.

you can play audio using an audio source when animating your texture.

you can also write your own gif parser if you want.

using animated gifs instead of movies is not an option for long videos.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by yoyo · Nov 24, 2010 at 06:03 PM

I wrote a "video" player for the free version of Unity. (I called it BMovieTexture, since it's a low budget version of the MovieTexture class). It triggers an audio clip, then plays back a sequence of images at an appropriate frame rate.

I used ffmpeg (freely available) to rip video into individual frames and extract the audio. I then load the frames one by one from the hard drive and display them, monitoring elapsed time to control playback speed. Unity free doesn't have an asynchronous file loader, but I was able to get some asynchronicity by using the WWW interface (with a "file://" URL).

Without full asynchronous streaming, performance isn't the greatest. On my laptop (relatively new and fast) I can play 1280x720 video at about 15 frames/second. Quarter-resolution is fine at 30 fps.

If anyone is interested I can dig up more details.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image yoyo · Jan 01, 2011 at 05:58 PM 0
Share

Hmm, 1280x720 may have been a lie, on looking back at the content I think I rescaled to 640x360 to improve load times.

avatar image MightyMatty · Nov 11, 2011 at 02:39 AM 0
Share

I am certainly interested in this. Being unable to afford Unity Pro but requiring the functionality, I am between a rock and a hard place. Any help or advice would be awesome - but I would looking for something relatively simple being a novice.

avatar image grojguy · Feb 20, 2013 at 07:04 AM 0
Share

@yoyo, I looked at the web player demo on your website for B$$anonymous$$ovieTexture, and it looks impressive. I would be very interested in seeing the details/code for that! Thank you!

avatar image
0

Answer by Venryx · Mar 03, 2014 at 08:01 PM

You could also try a script like the following, which makes use of Mono's System.Drawing library: http://wiki.unity3d.com/index.php/AnimatedGifDrawer

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to play Video on canvas (RawImage)? 0 Answers

Ustream Support 1 Answer

video media encoder addframe texture format 5 expected to be 4 1 Answer

Play MP4 on UI? (Unity 3D 2018.2) 0 Answers

VideoPlayer decoder with multiple channels audio 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges