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
    This is simply because Google Drive displays a warning HTML that it can't scan the file for viruses as it is too large. As far as I know there is no way to bypass this without examining the received HTML code, extracting the confirmation ID and downloading again using that ID. This is just the nature of hosting with Google Drive.
     
  2. nsc_creative

    nsc_creative

    Joined:
    Nov 3, 2015
    Posts:
    14
    Hi Andrew

    I have a question regarding the "Use Fast OES Path" option for android. I'm just getting a black screen. I'm aware that this seems to be the standard issue :). I've gone into the 360SphereVideo demo and changed the texture on the Sphere to one of the two Android OES Only shaders and both seem to fail. I get a flash of pink and then nothing, indicating a shader issue I guess. Is there something else I should be doing. I'm building for a Samsung GearVR S7 setup. Something else I noticed is that the Stereo option only seems to work if you select the shader during runtime and not if it's on the object and setup before hand.

    The version of Unity I'm using is the latest beta 5.6.0f1. Let me know if any other info would be useful/

    Thanks for a great plugin.

    Phil
     
  3. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Which platform is this on? Which version of Unity? Which version of AVPro Video?

    Did you check the PDF documentation for streaming section? Some platforms (especially Apple) have certain requirements for Streaming.

    Let me know the above information so we can try to help you with this.

    Thanks,
     
  4. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    The OES shaders will fail in the editor, but they shouldn't fail in Android. Make sure you're using the latest version of AVPro Video. I'll test in 5.6.0f1 as they may have changed some functionality...
    The stereo option should definitely work by selecting during setup...
    Thanks,
     
  5. AndrewRH

    AndrewRH

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

    AVPro Video version 1.5.28 has just been released!

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

    Changes include:

    macOS / iOS / tvOS
    • Added support to ExtractFrames demo to handle videos containing rotation
    • Minor C# performance improvements
    WebGL
    • Fixed support for Safari browser
    • Added documentation about supported browsers
    Windows
    • Added support for HapQ+Alpha format
    • Fixed Unstalled event not firing
    General
    • Added some DRM notes to the documentation
    • Fixed PlayMaker example script
    Thanks,
     
  6. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes it appears that in Unity 5.6 and above the Android OES rendering path is no longer working. I would recommend using Unity 5.5.1 if you need this feature. We will try to see whether we can fix it for 5.6 but I don't think it is a feature that Unity officially support so they may have removed the ability to use it...
     
  7. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi,
    We did some more research and found that the problem was one of our shaders. I've attached the corrected file here and we'll include this change in the next update. Thanks for reporting this issue.
     

    Attached Files:

  8. Padmaraj

    Padmaraj

    Joined:
    Apr 30, 2014
    Posts:
    1
    Will AVPro Videos for windows work on Unity Personal edition?
     
  9. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes it works perfectly in Personal Edition :)
     
  10. Intellection

    Intellection

    Joined:
    Mar 25, 2017
    Posts:
    9
    Hello! great plugin, only one question before purchase. Does this plugin have feature such as changing speed of video in VR?
     
  11. AndrewRH

    AndrewRH

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

    Yes change of playback speed is supported, but you must realise that not all videos are equal when it comes to doing this. The results of changing playback speed will vary based on how your video is encoded. Videos with less B-frames and less complex encoding will be able to go to a higher playback speed as the decoder is able to process more frames per second. The plugin has a "Playback rate" option which can be changed. Try the free trial version if you would like to test it out.

    Thanks,
     
  12. ADVS

    ADVS

    Joined:
    Aug 11, 2013
    Posts:
    5
    Hi. I'm trying to get an exact stop on texturetimestamp at android. If movie not paused, all good, timestamp is correct. If I paused movie, timestamp is continue playback. When continue play movie timestamp is not relative to movie anymore.
     
  13. alaa-mohamed

    alaa-mohamed

    Joined:
    Sep 7, 2014
    Posts:
    6
    \
    The platform is Android till now and will be ios too, unity version 5.4.0 and AVPro version is 1.5.2
    Yes i'm following the documentation
     
  14. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Hi Andrew
    What is the recommended procedure to upgrade?
    First delete existing AVPro plugins folder?
     
  15. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes I believe that the timestamp does continue in Android, so when you resume playback you would need to set the next new timestamp value as the new base time. We will try to add some functions in to wrap all of this and make it easier to use for Android. Thanks,
     
  16. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    That's very strange - we don't have any problems streaming from Android. I'm not sure what else to suggest. If your have the Android WIFI turned on, and have have the "allow" internet access setting set in the Player Settings and you have a video URL (and you've tested it by using a web browser), then it should work.
     
  17. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Perhaps you could send us the android console / adb logcat log so we can see what error message it is generating...
     
  18. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    It's all in the PDF documentation :) You shouldn't need to delete the AVPro plugins folder - but you do need to make sure you've launched a new instance of Unity, without running it - so that Unity doesn't have any locks on the plugin files (as this can prevent this being updated).
     
  19. rkraig

    rkraig

    Joined:
    Dec 6, 2016
    Posts:
    6
    @AndrewRH

    You guy's may want to check your audio codec. Tested all the demo samples and one of the demo sample did not work. which was the 720p30fps video which had H.264 video w/ aac embeded video. One of the videos had no audio and it worked fine.

    Also when we played the 720p30fps video on windows, it did not work as well. I suspect this is because windows does not have support for aac audio, only mp3. In order to obtain aac audio in windows you have to install ffdshow or some other windows specific dll package to get these features out of it, and this is specifically for viewing within the editor. This has nothing to do with building on devices.

    I thought this player used like VLC or something for codec support.
     
  20. phileday

    phileday

    Joined:
    Feb 8, 2014
    Posts:
    123
    Thanks very much for the reply and update. I'll be looking at it today and will let you know if I run into any problems.
     
  21. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Which version of Windows are you running on?
    AAC is supported natively from Windows 7 and above:
    https://msdn.microsoft.com/en-us/library/windows/desktop/dd390676(v=vs.85).aspx
    Our demo videos do use AAC audio, but people are free to use whichever audio codecs they want to be compatible with their target platform.
     
  22. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    FYI all iOS / tvOS / macOS developers - AVPro Video has a new version coming out very soon (this week) with you in mind. The new version features tons of improvements for the Apple platforms. Just thought I'd let you know that it's coming..soon :) Thanks,
     
  23. shoo

    shoo

    Joined:
    Nov 19, 2012
    Posts:
    67
    Hello!
    Is available to use any kind of audio spatialisation on Android(Gear VR) via AVPro Video?
    Documentation says I can use it only at Windows platform.
     
  24. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi,
    Afraid not, it's currently only for Windows. Perhaps in the future we'll add support for this but no plans currently. Thanks,
     
  25. rkraig

    rkraig

    Joined:
    Dec 6, 2016
    Posts:
    6
    Windows 10, the video files provided in AVPro trial sample unity package were unable to be played. I suspect this is because it rely 100% on the fact that windows supports AAC, so you may want to try installing windows 10 on a vmware/virtualbox to see for yourself. If you installed a ffdshow or some other codec package on your local system this may have been why you were able to play the media's when you tested yourself. I know the files are playable on vlc, mpv, etc.. Natively my windows does not play the 720p30fps video sample. It just throws an error.
     
  26. clawmeister

    clawmeister

    Joined:
    Feb 17, 2016
    Posts:
    1
    Hi, where do I find the PlayMaker example script? Is there any documentation on how to implement it? Thanks!
     
    ijkirschbaum likes this.
  27. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    There is a PlayMaker example script in the Scripts/Components/Support folder, it's called WaitFinished.cs
    We are going to have more actions coming for PlayMaker soon.

    Thanks,
     
  28. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I'm don't think this is correct :) Unless you're using one of the K or KN editions of Windows, which don't include any of the Media Player component, it should definitely support these codecs. If you are using K/KN edition then an extra download is required from Microsoft:
    https://support.microsoft.com/en-gb...k-for-windows-10-n-and-windows-10-kn-editions
    If you aren't running one of these then I suspect that a codec pack may have tweaked your settings inaccurately and disabled some internal Windows codec support. Our video samples play do natively in Windows from Windows 7 and above, and without audio in older versions of Windows. Thanks,
     
  29. AndrewRH

    AndrewRH

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

    AVPro Video version 1.6.0 has just been released!

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

    Changes include:

    iOS / tvOS
    • Added support for linear color-space (available in Unity 5.5 and above)
    • Performance improvements, especially when reusing MediaPlayer component to load videos
    • iOS simulator support added
    macOS
    • Added support for Hap Q Alpha format (HapM)
    • Performance improvements, especially when reusing MediaPlayer component to load videos
    Android
    • Fixed OES rendering path support in Unity 5.6
    • Improved linear colour-space support (available in Unity 5.5 and above)
    • Performance improvement due to alternative way to get around checking GetNativeTexturePtr() and instead checking for when texture quality level changes
    • Removed unused AndroidManifest.xml file
    Windows
    • Performance improvement due to alternative way to get around checking GetNativeTexturePtr() and instead checking for when texture quality level changes
    General
    • Fixed DisplayIMGUI component depth value not working
    • Improved IMGUI linear color-space conversion function
    Thanks,
     
    Last edited: Mar 29, 2017
  30. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Hi Andrew
    Will AVPROVideo iOS allow me to playback video from the webcam on an iPad?
     
  31. blevok

    blevok

    Joined:
    Feb 16, 2017
    Posts:
    75
    Hi, is there any eta for the capability to load videos from local device storage/SD card on windows phone 8.1 and 10?
     
  32. nsc_creative

    nsc_creative

    Joined:
    Nov 3, 2015
    Posts:
    14
    Hi Andrew

    I'm still having problems with OES in 5.6. To try out the system I made a new project imported the latest AVpro (just released) hooked up the 360SphereVideo to be built to the android device, ticked Use Fast OES Path in AVPro, changed the sphere360 material to AVproVideo/VR/InsideSphere, Unlit (Stereo) - Android OES Only and built the apk. When running on our test device (Samsung s7) I still get a pink flash and then no video.

    Am I doing anything wrong or is there still a problem with this and Unity 5.6 (I'm having to stick with the latest Unity version as my project no longer works correct in pre 5.6 releases).

    The Unity version I'm now using is the latest 5.6.0f2 beta.

    I could zip the test project and send it you if that would help.

    Phil
     
  33. Tom-Goethals

    Tom-Goethals

    Joined:
    Mar 6, 2015
    Posts:
    102
    Using Unity 5.5.0f3 AVPro 1.6.0 gives runtime errors in console on Mac. i'm using a simple Mediaplayer and DisplayUGUI component. Set to scale to fit. a previous version worked fine. on windows and iOs its working fine.

    edit: In Unity 5.5.2f1 it is working fine on Mac.


    The error continues to run on update.

    EntryPointNotFoundException: AVPPlayerGetTextureTransform
    RenderHeads.Media.AVProVideo_OSXMediaPlayer.GetTextureTransform () (at Assets/AVProVideo/Scripts/Internal/OSXMediaPlayer.cs:502)
    RenderHeads.Media.AVProVideo.DisplayUGUI.GetDrawingDimensions (ScaleMode scaleMode, UnityEngine.Rect& uvRect) (at Assets/AVProVideo/Scripts/Components/DisplayUGUI.cs:521)
    RenderHeads.Media.AVProVideo.DisplayUGUI._OnFillVBO (System.Collections.Generic.List`1 vbo) (at Assets/AVProVideo/Scripts/Components/DisplayUGUI.cs:447)
    RenderHeads.Media.AVProVideo.DisplayUGUI.OnPopulateMesh (UnityEngine.UI.VertexHelper vh) (at Assets/AVProVideo/Scripts/Components/DisplayUGUI.cs:426)
    UnityEngine.UI.Graphic.OnPopulateMesh (UnityEngine.Mesh m) (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:447)
    UnityEngine.UI.Graphic.DoLegacyMeshGeneration () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:405)
    UnityEngine.UI.Graphic.UpdateGeometry () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:376)
    UnityEngine.UI.Graphic.Rebuild (CanvasUpdate update) (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:338)
    UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:149)
    UnityEngine.Canvas:SendWillRenderCanvases()


    Besides the above i also have an issue on iOs (both on 1.6 and the versions before).
    The mp4 videos (tried a bunch of encoding settings) are "jumping" back and forth, I think its when the application falls below the 30 or 60 fps (not sure).
    Looks like its taking an older frame and showing that again while a newer one has been shown already.

    Any idea?

    Thanks!
     
    Last edited: Mar 30, 2017
  34. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    Is streaming supported via protocols such as HTTPS, HTTP, HLS, RTSP, RTMP? If not is it possible to integrate manually if required? Thanks
     
  35. blevok

    blevok

    Joined:
    Feb 16, 2017
    Posts:
    75
    My app is based around playing HTTP progressive streams and it works great.
     
  36. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    If you record videos from your iPad webcam, then AVPro Video is able to play them. However, it does require some work on your part because you would need to know the URL to the file on disk. Our plugin doesn't have any mechanism to browse the files on disk so you would have to supply these file URLs yourself, or use some native iOS plugin to retrieve these.

    Thanks,
     
  37. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    We're trying to get this into the next version :) We're actually looking at this during the next few days.

    Thanks,
     
  38. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hmm that's strange - I'm pretty sure after we made those changes to the OES shader that it worked in 5.6. Do you get anything in the adb lot cat when running in developer mode?

    Thanks,
     
  39. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks Tom, we'll continue this thread via email.
     
  40. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    HTTPS, HTTP and HLS are well supported. RTSP and RTMP are not really supported. Android has RTMP support I believe.
     
  41. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Thanks Andrew, but was referring to LIVE video, not recorded.
     
  42. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Hi Andrew
    Is the VCR component necessary to use the video controls(scrub, volume toggle, etc)?
    It seems to depend on having 2 MediaPlayer components.

    I already have simple video playback working using just 2 components> MediaPlayer and DisplayUGUI.

    I need to add video controls by adding as little extra as possible
     
    Last edited: Mar 31, 2017
  43. marshmallowgames

    marshmallowgames

    Joined:
    Aug 1, 2016
    Posts:
    5
    Hi guys, I need your help after many days trying to figure out what is happening.

    I'm talking about Unity 5.5.0f3 and AVPRO 1.6.0. I am not able to get my videos working on Android. They do work in the editor and on iOS but never on Android (unless I select development build).

    After some logging with logcat I found this:

    AndroidJavaException: java.lang.NoSuchMethodError: no non-static method with name='SetPlayerOptions' signature='(Z)V' in class Lcom.RenderHeads.AVProVideo.AVProMobileVideo;

    This happens right after I load the video file and after that no more player callback are called.

    The same happens with Unity 5.5.2f1
     
    Last edited: Mar 31, 2017
  44. Intellection

    Intellection

    Joined:
    Mar 25, 2017
    Posts:
    9
    Hi, Andrew!
    I use 360video demo and when switching on Virtual Reality I am getting white screen at run time, could tell me how i can fix it?
    Thanks !
     
  45. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi, sorry I misunderstood.
    No AVPro Video doesn't have any ability to interact with Webcams, it is a video playback (from file or streaming website) only. Doesn't Unity's WebCamTexture support iOS webcams? Thanks,
     
  46. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    The VCR component is just an example. You should be able to either take this example and customise it yourself, or use the UnityGUI system to make new buttons and hook them up to your own script. But yes, if you're taking the VCR demo then the VCR script would be required, unless you want to script your own logic for what happens to the UI events.

    There are two MediaPlayers in order to achieve seamless playlisting. When the one video ends the second MediaPlayer is used to load the next video. Only after the next video is loaded and has a texture ready is it then used in the display but swapping the MediaPlayer in the DisplayUGUI component.

    Thanks,
     
  47. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for reporting this issue. We haven't seen this happen before. You also emailed us so we'll continue this thread via email. Thanks,
     
  48. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    The ApplyToMesh component has a "default texture" field which is displayed while the video player is loading. You could set this to a black or transparent texture instead of the default none(white). I hope that helps.
     
  49. chlolist

    chlolist

    Joined:
    Dec 11, 2012
    Posts:
    2
    Hi! I'm working on a 360 film project for Oculus Rift and Gear VR. I recently finished up the Rift version and have moved on to making an Android build for Gear.

    While the video runs fine on the Rift, on Android I'm getting weird jitter/flickering, even when playback is paused. The flickering is only on certain areas of the sphere - if I turn around 180 degrees, that area is fine. There's also a credits sequence at the beginning (just white text on black, in the same video file) that doesn't flicker either. I've set up my scene with the 360SphereVideo prefab, and I'm loading the video from an external SD card.

    I'm using Unity 5.5.0p4 and AVPro 1.6.0 building on a Samsung Galaxy S7. Any idea what might be causing this? I can email the video file if that would help too.
     
  50. CallToAction

    CallToAction

    Joined:
    Feb 10, 2014
    Posts:
    23
    I'm getting a hard crash on hitting play in the unity editor 64 using AV Pro 1.6. I've tried with Unity v 5.5.1 and 5.5.3. This is a blank project with just the AV Pro plugin unpacked, running any example scene. I tried updating my drivers for my GTX980 and that didn't work. Windows 7 - 64 bit machine

    Call stack in the editor.log
    ========== OUTPUTING STACK TRACE ==================

    0x000007FEE6EFFF17 (AVProVideo) UnityRenderEvent
    0x000007FEE6EA98A5 (AVProVideo) UnityRenderEvent
    0x000007FEE6EB0B3F (AVProVideo) UnityRenderEvent
    0x000007FEE6EB1446 (AVProVideo) UnityRenderEvent
    0x00000000247F2561 (mc_bc_dec_avc_ds) DllMain
    0x00000000247F2746 (mc_bc_dec_avc_ds) DllMain
    0x00000000247E79CE (mc_bc_dec_avc_ds) DllMain
    0x00000000247E8AE4 (mc_bc_dec_avc_ds) DllMain
    0x00000000247EA11B (mc_bc_dec_avc_ds) DllMain
    0x00000000247F1DAF (mc_bc_dec_avc_ds) DllMain
    0x00000000247FE634 (mc_bc_dec_avc_ds) DllGetClassObject
    0x0000000022D2D011 (mc_demux_mp4_ds) DllUnregisterServer
    0x0000000022D2D64C (mc_demux_mp4_ds) DllUnregisterServer
    0x0000000076EF59CD (kernel32) BaseThreadInitThunk
    0x000000007712A561 (ntdll) RtlUserThreadStart

    ========== END OF STACKTRACE ===========