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
    Ahh I see. That's still strange though. Could you send over the specs of the videos? Again sending us a reproducible case is the best bet for getting these issues resolved quickly.

    Thanks,
     
  2. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for reporting this. Which platform is this on, and which version of AVPro Video + Unity are you using? Consider posting this to our Github Issues page.

    Thanks,
     
  3. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    You could rename the files to .bin - that might work, at least to stop most people. I'm afraid we don't have any other solution currently (except on Android where there is the ability to specify file offset when loading). You could also package the file into your own encryped zip file..then decrypt it to a temporary system folder on startup and play the files from there.

    We are looking at how we can hide video files in the future.

    Thanks,
     
  4. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Strange that Unity doesn't detect any changed files. We have a section in the PDF documentation about how to upgrade if you have multiple unitypackages for different platforms. Perhaps try deleting the file "/Assets/Plugins/iOS/libAVProVideoiOS.a" and then import the iOS package...deselect everything except this file.

    I hope that helps.
     
  5. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hmm that's strange. Perhaps you could send over a video sample so we can investigate this? I haven't heard of this black frame issues before...
     
  6. AndrewRH

    AndrewRH

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

    Yes the GetTexture() is usually returning a RenderTexture, which can't be cast to a Texture2D.

    We have a helper method you can call:

    Code (CSharp):
    1. _mediaPlayer.SaveFrameToPng();
    You can also look at this helper method in the Helper static class:


    Code (CSharp):
    1.         // Converts a non-readable texture to a readable Texture2D.
    2.         // "targetTexture" can be null or you can pass in an existing texture.
    3.         // Remember to Destroy() the returned texture after finished with it
    4.         public static Texture2D GetReadableTexture(Texture inputTexture, bool requiresVerticalFlip, Orientation ori, Texture2D targetTexture)
    This method will convert a RenderTexture into a readable Texture2D, which you could then use with your original code:

    Code (CSharp):
    1. Texture2D tex = Helper.GetReadableTexture(_mediaPlayer.TextureProducer.GetTexture(), _mediaPlayer.TextureProducer.RequiresVerticalFlip(), Helper.GetOrientation(_mediaPlayer.Info.GetTextureTransform(). null);
    2.  
    3. byte[] data = tex.EncodeToPNG();
    4.  
    5. Texture2D.Destroy(tex);
    Thanks,
     
  7. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hmmm that's strange.. If your StreamingAssets folder is large, then it could be an issue running out of memory. We will investigate this.

    I have also read that just calling Application.Quit doesn't quite quit the app properly on Android, so you might want to try another method like in this post:
    https://stackoverflow.com/questions/45636512/application-quit-wont-work-on-android

    Thanks,
     
  8. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    We weren't aware of this....That is a shame. Hopefully someone at Microsoft can resolve this!
     
  9. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    We will investigate this. It might also be worth sending a message to Oculus. I can't see anything from their changelog that would suggest any changes to their video playback system...

    I'm also surprised to hear that the multi-pass rendering is faster than single-pass :)

    Thanks,
     
  10. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I recommend contacting Oculus. They may have changed something by mistake and haven't realised it.
     
  11. blanx

    blanx

    Joined:
    Feb 26, 2016
    Posts:
    73
    Actually I think it is something with the "AVProVideo-VR-InsideSphere" shader. Currently I use it to put just a stereo panorama on a sphere instead of a movie and there it also flickers all the time. So nothing about the movie player.


     
  12. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Ahh interesting
    Are you using single or mulit-pass VR rendering? Does it make any difference if you change this?

    Thanks,
     
  13. blanx

    blanx

    Joined:
    Feb 26, 2016
    Posts:
    73
    Yes I am on multi pass because single pass would not work with post processing on oculus go. So no chance to test it.
     
  14. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks, and which Android OS version is your device running on GearVR where you're having this stereo issue with the shader?
     
  15. blanx

    blanx

    Joined:
    Feb 26, 2016
    Posts:
    73
    Running on Oculus Go. It should be up to date. Not sure which OS version
     
  16. RZetko

    RZetko

    Joined:
    Jan 8, 2017
    Posts:
    1
    Could someone please help me out with dynamically generating thumbnails for list of videos? It's been already posted in here but code mentioned there is not working and only other way I found was to use event OnFirstFrameReady but I can't really use that because I'm doing generating in coroutine which goes through list of videos and I can't pass variables from there to event handler https://forum.unity.com/threads/rel...playback-solution.385611/page-47#post-3448627

    Thanks for help
     
  17. LeaSchorling

    LeaSchorling

    Joined:
    Mar 7, 2018
    Posts:
    2
    Perfect, thanks a lot!
     
  18. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Did you take a look at the 06_Demo_FrameExtract.unity demo scene?

    Thanks,
     
  19. terminusfilms

    terminusfilms

    Joined:
    Mar 4, 2019
    Posts:
    1
    Two questions about PlaylistMediaPlayer script:

    1) For the life of me, I can't figure out how to create a playlist of video files (I have about twelve videos I want to add to a playlist). In the Inspector of my project I see the word "Items" but no way of actually adding items. I see in AVPro's "Demo_PlaylistTransitions.unity" project that there are three items listed in the Inspector. How were these items added?

    2) Is there a way to have a trigger in a scene (a box collider in a doorway threshold) trigger the PlaylistMediaPlayer script to jump to the next video in the playlist? I like that the videos in a playlist play in succession if you just let them just go, but I also want ways of jumping to the next one via triggers in a scene.

    Thanks for any help people can provide.
     
  20. TheKevWill

    TheKevWill

    Joined:
    Jan 9, 2017
    Posts:
    3
    TROUBLE Exiting My APP when AVPro plugin is running! Hey folks...I am having a SERIOUS problem that is causing crashing in my App. Apparently when exiting my app on Android devices (does not affect iOS version)...the AVPro plugin (latest version from assett store) is not properly unloading from the system memory...and if the user then restarts the app quickly before AVPro removes itself from system memory the played will not open in the app at all! Is there some extra command or specific command that I should place in the app that executes when existing to remove the AVPro player from the system memory instantly? I am trapped unable to update my presently released app due to this issue! Thanks folks.
     
  21. ReadyPlayGames

    ReadyPlayGames

    Joined:
    Jan 24, 2015
    Posts:
    49
    The Phone is not running out of memory as far as I can tell, it's a rather recent/beefy phone too.

    I tried out the ideas mentioned in that forum post to no avail, unfortunately. The "Kill" function didn't seem to get called/do anything. I also tried Application.Unload() which also did not solve the problem.

    Thank you so much for looking into this! You're a champ!
     
  22. NS24

    NS24

    Joined:
    Feb 21, 2018
    Posts:
    15
    Great to hear that I'm not going completely mad...

    I did inform Oculus here, but no response as yet.

    https://forums.oculusvr.com/develop...s-integration-for-unity-v1-34-01-31-19#latest

    Nalin
     
  23. NS24

    NS24

    Joined:
    Feb 21, 2018
    Posts:
    15
    AndrewRH likes this.
  24. indie_mike

    indie_mike

    Joined:
    Nov 7, 2016
    Posts:
    29
    Hey Andrew,

    Is it possible in AVpro to load a 4k video but render it out to the media player at a lower resolution?

    Thanks!
     
    Last edited: Mar 12, 2019
  25. ReadyPlayGames

    ReadyPlayGames

    Joined:
    Jan 24, 2015
    Posts:
    49
    Update for my issue, it seems that this is an Android/Unity problem and AVPro was just caught in the crossfire. We decided to just remove the "exit" button from our application.
     
  26. RichardRevesz

    RichardRevesz

    Joined:
    Jul 4, 2018
    Posts:
    12
    @AndrewRH Hi, I have issues with the AVPro:

    - Unity 2018.2.17f1
    - AVPro Trial version, clean import to an empty project, Scene 03_Demo_VideoControls (same issue with any builds)
    - Samsung Galaxy S8, Android 9.0 (Had the same issue on 8.0), so I build for ARM64

    I get AndroidJavaException on the built app running on the phone.
    I have trouble copying the text from the debugger plugin's window, but it is basically saying java.lang.UnsatisfiedLinkError ... couldn't find "libAVProLocal.so"

    Any idea what I am missing?
    Thank you in advance.
    Richard
     
  27. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Not totally sure...but if you're building for ARM64, make sure the plugin has the correct architecture settings.

    You can do this in /Assets/Plugins/Android/Libs/arm64-v8a

    click on each of the files in there, and make sure it's set to Android ARM64.

    Thanks,
     
    DigitalNerds80 likes this.
  28. RichardRevesz

    RichardRevesz

    Joined:
    Jul 4, 2018
    Posts:
    12
    @AndrewRH
    Thank you for the quick response.

    You are right, I have had not checked the arm64-v8a libs for android build.

    However, it still does not manage to work.
    I just realized I could use ADB for this.
    So here is the snippet I think relevant.

    Any other idea?
    Your support is much appreciated.


    03-12 15:22:21.171 11587 11658 E Unity : AndroidJavaException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/base.apk"],nativeLibraryDirectories=[/data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/lib/arm64, /data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn't find "libAVProLocal.so"
    03-12 15:22:21.171 11587 11658 E Unity : java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/base.apk"],nativeLibraryDirectories=[/data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/lib/arm64, /data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn't find "libAVProLocal.so"
    03-12 15:22:21.171 11587 11658 E Unity : at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
    03-12 15:22:21.171 11587 11658 E Unity : at java.lang.System.loadLibrary(System.java:1669)
    03-12 15:22:21.171 11587 11658 E Unity : at com.RenderHeads.AVProVideo.AVProMobileVideo.<clinit>(AVProMobileVideo.java:487)
    03-12 15:22:21.171 11587 11658 E Unity : at java.lang.Class.classForName(Native Method)
    03-12 15:22:21.171 11587 11658 E Unity : at java.l
    03-12 15:22:21.171 11587 11658 I com.Test.test: Rejecting re-init on previously-failed class java.lang.Class<com.RenderHeads.AVProVideo.AVProMobileVideo>: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/base.apk"],nativeLibraryDirectories=[/data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/lib/arm64, /data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn't find "libAVProLocal.so"
    03-12 15:22:21.171 11587 11658 I com.Test.test: (Throwable with no stack trace)
    03-12 15:22:21.171 11587 11658 I com.Test.test:
    03-12 15:22:21.176 11587 11658 E Unity : AndroidJavaException: java.lang.NoClassDefFoundError: com.RenderHeads.AVProVideo.AVProMobileVideo
    03-12 15:22:21.176 11587 11658 E Unity : java.lang.NoClassDefFoundError: com.RenderHeads.AVProVideo.AVProMobileVideo
    03-12 15:22:21.176 11587 11658 E Unity : at java.lang.Class.classForName(Native Method)
    03-12 15:22:21.176 11587 11658 E Unity : at java.lang.Class.forName(Class.java:453)
    03-12 15:22:21.176 11587 11658 E Unity : at java.lang.Class.forName(Class.java:378)
    03-12 15:22:21.176 11587 11658 E Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    03-12 15:22:21.176 11587 11658 E Unity : at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
    03-12 15:22:21.176 11587 11658 E Unity : at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source:72)
    03-12 15:22:21.176 11587 11658 E Unity : at android.os.MessageQueue.next(MessageQueue.java:395)
    03-12 15:22:21.176 11587 11658 E Unity : at android.os.Looper.loop(Looper.java:181)
    03-12 15:22:21.176 11587 11658 E Unity : at com.unity3d.player.UnityPlayer$e.run(Unknown Source:33)
    03-12 15:22:21.176 11587 11658 E Unity : Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/base.apk"],nativeLibraryDirectories=[/data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/lib/arm64, /data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn't fin
    03-12 15:22:21.176 11587 11658 I com.Test.test: Rejecting re-init on previously-failed class java.lang.Class<com.RenderHeads.AVProVideo.AVProMobileVideo>: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/base.apk"],nativeLibraryDirectories=[/data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/lib/arm64, /data/app/com.Test.test-fmp67XVMuJin46ft7bYDfg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn't find "libAVProLocal.so"
     
    Last edited: Mar 12, 2019
  29. fredericcambon

    fredericcambon

    Joined:
    Jun 10, 2017
    Posts:
    1
    Hi,

    Just to let you know that I also got the exact same error after using Application.Quit. It seems to be related to Application.Quit()

    For my case, I was playing a video on my SDcard, no StreamingAssets related.
    It works fine usually, but if I use Application.Quit and then re-open the app + re play the video, AVPro fails
     
  30. MarkHenryC

    MarkHenryC

    Joined:
    Nov 30, 2009
    Posts:
    67
    OK, thanks. I'll trim down the video and get a sample across.
     
  31. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    173
    @AndrewRH any news for support external clock or external frame sequence number for synchronization?thanks
     
  32. peter_unity233

    peter_unity233

    Joined:
    Oct 24, 2018
    Posts:
    7
    Hi, I need to get HLS streaming video into my Unity app for iOS and Android. I've downloaded the trial package and installed it. I've added a MediaPlayer and AVPro Video uGUI component to my Canvas. I set the absolute URL to my m3u file and connected the media player to the video component. That's it, no scripts or anything else. When I run in Unity Editor the UI appears, the video loads the start scene of the video and then... loops the first segment over and over and over again putting a new watermark on the video each time. I have then tried the two sample video links in the Scribd tutorial ( https://www.scribd.com/document/377392691/Unity-AvPro-Video ) under 4.3.4 Test Streams and they exhibit identical behaviour. I can't risk paying for this until I've A) seen the issue resolved and working or B) been given the option to get my money back if I try the paid version and it fails in the same way.
     
  33. peter_unity233

    peter_unity233

    Joined:
    Oct 24, 2018
    Posts:
    7
    I just tried a few more things, including loading an mp4 into streamassets and they ALL exhibit the same behaviour (fast loop of the first few seconds of the video with lots of watermarks). Did someone screw up the trial package build?? Or is this expected behaviour???
     
  34. RichardRevesz

    RichardRevesz

    Joined:
    Jul 4, 2018
    Posts:
    12
    If anyone else is also struggling with this: If you build for ARMv7, sometimes it shows an error that the device is not compatible, sometimes it builds and works! (Do not forget to delete the previous version off the app from the device).
    It is still an issue to be resolved on ARM64, but there is a workaround :)
     
  35. phileday

    phileday

    Joined:
    Feb 8, 2014
    Posts:
    123
    Hi

    I'm having a problem with multi track audio on Android using Mediaplayer. The issue we are finding is that we are only able to see 4 tracks when loading in the video. There are 6. Is there a restriction of the number of audio tracks that mediaplayer can use? We can't at the moment use the eco player option as it doesn't play the high res video we have.

    All the best

    Phil
     
  36. YongsooKim

    YongsooKim

    Joined:
    Aug 10, 2018
    Posts:
    1
    Hi
    Avpro android has build error with Gear VR latest sdk(1.35).
    Please fix problem.

    CommandInvokationFailure: Unable to convert classes into dex format. C:/Program Files/Java/jdk1.8.0_181\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/ANDROID/SDK\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" - stderr[ Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/twobigears/audio360exo/BuildConfig; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/twobigears/audio360exo2/Audio360Sink; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/twobigears/audio360exo2/OpusDecoder; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/twobigears/audio360exo2/OpusDecoderException; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/twobigears/audio360exo2/OpusJNI; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/twobigears/audio360exo2/OpusRenderer; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/twobigears/audio360/AmbisonicRenderer; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/twobigears/audio360/AmbisonicRenderer$SwigNext;
     
  37. remy_rm

    remy_rm

    Joined:
    Jan 16, 2017
    Posts:
    17
    hi Andrew,

    When loading a video using the "Absolute path or URL" source path option, and providing a url (e.g http://foobar.com/barfoo.m3u8 ) as destination, where does the actual download get started from?

    In the MediaPlayer.cs file I can see it gets assigned to m_VideoLocation, but I'm unable to find where the download gets executed, and how. Is this done using a webRequest?

    thanks,
    Remy.
     
  38. MartinGrman

    MartinGrman

    Joined:
    Apr 13, 2017
    Posts:
    11
    Hi Andrew,
    Is UWP ARM64 version planned?
    There already is ARM, x86 and x64 build available. Would it be possible to get UWP ARM64 build?
    Thanks,
    Martin
     
  39. odcheban

    odcheban

    Joined:
    Oct 13, 2017
    Posts:
    4
    Hi AndrewRH,
    I've bought the AVPro Video like today thinking that it'll work right off the bat. All I need is a video playing on a sphere. It plays properly on the Unity Editor but just shows a white screen when built. Any idea why?
    [AVProVideo] Error: LoadFailed
    I use Windows, updated codecs, installed directX 12

    while on other computers everything is fine.
    I forgot to install something from other drivers?
     
  40. MindBuild

    MindBuild

    Joined:
    Oct 7, 2018
    Posts:
    22
    Hello,

    I have recently implemented Lightshaft Youtube into my project.

    However it does not work in iOS Safari and the buffering time is crazy.

    If I purchase your plugin is the buggering time fixed?

    Also which asset do I purchase for the WebGL Version?

    Thanks!
     
  41. Adrien-Ninpo

    Adrien-Ninpo

    Joined:
    Oct 2, 2018
    Posts:
    17
    Hi,
    On iOS, unplugging the headphones will pause all MediaPlayers.
    Is there a way to either prevent this behaviour completely, or to know when a MediaPlayer was paused specifically because of this ?
    Knowing whether a MediaPlayer is paused or playing "in general" is not enough of an event for us to sync it up with the rest of our scripts; there are many different reasons we would want a MediaPlayer to be paused, and not all of them need to be handled.
     
  42. davide-cti

    davide-cti

    Joined:
    Jun 22, 2018
    Posts:
    2
    Hi there,
    is there a way to disable debug AVPro-Video logging via script? I know that there's the option while in the editor on the media player component but I couldn't find it via script!

    Thank you kindly
     
  43. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    I'm having the same issue on Android (haven't tested iOS).
    In my case it's loading a video from an external URL.
    Killing the game completely and then restarting it seems to solve it.

    Log output: (note.. I manually removed the video URL from the logs)

    Code (CSharp):
    1. 04-01 17:58:23.358  3786  6981 I Unity   : [AVProVideo] Initialising AVPro Video (script v1.9.12 plugin v1.9.10) on Mali-G71/OpenGL ES 3.2 v1.r16p0-01rel0.###other-sha0123456789ABCDEF0### (MT True) on Android
    2. 04-01 17:58:23.358  3786  6981 I Unity   :
    3. 04-01 17:58:23.358  3786  6981 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
    4. 04-01 17:58:23.358  3786  6981 I Unity   :
    5. 04-01 17:58:23.366  3786  6981 I Unity   : [AVProVideo] Opening *my vido url* (offset 0)
    6. 04-01 17:58:23.366  3786  6981 I Unity   :
    7. 04-01 17:58:23.366  3786  6981 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
    8. 04-01 17:58:23.366  3786  6981 I Unity   :
    9. 04-01 17:58:23.367  3786  6981 E Unity   : [AVProVideo] m_Video is null!
     
    Last edited: Apr 1, 2019
  44. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    Bug on Android (AVPro: Version 1.9.12 - 18 January 2019)
    1) Open the 04_Demo_uGUI test scene
    2) Set the Media Players "Auto Play" option to unticked
    3) Make sure your Player Settings has "Multithreaded Rendering" is enabled

    Run on Android (Samsung S8+)
    Expected Results:
    - The First frame of the video should be shown.

    Actual Results:
    - Just a Black texture.

    4) Switch Player Settings has "Multithreaded Rendering" to disabled

    New Results:
    - The First frame of the video should is shown.
     
    AndrewRH likes this.
  45. mdsitton

    mdsitton

    Joined:
    Jan 27, 2018
    Posts:
    66
    Whats holding up linux support. That is the only thing holding us back from using this asset. Unity on linux really NEEDS better video decoding support, as in only supports 2 rather mediocre formats by default in the stock unity player.
     
  46. Khelgar

    Khelgar

    Joined:
    Mar 13, 2019
    Posts:
    16
    Hi everyone,

    I currently test the trial version before buy it, and I have a problem.
    I need to play some videos immediatly after release a button without any delay (it's realy important). On computer I haven't any problem but when I deploy it on iOs I have some freezes when method Play(), Pause() and Stop() are called.
    I understood that the player load the video when we call Play() method (but is it correct ?).

    Is there any way to preload video before playing ? And how can I stop freezes when method Play(), Pause() and Stop() are called ? When methods Pause() and Stop() are called I want to hide video players on game but is not instant due to freezes.
     
  47. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Hi there, we've start receiving a crash on our Mac app builds. This wasn't happening before and I'm not entirely sure what's changed, using a newer version of Unity is about the only thing thats changed. I tried updating to 1.9.12 but it's still occurring. Let me know if you need any other info to track this problem down, thank you!! Here's the crash log:

    NotSupportedException: To marshal a managed method, please add an attribute named 'MonoPInvokeCallback' to the method definition.
    at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate[TDelegate] (TDelegate d) [0x00000] in <00000000000000000000000000000000>:0
    at RenderHeads.Media.AVProVideo_OSXMediaPlayer.Initialise () [0x00000] in <00000000000000000000000000000000>:0
    at RenderHeads.Media.AVProVideo.MediaPlayer.CreatePlatformMediaPlayer () [0x00000] in <00000000000000000000000000000000>:0
    at RenderHeads.Media.AVProVideo.MediaPlayer.Initialise () [0x00000] in <00000000000000000000000000000000>:0
    at RenderHeads.Media.AVProVideo.MediaPlayer.OpenVideoFromFile (RenderHeads.Media.AVProVideo.MediaPlayer+FileLocation location, System.String path, System.Boolean autoPlay) [0x00000] in <00000000000000000000000000000000>:0
    at AppDelegate.playVideo (System.String videoId, System.String[] subtitles, System.Single[] times, AppDelegate+YakVideoComplete vidCompleteDelegate, System.Boolean demoMode) [0x00000] in <00000000000000000000000000000000>:0
    at SceneBase.PlayCutscene (SceneBase+CutsceneType cutsceneType, System.String cutsceneName, UnityEngine.AudioSource clip, System.String[] subtitles, System.Single[] times, SceneBase+CutsceneEndedDelegate cutsceneEndedDelegate, System.Boolean hideUI, System.Single startFromNormalizedTime, UnityEngine.Animator alternativeAnimator, System.Boolean allowSkipping, System.Boolean pauseAmbient) [0x00000] in <00000000000000000000000000000000>:0
    at SceneIntro.Start () [0x00000] in <00000000000000000000000000000000>:0
    Rethrow as TypeInitializationException: The type initializer for 'RenderHeads.Media.AVProVideo_OSXMediaPlayer' threw an exception.
    at RenderHeads.Media.AVProVideo.MediaPlayer.CreatePlatformMediaPlayer () [0x00000] in <00000000000000000000000000000000>:0
    at RenderHeads.Media.AVProVideo.MediaPlayer.Initialise () [0x00000] in <00000000000000000000000000000000>:0
    at RenderHeads.Media.AVProVideo.MediaPlayer.OpenVideoFromFile (RenderHeads.Media.AVProVideo.MediaPlayer+FileLocation location, System.String path, System.Boolean autoPlay) [0x00000] in <00000000000000000000000000000000>:0
    at AppDelegate.playVideo (System.String videoId, System.String[] subtitles, System.Single[] times, AppDelegate+YakVideoComplete vidCompleteDelegate, System.Boolean demoMode) [0x00000] in <00000000000000000000000000000000>:0
    at SceneBase.PlayCutscene (SceneBase+CutsceneType cutsceneType, System.String cutsceneName, UnityEngine.AudioSource clip, System.String[] subtitles, System.Single[] times, SceneBase+CutsceneEndedDelegate cutsceneEndedDelegate, System.Boolean hideUI, System.Single startFromNormalizedTime, UnityEngine.Animator alternativeAnimator, System.Boolean allowSkipping, System.Boolean pauseAmbient) [0x00000] in <00000000000000000000000000000000>:0
    at SceneIntro.Start () [0x00000] in <00000000000000000000000000000000>:0
     
  48. firepad9

    firepad9

    Joined:
    May 20, 2016
    Posts:
    8
    is avprovideo support topanddown alpha video in Android?
     
  49. Khelgar

    Khelgar

    Joined:
    Mar 13, 2019
    Posts:
    16
    I think yes, it's supported for iOs, try the trial package to test it.
     
    AndrewRH likes this.
  50. dkkk_stonypark

    dkkk_stonypark

    Joined:
    Mar 15, 2017
    Posts:
    2
    I am working on the iOS platform.
    DisplayUGUI.color value is Color.White.
    But.., the display Display UGUI seems to be invert color.
    is not red video...

    MediaPlayer newMediaPlayer = newMediaPlayerGameObject.AddComponent<MediaPlayer>();
    newMediaPlayer.Events.AddListener(OnVideoEvent);
    newMediaPlayer.m_VideoPath = currentPath;
    newMediaPlayer.m_AutoStart = false;
    newMediaPlayer.m_Loop = false;
    newMediaPlayer.m_Muted = true;


    public void OnVideoEvent(MediaPlayer mp, MediaPlayerEvent.EventType et, ErrorCode errorCode)
    {
    switch (et)
    {
    case MediaPlayerEvent.EventType.FirstFrameReady:
    mp.Stop();
    break;
    }
    }
     

    Attached Files: