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

The current state of video support in Unity.

Discussion in 'Editor & General Support' started by brianchasalow, Mar 8, 2015.

  1. brianchasalow

    brianchasalow

    Joined:
    Jun 3, 2010
    Posts:
    208
    I think it's time we discuss with Unity Technologies the current state of video on various platforms. The question of video in Unity is beyond just iOS and OSX support. We really need a unified accelerated video player for numerous platforms - users shouldn't have to fork out hundreds of dollars for video plugins (that don't always work so well on certain platforms, in my experience. I've bought and tried almost all of them.)

    Among the platform landscape-
    -Windows: the 3rd party plugins I've tried are far from ideal.
    -OSX: any 3rd party video plugin on OSX is going to unnecessarily use excessive texture memory, by the nature of Unity's plugin system. CreateExternalTexture doesn't really work properly on OSX...
    -iOS: Unity provides a preliminary native video player in the iOS trampoline, but it's really feature-thin and not integrated with an OSX/editor version. Does anyone actually use this?
    -Android
    -WebGL:
    this one is definitely possible, utilizing html5 video. It's not that difficult, if Unity does it themselves.

    Looking at feedback.unity3d.com- I found this post from 6 years ago, in 2009
    http://feedback.unity3d.com/suggestions/video-h264-support
    where Aras mentioned h264 licensing is an issue. Presumably that is no longer an issue for most platforms given Cisco's OpenH264 terms?
    We've seen the unmentioned, work-in-progress video support integrated with the Director feature, that was sneakily shown in the Unite conference demos- so presumably they're working on it...

    Let's discuss!
    Unity Technologies- What can you tell us about your roadmap for video? it's been a long wait :)
    Unity users- If you have used a 3rd party video plugin, please post your experiences here.
     
    Last edited: Jul 12, 2015
    lfree, JoRouss, Purpleshine84 and 6 others like this.
  2. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    We would really like to see the return of VTP as its a core product for some of the solutions we provide to our customers. Its a little disappointing its been pulled from the store, but I hope you do return it at some point.

    As for our experience, we currently use VTP for iOS video playback. This works on all devices for us (as long as the video is not too high in resolution) and its incredibly easy to setup.
    For Android we use EasyMovieTexture. It integrates with the Android Media Player on all devices. The plugin has been actively supported recently, with lots of updates and feature additions. Its a bit slow at times (I assume due to the nature of how plugins work on Android) but once the video is loaded it usually works fine.

    We use to use MobileMovieTexture but issues with the Unity Editor, problems on Android devices and lack of audio support has forced us to use the above more recently.

    I really hope that Unity do provide an update as to their stance on video playback. Its something we rely on heavily in our business ventures, and having a native integration would be great news.

    Adam
     
  3. niall1111

    niall1111

    Joined:
    Nov 29, 2013
    Posts:
    14
    Myself and everyone I show this to are amazed that the functionality in VTP isn't built into the editor yet, especially for iOS playback. The ability to skin your own video player seems trivial...
     
  4. Visual_Lies

    Visual_Lies

    Joined:
    Nov 3, 2014
    Posts:
    17
    I also use VTP - find it essential to my work. I would love to see Unity provide a response on this.
     
  5. ollin

    ollin

    Joined:
    Mar 15, 2015
    Posts:
    1
    Hello,
    For us, it is part of a core module in several of our solutions. Maybe, you can share the rest of the source code ?
     
  6. nikokoneko

    nikokoneko

    Joined:
    Feb 20, 2015
    Posts:
    35
    I am another happy user of VTP who would love to see Unity's response on this issue.
     
  7. DerrickBarra

    DerrickBarra

    Joined:
    Nov 19, 2013
    Posts:
    210
    Bumping to show my support for this issue. The app I'm working on would benefit heavily from unified video texture support in H264 MPEG format. If we had that it would be possible to load in video from youtube as a texture by talking to their API.
     
  8. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Is there a way to get hold of Unity to get their feedback on this?
     
  9. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    I could never get a 1080p pre-rendered scene to render as a video in unity, not even on beast PCs, but when I saw the 'new' video encoder, I was a little relived, so waiting for Unity's response...
     
  10. c_andrews

    c_andrews

    Joined:
    Jan 26, 2015
    Posts:
    106
    We're currently building a very video intensive app for IOS and Android and using Mobile Movie Texture which is working well but it lacks audio support we are having syncing issues with longer audio files. It would be amazing if Unity could modify the current video API so that we had more control on mobile instead of having to go FullScreen.

    We're also interested in Unity's plans...
     
  11. DerrickBarra

    DerrickBarra

    Joined:
    Nov 19, 2013
    Posts:
    210
    For anyone interested, I was reading through the forums yesterday and found that PowerUI (unity plugin from the asset store) might be a potential solution to some of our video needs. They have a WebM extension for their plugin called Super8 that looks promising (supposedly it allows youtube playback on all platforms minus Webplayer/WebGL, and WebM on Webplayer/WebGL). I haven't tested it myself yet, but I thought it was worth pointing out...

    http://forum.unity3d.com/threads/powerui-powerful-html-css-ui-framework.196144/page-5#post-2070343
     
  12. Studiomaurer

    Studiomaurer

    Joined:
    Sep 5, 2012
    Posts:
    56
    For most of my projects video support is crucial and I never got why this topic is obviously way down the priority list at unity. Is was very happy with VideoTexture Pro 2(thanks!) as it was the only affordable solution that would actually work. Hope it will be back up soon. Of course I'd be interested in unity's timeline...

    In the meantime I wouldn't mind paying for the plugin to keep you developing and making it perfect. I hope they will offer you a job then to fix the situation :)
     
  13. DerrickBarra

    DerrickBarra

    Joined:
    Nov 19, 2013
    Posts:
    210
    Just as an update to everyone I tested out PowerUI but at this point their Super8 plugin isn't far enough in development to be used as a solution.

    I'm currently investigating uWebkit, and even though it's PC/Mac desktop only, it might possibly provide a solution to allowing at least webM video playback on a texture. I've gotten youtube video's to play on a texture already, but I've been unable to get them to loop (which is critical for the application I'm working on).
     
  14. DerrickBarra

    DerrickBarra

    Joined:
    Nov 19, 2013
    Posts:
    210
    After thoroughly running through uWebkit I have the following results...

    1) Youtube playback is limited to 360p quality.

    2) Youtube looping does not working natively, you must use the iFrame api and set up a timer system to loop the video yourself, and you cannot achieve gapless looping. (It's also not possible to achieve gapless looping with having two youtube videos getting switched out when one finishes, as you cannot buffer a video before playing it).

    3) Youtube video plays at a sub-30fps on high end machines, and can only play videos when youtube has a .webM version.

    4) I have not tried native html5 video playback, but I would suspect that webM and ogg video files would be the only available formats.
     
  15. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    I am in too for possibility of streaming video inside unity without importing it.
     
  16. HugoZandel

    HugoZandel

    Joined:
    Mar 11, 2014
    Posts:
    52
    You can stream Theora/Vorbis videos using the WWW class.
     
  17. DerrickBarra

    DerrickBarra

    Joined:
    Nov 19, 2013
    Posts:
    210
    Just got through running Coherent UI through its paces, here are the results...

    1) Youtube playback is available at 60fps, 1080p.

    2) Youtube looping works as intended. Unlike with uWebkit, all of the Youtube API events are actually detected and you can respond to them. This means that with some clever scripting you can achieve Youtube looping with seamless/gapless playback. If anyone wants help getting this to work then let me know and I'll share the scripts.

    3) HTML5 video playback is said to work just as well, which given that the Youtube player is also using the webM codec, I would take their word for it.

    4) Youtube audio also works perfectly, and multiple video/audio players can be active at once without any performance degradation (besides what your system can normally handle, of course).

    Coherent UI Cons
    No Webplayer/WebGL build compatibility. (although it might be possible to play a youtube video in WebGL behind the unity player on the webpage itself, it was mentioned on the forums before but I haven't tried it myself, avoiding the need for Coherent UI on that build type).

    --Things To Test--
    1) I haven't tested this on mobile yet, but Coherent says there's limited support, so I'll have to find out first hand.
     
    Last edited: May 28, 2015
  18. DerrickBarra

    DerrickBarra

    Joined:
    Nov 19, 2013
    Posts:
    210
    Testing Update:

    Coherent UI 2 can play webM and ogg files with seamless looping using the HTML5 video loop parameter, no need to code in a javascript solution (most looping solutions I've seen are not true seamless loops, so this is a surprise).

    Unfortunately Coherent UI 2 cannot be used in mobile builds at this time (they're working on it), which means that for now all Coherent logic needs to be wrapped in pre-processor statements so that mobile builds still work.
     
  19. Jerome-Maurey

    Jerome-Maurey

    Joined:
    May 6, 2013
    Posts:
    6
    Hi Brian,

    Thank you for bringing this up and trying to get Unity's attention.

    We are Unity Pro customers creating apps for Windows, Mac, iOs & Android. These are video heavy and we have to rely on third party plugins:
    • RenderHead for desktop
    • MobileMovieTexture for mobile
    The lack of video support in Unity is staggering.

    Cheers,

    J.
     
  20. theobject

    theobject

    Joined:
    Oct 6, 2010
    Posts:
    7
    I cannot chime in forcefully enough. Video playback for present day application development is a must, and it is almost non-existent on the Unity platform. Flash has better video capability than Unity!! All of the existing solutions to get it to play in Unity are terrible buggy hacks. Yes, even those things in the asset store. I have tried every single one, and they all have major compromises or flaws. The fact that modern, dependable video playback is not even on the roadmap is disturbing.

    I call on the Unity development community to make some noise on this one!
     
    jjjack likes this.
  21. c_andrews

    c_andrews

    Joined:
    Jan 26, 2015
    Posts:
    106
    I've actually just had to switch to using Adobe Air and Stage3D for one of my projects as we were having so many issues. Its a shame that Unity has not looked at this or given us a response as to why it is not something that is being looked at.
     
  22. HugoZandel

    HugoZandel

    Joined:
    Mar 11, 2014
    Posts:
    52
    How's Air? I haven't touched it in about two years. We switched to Unity two years ago because Air was so buggy and they were ignoring important bug reports.
     
  23. jjjack

    jjjack

    Joined:
    Aug 19, 2008
    Posts:
    22
    This is too bad. I've been away for a while and was hoping Unity 5 would finally step up and fix the long-standing video playback situation. I opened the last project I was working on from v4, using VTP, to find it won't work in 5. I don't understand why this is such a low priority....
     
  24. EdMLKWD

    EdMLKWD

    Joined:
    Apr 25, 2014
    Posts:
    1
    Bink video from RAD Game Tools is available now for Unity. For Unity currently they are supporting Windows, Mac and Linux. iOS and Android is in the works. I've used Bink extensively in the past and found it be really awesome. Being able to supply an Alpha channel as part of the a video is amazingly handy!
     
  25. cadpeople

    cadpeople

    Joined:
    Nov 6, 2014
    Posts:
    21
  26. code-blep

    code-blep

    Joined:
    Oct 1, 2010
    Posts:
    308
    I have to agree with @brianchasalow, video in Unity is something that I really wish was better supported. I've looked at the roadmap and there currently seems to be no sign of plans to improve it. Maybe they will look at it with the whole AR/VR scene taking off.
     
  27. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    When I asked at Unite Europe this year they didnt seem to think there was any requirement to improve anything... Said if we had any issues to report we should speak with the dev teams. So im not sure anything is coming.
     
  28. code-blep

    code-blep

    Joined:
    Oct 1, 2010
    Posts:
    308
    mimminito likes this.
  29. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    Hi all,
    i want to inform you about my cross-platform video solution i'm planing to release on the Assetstore : mpmp (multi platform media player)
    I'm almost ready for a public release and uploaded a first short video .



    I will open a new thread about this but here some information:
    It works on Windows 8+ (Editor & Standalone), Android, OSX(Editor&Standalone) and iOS.
    For best performance it uses different native media frameworks :
    Windows: Media Foundation
    Android: Media Player
    OSX/iOS: AVFoundation

    In my tests i had no problem to play HD videos on every platform.
    I hope that i get a public demo version (with a watermark) released in the next days so you can test it and give feedback before it is going in the Assetstore.
     
    AcidArrow, roryo, code-blep and 2 others like this.
  30. Studiomaurer

    Studiomaurer

    Joined:
    Sep 5, 2012
    Posts:
    56
    @sloopydoopy: FINALLY someone pulled this off! Thank you very much!
    I was just about to integrate video into my current project. I'm feeling lucky today and would be willing to take a risk :) When would a commercial version be available?
     
  31. radimoto

    radimoto

    Joined:
    Aug 23, 2012
    Posts:
    257
    Sounds awesome @sloopidoopi - looking forward to trying it out
     
  32. code-blep

    code-blep

    Joined:
    Oct 1, 2010
    Posts:
    308
    Yep, I'll be taking a look at this as well @sloopidoopi - Will there be any kind of VR support (projecting on to spheres etc)?
     
  33. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    @Hexagon Neuron I'm not familiar with all the considerations when publishing for VR but as this is just a normal Texture2D on the Unity site ( external texture) there should be no problems. You can use every shader that has a _MainTexture property and every mesh you want. So it should integrate as transparent as possible into the normal Texture2D workflow of Unity.
     
  34. code-blep

    code-blep

    Joined:
    Oct 1, 2010
    Posts:
    308
    Great wasn't sure if you were doing anything to funky ;) Will give it a go soon in a GearVR / Cardboard Apps. If I bump into any problems I'll let you know!
     
  35. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
  36. bradsears

    bradsears

    Joined:
    Jun 30, 2015
    Posts:
    12
    Congratulations. I'll be your first customer.
     
  37. dmko

    dmko

    Joined:
    Jun 15, 2014
    Posts:
    65
    Cool, any problems with audio sync?
     
  38. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    I realized nothing on my devices. As it uses the native players that are best suited for every platform there should be no latency.
    Is there any video solution for Unity that has audio sync problems?
     
  39. bradsears

    bradsears

    Joined:
    Jun 30, 2015
    Posts:
    12
    It is great to hear about no audio sync issues. Peopel in this thread and others I have seen complain about audio getting out of sync.

    Do you support an alpha channel on video? That would be the cherry on top for me. Can't wait to test this.
     
  40. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    You can use every Unity shader that has a '_MainTex' property .(So almost every shader :D ) But there are performance differences. The best is to stay with the good old Unlit/Texture shader.
    In the next hours i will open a new WIP thread so this thread is not hijacked anymore.
     
    AcidArrow likes this.
  41. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
  42. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    >Insert Noise
    I noticed that xiph have another project http://xiph.org/daala/

    Sounds promising, hopefully 2016 they make more progress on it. Even Webm integration has been suggested... at this point I don't care, even cross platform bink1 support would be good, they at least provide authoring tools that make it easy to re-encode to target quality etc. And alpha support, reminds me of Flash, could do some cool things.

    Anyway built in movie texture that works across all platforms and brings file/quality and support upto speed. What is currently supported might have been ok 5years ago, it just looks like a joke unity now and apple quicktime req to be installed on windows eergh.. No just no.

    I wanted to use video in my game, after looking at things though, it not even worth the hassle.
     
  43. byARFontoura

    byARFontoura

    Joined:
    Dec 16, 2015
    Posts:
    2