Search Unity

[Released] AVPro Video - complete video playback solution

Discussion in 'Assets and Asset Store' started by AndrewRH, Feb 12, 2016.

  1. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi All,

    AVPro Video version 1.8.5 has just been released!

    You can find the updated version on the Asset Store and the free trial version on our website.

    Changes include:

    macOS, iOS, tvOS
    • Fixed issue since iOS 11 where live HLS streams refused to go higher than the device native resolution
    • Fixed a potential crash bug on old iOS versions (before 10.0) when querying audio or video bitrate
    General
    • Fixed minor bug where newly loaded subtitles wouldn’t immediately update
    Please report any issues here on the forum, or to our customer support email.

    Thanks,
     
  2. morpheux74

    morpheux74

    Joined:
    Feb 16, 2018
    Posts:
    8
    Arghh I wasn't aware of that !!
    I included that Google VR SDK in the project and it works now with cardboard. Another problem is : it doesn't work with Android OES, I get a black screen (I need to play 360° 60fps videos). Is that normal ?
    Thanks !
     
  3. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Did you switch the shader on the material to one of the special OES shaders? This is required.

    Also, you just enable the Debug GUI to make sure that the video is even loading and playing, as many devices can't play back super high resolution 60fps videos.

    Thanks,
     
  4. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Does this plugin support streaming transparent videos from youtube or some other website?
     
  5. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi,

    I don't think there are any streamable video formats that support transparency natively. VP8 is probably the only one but we don't support its alpha feature.

    Your best bet is to pack the alpha channel into a region of the video (top-bottom or left-right) and then just use a regular video codec. The MediaPlayer component in AVPro Video has a Visual menu section where you can select the type of alpha packing used and it will automatically display it as a transparent video. There is also a demo project with sample videos that shows how this works.

    We don't support streaming videos from YouTube as this is against their T&Cs, but you can host any videos yourself on a web server and either point to the MP4 or HLS file directly and it will stream into AVPro Video.

    Thanks,
     
  6. tomasnova

    tomasnova

    Joined:
    Oct 26, 2015
    Posts:
    3
    Hi, I'm having trouble playing transparency videos at an acceptable framerate on Windows (sub 10 fps with a very noticeable freeze when loading), was wondering if you could guide me what I'm doing wrong?

    Settings:
    Unity version 5.5.1f1
    AVPro versions tested: 1.6.8, 1.8.5
    Video: 1920x1080 mp4 .h264 (really short, 15s and roughly 13mb)
    OS: Windows 10
    Specs: AMD E2-3800 APU With Radeon HD Graphics 1,30ghz, 4.00gb RAM
    AVPro config: Left-Right Transparency packing (Material Unlit Transparent) using Apply To Material

    I've tried playing this video on this PC and it runs fine outside of Unity so I don't think it should be a requirements issue?
     
  7. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi,

    It's difficult to say what could be causing the performance issue. Does the Unity profiler reveal any clues?

    What frame-rate is your video?

    Is it is playing slowly then it could be related to how the video is encoded, as it may be using software decoding for some reason. Do all of the included sample videos play fine? You may want to try encoding the video for fast decode. We have some notes about how to do this in the PDF documentation.

    Another question - have you tried this on a different system?

    Feel free to send us the video so that we can take a look (www.renderheads.com/contact).

    Thanks,
     
  8. tomasnova

    tomasnova

    Joined:
    Oct 26, 2015
    Posts:
    3
    Thanks for the quick reply Andrew, I just sent my video and I'm feeling like it can be an encoding issue as you mentioned.

    We do get noticeable framerate differences when playing a regular non alpha-packed video encoded in (as far as I know) the same way
     
  9. EarMaster

    EarMaster

    Joined:
    Mar 7, 2013
    Posts:
    39
    We currently have the problem that some users don't have the required codecs installed and we want to provide them with the required DLLs needed for playback through the default Unity Build Pipeline. Do you see any possibility to include certain codecs as DLLs within a Unity project?
     
  10. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi,

    I'm not quite sure what sort of codecs you mean. We don't support loading codecs from DLLs. In Windows we only use codecs that are registered with the operating system (DirectShow for legacy systems and Media Foundation for newer systems). So the install process would have to install / register the codec filter/transform with the OS.

    I hope that helps. Otherwise please let me know more about the codec you're trying to work with.

    Thanks,
     
  11. EarMaster

    EarMaster

    Joined:
    Mar 7, 2013
    Posts:
    39
    I am aware that you use the installed codecs the systems provide. When developing with Adobe Flash (a long time ago) it was possible to just add a DLL file to the project folder and it was possible to support other codecs than the default ones supported by Adobe. I was wondering if the same thing could be done with a Unity application and AVPro.
     
  12. CosmoWu

    CosmoWu

    Joined:
    Mar 5, 2015
    Posts:
    3
    Problem description:
    Black screen occured on some android devices.
    Also i start Unity with -force-gles, based on OpenGL ES 3.1 AEP, it's still black screen on Editor.
    Device (which devices are you having the issue with - model, OS version number):
    Probablly all videos.
    Media (tell us about your videos - number of videos, resolution, codec, frame-rate, example URLs):
    Any video

    Target Platform: Android
    Unity: v2017.2.0f3 WindowsEditor
    OS: Windows 10 (10.0.0) 64bit
    CPU: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz - 8 threads - 8099KB
    GPU: Emulated GPU running OpenGL ES 3.0 - Emulated - OpenGL ES 3.0 [emulated] - 4063KB - 4096
     
  13. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    hi,
    There is a small jump when loop ends which doesnt happen when i open the video with other video player like vlc. Also when using Gear VR using the two videos for stereoscopic both videos are not synchorized, how these things could be done?
     
  14. Rosstin

    Rosstin

    Joined:
    Nov 4, 2015
    Posts:
    4
    How can we set AVPROVIDEO_DISABLE_LOGGING?
    We'd like to cleanly disable all AVPro Unity logs in the way that it's intended, but I'm having a lot of trouble understanding it. I can see the intention behind the variable, but not the exact method for changing the variable. Where should I be setting AVPROVIDEO_DISABLE_LOGGING, and how?

    The line is here, in Interfaces.cs:

    #if AVPROVIDEO_DISABLE_LOGGING
    [System.Diagnostics.Conditional("ALWAYS_FALSE")]
    #endif
    public static void LogInfo(string message, Object context = null)
    {
    if (context == null)
    {
    Debug.Log("[AVProVideo] " + message);
    }
    else
    {
    Debug.Log("[AVProVideo] " + message, context);
    }
    }
     
    Serhii-Horun likes this.
  15. Rosstin

    Rosstin

    Joined:
    Nov 4, 2015
    Posts:
    4
    Hey guys! I can see you answered my question a month ago! Thank you, and sorry for reasking.

    Andrew's answer, if anyone else finds this new comment. Thank you Andrew!

    "You can do this by going to the Global Settings section in the Media Player component, and ticking the option "Disable Logging". This will still log any errors though.

    Hope that helps,"
     
    Serhii-Horun and AndrewRH like this.
  16. Giannigiardinelli

    Giannigiardinelli

    Joined:
    May 8, 2014
    Posts:
    189
    Hello,
    I would be interested in buying your unity project but before I wanted to know if we could transfer a 2d video and put it on your program that will make it into virtual video? Is that possible?

    If you can't do this with your project, do you know of any program to convert 2d videos to VR?
    Because a lot of program its on the walk but none works!

    Thank you soon
     
  17. BirdInTheCity

    BirdInTheCity

    Joined:
    Jun 9, 2017
    Posts:
    10
    I'm playing back an 8k Hap video (4192x4192) with top/bottom stereo, and the texture displays correctly in the MediaPlayer. I then use ApplyToMaterial to assign the texture output to a "Skybox/Panoramic" material.

    In that material, the texture is rendered upside-down (and possibly inside-out).
    The settings for this material are:
    Spherical (HDR): The rendered texture
    Mapping: Latitude Longitude Layout
    Image Type: 360 Degrees
    3D Layout: Over Under


    Any idea how to fix? During Play mode, it seems to be playing back correctly, minus the vertical flip.

    Thanks!
     
  18. risto_aa

    risto_aa

    Joined:
    Apr 3, 2018
    Posts:
    12
    I have a 2880 x 1440 180 stereo video. I started blank project, imported avpro, opened the 180 demo, changed the sample video to my own, made it left-right. Video plays okay, shows left and right eye correctly, but the scale is off. What do I do? How do I make the Avpro to recognize this 2880 x 1440 resolution? My video is exported from Premiere Pro CC, without "video is vr" flag turned on, so metadata shouldn't be an issue (as what I managed to found out while searching this topic..)

    Thanks in advance.

    Edit.

    I managed to get the scale somewhere around the correct neighborhood, by altering the x, y, z parameters: X=5,3, Y= 3,2, Z=5.

    This can't be the proper way. DeoVR player plays my video perfectly and DeoVR is made with AvPro.

    Custom shader or something?

    I am lost.
     
    Last edited: Apr 21, 2018
  19. xpansivevr

    xpansivevr

    Joined:
    Jun 22, 2016
    Posts:
    27
    The 180 demo is not setup correctly. it stretches 180 sbs content vertically.

    I've reported the issue twice and its still not been resolved...
     
    risto_aa likes this.
  20. risto_aa

    risto_aa

    Joined:
    Apr 3, 2018
    Posts:
    12
    Ah, ok. Been scratching my head for awhile with this. So, basically there is no solution to 180 video at the moment? Other than custom workarounds, that require beyond expert skill set?

    Unity's own SkyBoxPanoramic shader just gives amazing stutter to my video.

    Oh well. I'll put this project to stasis then. Just to let Renderheads know, I have my finger on the button instantly to purchase your product, when this is solved. Wink wink.
     
  21. greg424242

    greg424242

    Joined:
    Sep 27, 2017
    Posts:
    7
    Hello, i have deep latency spike when changing playback rate.
    * 85 ms on old device.
    * 25 ms on recent device.

    On old device when changing the playback rate the video don't play as expected (rollback to first frame or others strange issues).

    Can you provide a fix ? or a better handling of playback rate.

    Thank you.
     

    Attached Files:

  22. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    Hi,

    On what platform is this?

    Kind Regards
    Sunrise
     
  23. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    Hi,

    This is possible for Windows DirectShow where you can register third party codecs. Otherwise the encoders are limited to the ones provided by the system.

    Kind Regards,
     
  24. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    Hi,

    So is the video not working in windows editor where the platform is set to android, or is it not working on the actual android device?. The reason I ask is because windows decoders are used on the windows editor regardless of what you set the platform as.

    Also by all videos, does this include the demo videos? Can you email us a test project that exhibits this?

    Kind Regards,
     
  25. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    Hi,

    Seamless looping is currently not supported by AVProVideo. One way you can get around this is by having 2 mediaplayers and doing pingpong between them, but of course if the video resolutions are too high, the device wont support this.

    With regards to stereo desync, two videos will desync. You will need to encode both eyes into a single video and then just set the stereo options in the MediaPlayer.

    Kind Regards,
     
    dienat likes this.
  26. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    Hi,

    What do you mean virtual video? You can definitely map the video from AVProVideo to a material, which can be put on a model if that is what you mean. We do offer a fully featured watermarked trial version here, so you can see if it does what you need it to.

    Kind Regards,
     
  27. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    Hi,

    Is the texture the right way around in the preview? Also what unity version is this?

    Kind Regards,
     
  28. heavy_thebrit

    heavy_thebrit

    Joined:
    Mar 2, 2017
    Posts:
    8
    Any solutions for Chroma Keying using the plugin? There are a few on the store but they all seem to require custom shaders, which will conflict with this plugin.
     
  29. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    Does the stereo option work with alpha? If i make one video which is made of four parts, in the left the rgb for left eye, then the alpha for the rgb for left eye, the rgb for right eye and then the alpha for the right eye,that would work?
     
  30. MCJeremy87

    MCJeremy87

    Joined:
    Apr 25, 2018
    Posts:
    3
    I can play the video in the unity normally,but when I build an apk, running the app on the Android phone,
    the video rate is very low.I don't know what's wrong.Just play 1 video.
     
  31. Sam0waR

    Sam0waR

    Joined:
    Nov 30, 2015
    Posts:
    26
    Is it possible to play video from IDBFS (IndexedDB) in WebGL?
    The idea is to download (cache) video locally and do not stream each time.
    I can store video file to the path returned by Application.persistentDataPath. But when I set this path for the player, I get the following error in the browser's console:
    [AVProVideo] Failed to open /idbfs/554a6258f3e4e6a6c6503d99311da194/Intro.mp4
    I tried to use 'file://' proto for that path but also failed.
    I read it is possible to implement in pure HTML5/JavaScript.
     
  32. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    Hi,

    Something you could look to do the chromakey externally, and then pack the key and fill into the video which gets passed to the plugin.

    Kind Regards,
     
  33. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    I think so... can't say for certain. I do believe you can do left right stereo, top down alpha (so your video is divided up into 4 sections) or vice versa and that should work assuming you are using a shader that supports both.
     
    dienat likes this.
  34. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    Hi,

    Can you provide us a more thorough description of your video? Also can you provide us more info on your scene? Android and Windows have very different processing capabilities, as well as decoders, so it is difficult to say what the issue is without more information.

    Kind Regards,
     
  35. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    Hi,

    I personally haven't used idbfs before. We pass the path directly to the html5 video, so if the path can work directly with the video tag, it should work. But as I said, I haven't worked with it before so it's difficult to say if it's possible without modifying the javascript side of AVProVideo somehow.

    Kind Regards,
     
  36. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    What do you mean by top down alpha?
     
  37. baksarbed

    baksarbed

    Joined:
    Sep 29, 2016
    Posts:
    2
    Hello, SunriseRH!
    I have a problem with AV PRO.
    When I record video on iPhone, then try open on android I have the error:
    : [AVProVideo] Error: Loading failed. Codec not supported or video resolution too high or insufficient system resource s.
    but if I record in android and open on iPhone all is good.
    I use:
    AV Pro 1.7.4, Unity 2017.3.1p1.
    Samsung S8 and iPhone 5

    Help me please,
    Kind regards,
    Yaroslav
     
  38. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Yaroslav,

    I think the issue is that the video is a MOV file, but Android doesn't support MOV by default. If however you switch the Video API to ExoPlayer then it should work. You can do this in the MediaPlayer component in the Platform Specific > Android section. You could also try renaming the file to .mp4 instead of .mov - but we haven't tried this idea ourselves.

    Thanks,
     
  39. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    This is a video with the top half contains the video and the bottom half contains the alpha channel data.

    You can see this option on the MediaPlayer in the Visual section there is an option called "Alpha Packing". We also include a top-bottom alpha sample video in the StreamingAssets folder.

    Thanks,
     
  40. xpansivevr

    xpansivevr

    Joined:
    Jun 22, 2016
    Posts:
    27
    Andrew, when are we going to get support for 180? What we need is the demo scene to support a stereoscopic 180 crop in equirectangular format with either SBS or TB stereo packing.

    Content example here:

    The image quality benefits of 180 for mobile VR video are worth it when compared to 360 stereoscopic video.

    360 stereoscopic : 3840x2160 = 1080x1080 per eye. Max playback resolution on mobile via AVP

    180 stereoscopic : 3840x2160 = 1920x1920 per eye.

    Cheers - Nick
     
  41. kevinpttrns

    kevinpttrns

    Joined:
    Sep 5, 2017
    Posts:
    7
    Hi Andrew,

    Thank you so much for your hard work. We purchased this plugin a while ago and have since used it successfully in many projects. I did have a quick question however; will you be supporting Ambisonics/Facebook 360 audio on iOS at some point? If so, do you have any idea what time frame we might be looking at?

    Thanks again.
    Kevin
     
  42. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Nick,

    Could you try opening the 12_Demo_180SphereVideo sample scene, going to the Sphere gameobject and changing the mesh from HalfSphere to the standard Sphere mesh. Then go to the ApplyToMesh and set the Scale X value to from 1 to 2. Run the scene - does that give you the results you're after?

    If so I will look at how to integrate this in a more seamless way.

    Thanks,
     
  43. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Kevin,

    I'm afraid that we don't currently have any plans to implement the Facebook 360 support on iOS. We haven't found a good way to integrate support for it into iOS so it's been put on the back burner.

    Thanks,
     
  44. risto_aa

    risto_aa

    Joined:
    Apr 3, 2018
    Posts:
    12
    I changed the HalfSphere to OctahedronSphere (I couldn't find "a standard Sphere mesh") and changed X value to 2, then at Transform --> Rotation --> the Y value to 90. Now it looks like it's supposed to look, but it's also mirrored to behind, so there's two screens.

    Getting closer! :)
     
    AndrewRH likes this.
  45. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Okay cool :) Thanks for reporting back! I will continue investigating... We're about to release a new version and it would be nice to get this fix in for that.
     
  46. xpansivevr

    xpansivevr

    Joined:
    Jun 22, 2016
    Posts:
    27
    Sounds promising! if possible can you keep the option to set a transparent edge to the projection. This helps when blending the video into a 360 background.
     
  47. Brightline

    Brightline

    Joined:
    Apr 14, 2014
    Posts:
    7
    Is there a way (even internal to AVPro) to know exactly what frame is being displayed at any given time? We're doing video overlay using corner pin data from After Effects, and it needs to be framesynced to look right. We're OK with being locked to a specific version or a specific codec/configuration (it's on Windows). Relatedly, when in the Unity frame lifecycle does AVPro update the displayed video frame?
     
    Last edited: May 8, 2018
  48. pitt_unity

    pitt_unity

    Joined:
    May 9, 2018
    Posts:
    3
    Bug Report

    - AVPro Version: 1.8.5
    - OS: Android with ExoPlayer
    - Details: IMediaControl.IsPlaying() returns false while a video is playing after buffering finishes.
     
  49. HeavyProduction

    HeavyProduction

    Joined:
    Aug 12, 2016
    Posts:
    28
    @AndrewRH
    I'm noticing that on Android the videos are upside down and flipped compared to iOS or the Editor where they appear correctly. I am using the ApplyToMaterial script.

    I'm running latest version of AVPro Video, Unity 2018.1.0f2, Android with ExoPlayer support.
     
    Last edited: May 9, 2018
  50. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    That's VERY strange...Haven't seen that before :)

    Try see if using the ApplyToMesh script behaves correctly instead?

    Or perhaps your material has a negative scaling in the Y channel?

    Do they appear flipped when you use our sample scenes?

    Thanks,