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,611
    It should be noted that currently this is not supported on Android. We plan to add support in the future.

    Thanks,
     
    flare-phoenix likes this.
  2. flare-phoenix

    flare-phoenix

    Joined:
    Jun 4, 2015
    Posts:
    3
    Oh, that's a problem.

    SetKeyServerURL ()
    SetKeyServerAuthToken ()
    SetDecryptionKeyBase64 ()
    SetDecryptionKey ()
    Are all of the above methods still not supported on Android?

    Thanks,
     
  3. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    That is correct. They should be available in AVPro Video 2.0, but that's still some time off being released.
     
  4. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    21
    Hey guys I recently had a couple of things that have occurred

    Oculus go, previously playing back fine using 1.8.7 avpro.

    I recently updated avpro from 1.8.7 to 1.9.12 and (also the latest version of unity) now my videos are no longer playing. Im debugging, and the supplied video path (via AWS) is being passed to the function (as prior to upgrade) but the video just doesn't seem to kick.

    Nothing special is being done (in terms of playback):


    Code (CSharp):
    1.  
    2. _player.OpenVideoFromFile(MediaPlayer.FileLocation.AbsolutePathOrURL,videoPath,true);
    3. _player.Play();
    4.  
    5. public void OnMediaPlayerEvent(MediaPlayer mp, MediaPlayerEvent.EventType et, ErrorCode errorCode)
    6.     {
    7.         switch (et)
    8.         {
    9.         case MediaPlayerEvent.EventType.ReadyToPlay:

    All fairly bog standard but the event doesn't hit on device, all works fine in Unity, all worked fine previously before update. is there some settings I am missing that could of been lost in the versions (1.8.7) I have tried placing the demo sphere setup into scene to test but same result!.

    Any help would be greatly appreciated as this is stopping my submission to store.

    Chunk
     
    Last edited: Feb 5, 2019
  5. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    Hi Chunk,

    Thanks for reporting this. Yes, it seems there is a bug in the current plugin when using the ExoPlayer API. A number of people have reported videos not playing sometimes, and we're looking into it currently. If possible try to switch from the ExoPlayer to the MediaPlayer API to see whether that helps.

    I'm not sure if your issue is the same though. You're saying that one of the events is not triggering, but it used to? Which event is it?

    I also wonder whether there was a problem with the upgrade of the plugin. Perhaps you could try to close Unity, delete all the AVPro Video files in the project, and then import the new version again?

    Otherwise, a full Android ADB logcat report would also be useful.

    Thanks,
     
  6. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    21
    Hey Andrew, cheers for getting back.

    Weirdly Im actually using MediaPlayer in my build (image). Ill try it via Exo instead too.

    basically nothing in the events is being triggered. So in unity IDE I can see all my calls fine, player ready etc but in my debug panel on the GO it never gets to it.

    Like I mentioned this isnt a new project its an existing project that previously worked.

    I will try and delete all the AVPro video files, although will this mess up my current build? *bit cautious*

    Thanks again for getting back

    Chunk
     

    Attached Files:

  7. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    21
    Right, for sanity check I used one of the demo scenes (avpro) tested in IDE (worked fine). Built onto the oculus go, not working.....

    I did notice that there was a miss match in plugin vers to script vers, and also there was an error:

    EntryPointNotFoundException: AVPPlayerSetKeyServerURL

    so I followed your advice and I have:
    • closed unity
    • removed all refs to AVPro in finder (osx).
    • restarted Unity, imported latest avpro
    • restarted again (for luck).

    I have now an error:

    [AVProVideo] Failed to load DLL. AVProVideo

    Ive removed all again, and reimported, but I am still getting the error

    Again any help you can give will be much appreciated.

    Thanks

    Chunk
     
  8. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    21
    Just for reference I then made a totally clean unity project, imported the asset, loaded the sphere360 demo and this generates the same issue:
    Code (CSharp):
    1. DllNotFoundException: AVProVideo
    2. RenderHeads.Media.AVProVideo.OSXMediaPlayer.Initialise () (at Assets/AVProVideo/Scripts/Internal/OSXMediaPlayer.cs:379)
    3. RenderHeads.Media.AVProVideo.OSXMediaPlayer..cctor () (at Assets/AVProVideo/Scripts/Internal/OSXMediaPlayer.cs:413)
    4. Rethrow as TypeInitializationException: The type initializer for 'RenderHeads.Media.AVProVideo.OSXMediaPlayer' threw an exception.
    5. RenderHeads.Media.AVProVideo.MediaPlayer.CreatePlatformMediaPlayer () (at Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:1542)
    6. RenderHeads.Media.AVProVideo.MediaPlayer.Initialise () (at Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:467)
    7. RenderHeads.Media.AVProVideo.MediaPlayer.Start () (at Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:513)
    8.  
     
  9. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    That's very strange...

    Please check your Plugins folder...It should contain AVProVideo.bundle:

    upload_2019-2-6_11-32-5.png

    Then if you "open contents" on that bundle, it should contain these files:

    upload_2019-2-6_11-32-54.png
    and then in the MacOS folder it should contain the main file:

    upload_2019-2-6_11-33-16.png

    Also check that in Unity it has the correct platform assigned to the AVProVideo.bundle by clicking on the file in Unity and checking that platform assignment settings in the inspector.

    Also, which version of Unity are you using?

    Thanks,
     
  10. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    Okay, so we've been working on this with the Vimeo guys. Turns out it's related to URL redirection. When the ULR is passed to our plugin it hasn't been redirected yet, and so it doesn't contain the file extension (.m3u8 or .mpd) of the stream. This means ExoPlayer isn't able to determine what type of stream it is.

    One workaround is to only pass in the redirected URL. You can see my tip here about how to do this:

    https://github.com/vimeo/vimeo-unity-sdk/issues/56

    For now an easier workaround is to tell the AVPro Video MediaPlayer component what format the stream is in. Currently the Vimeo plugin on Android sends it MPEG-DASH (mpd) streams, so you can set this here:

    upload_2019-2-6_11-55-28.png

    It appears to be working fine now - I hope it helps you.

    We will improve this situation in the next version so this manual set isn't needed.

    Thanks,
     
  11. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    21
    Thanks again Andrew, right version of Unity is 2018.3.4f1

    Platform are set correctly in Unity and also AVPro

    on the clean import project; and the clean file, even more strange is I dont have a "Plugins" folder so no AVProVideo.bundle at all.....

    .... help :)

    Chunk
     

    Attached Files:

  12. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    21
    Just tried the same using unity 2018.2.1f and same result.....
     
  13. MESHED-space-GmbH

    MESHED-space-GmbH

    Joined:
    Nov 11, 2015
    Posts:
    22
    Hi Andrew,
    thank you for your reply. This was my first guess too. But maybe there is some issue inside unity. I tried the Unity Video Player on a flat plane and it looks blurry too.
    But then i had success with the "04_Demo_uGui": With this prefab the video looks fine and so i combined a "Curved UI" Canvas with the Display UGUI Script and this works perfect, even on a curved GUI.

    Thank you for your help,
    regards, Michael
     
  14. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    That'
    That's bizarre. Do you not have a "Assets/Plugins" folder?

    When I import the AVPro Video package I get all of the files:

    upload_2019-2-6_15-45-38.png

    Looks like you're not even getting StreamingAssets - perhaps you didn't delete all of these files first, or the package that you have doesn't contain them for some reason. The package should be approximately 60MB in size.

    Thanks,
     
  15. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    21
    My last tests were totally new project different location etc. Fresh import of asset (only asset in build) so yeah I dont get it either. Im just going to try with the trial one too. you could see from the screen I attached what I get when importing.

    Ill see if the trial imports correctly
     
  16. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    21
    Hey Andrew, so now I did new project > android > build == Success!

    but....

    if I do: new project > android > importAvPro > build == Build Fail (see Image)

    also here is the log output:
    Code (CSharp):
    1. CommandInvokationFailure: Gradle build failed.
    2. /Applications/Unity/Hub/Editor/2018.3.4f1/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/MacOS/bin/java -classpath "/Applications/Unity/Hub/Editor/2018.3.4f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleDebug"
    3.  
    4. stderr[
    5. D8: Program type already present: com.twobigears.audio360exo2.OpusDecoder
    6.  
    7. FAILURE: Build failed with an exception.
    8.  
    9. * What went wrong:
    10. Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug'//developer.android.com/studio/build/dependencies#duplicate_classes.
    11.  
    12. * Try:
    13. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    14.  
    15. * Get more help at https://help.gradle.org
    16.  
    17. BUILD FAILED in 5s
    18. ]
    19. stdout[
    20. :checkDebugClasspath
    21. :preBuild UP-TO-DATE
    22. :preDebugBuild UP-TO-DATE
    23. :compileDebugAidl NO-SOURCE
    24. :compileDebugRenderscript UP-TO-DATE
    25. :checkDebugManifest UP-TO-DATE
    26. :generateDebugBuildConfig UP-TO-DATE
    27. :prepareLintJar UP-TO-DATE
    28. :mainApkListPersistenceDebug UP-TO-DATE
    29. :generateDebugResValues UP-TO-DATE
    30. :generateDebugResources UP-TO-DATE
    31. :mergeDebugResources UP-TO-DATE
    32. :createDebugCompatibleScreenManifests UP-TO-DATE
    33. :processDebugManifest
    34. :splitsDiscoveryTaskDebug UP-TO-DATE
    35. :processDebugResources
    36. :generateDebugSources
    37. :javaPreCompileDebug
    38. :compileDebugJavaWithJavac
    39. :compileDebugNdk NO-SOURCE
    40. :compileDebugSources
    41. :mergeDebugShaders UP-TO-DATE
    42. :compileDebugShaders UP-TO-DATE
    43. :generateDebugAssets UP-TO-DATE
    44. :mergeDebugAssets
    45. :transformClassesWithDexBuilderForDebug
    46. :transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
    47. 20 actionable tasks: 8 executed, 12 up-to-date
    48. ]
    49. exit code: 1
    50. UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <492d67763d4d482e8616a9848b18ccab>:0)
    51. UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <492d67763d4d482e8616a9848b18ccab>:0)
    52. UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <492d67763d4d482e8616a9848b18ccab>:0)
    53. UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <492d67763d4d482e8616a9848b18ccab>:0)
    54. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <492d67763d4d482e8616a9848b18ccab>:0)
    55. Rethrow as GradleInvokationException: Gradle build failed
    56. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <492d67763d4d482e8616a9848b18ccab>:0)
    57. UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <492d67763d4d482e8616a9848b18ccab>:0)
    58. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <492d67763d4d482e8616a9848b18ccab>:0)
    59. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    60.  
     

    Attached Files:

  17. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    21
    I think its to do with this line:

    D8: Program type already present: com.twobigears.audio360exo2.OpusDecoder

    any ideas?
     
  18. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    I think here are multiple audio360-exo*.jar files (probably from a previous version) in your Assets/Plugins/Android folder - make sure you only have audio360-exo28.jar

    Thanks,
     
  19. kwajom_unity

    kwajom_unity

    Joined:
    Jul 16, 2018
    Posts:
    10
    hey, thanks for the super quick response.

    Still new to unity and keeping updated on forums and completely forgot I posted this but I really appreciate the support you provide.

    Not too worried about the resolution right at this moment. But glad to see it's on other peoples radar too!

    If the error persists when I try again in the nearish future try the steps you suggested and let you know the results (assuming I remember)
     
    AndrewRH likes this.
  20. ProgramAcePlay

    ProgramAcePlay

    Joined:
    Jan 24, 2017
    Posts:
    1
    Hello.

    We are trying to play live HTTP stream from a hololens https://docs.microsoft.com/en-us/wi...e-windows-device-portal#mixed-reality-capture

    All works great on VLC player. But AVPro doesn't work with any live stream at all. We tried with URLs below and with VLC streaming


    AVPro throws error:

    Code (CSharp):
    1. [AVProVideo] Error: Loading failed.  File not found, codec not supported, video resolution too high or insufficient system resources.
    2. UnityEngine.Debug:LogError(Object)
    3. RenderHeads.Media.AVProVideo.MediaPlayer:UpdateErrors() (at Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:1740)
    4. RenderHeads.Media.AVProVideo.MediaPlayer:Update() (at Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:1105)

    Also, we tried to stream a video from StreamingAssets folder which you provided with the plugin but it also didn't work.


    1. Could you help us to fix this error? Or maybe we should do some other tuning steps?

    2. Hololens in url use 'login : password' field https://[USERNAME]:[PASSWORD]@192.1....mp4?holo=true&pv=true&mic=true&loopback=true

    Does AVPro support 'login : password' feature in live stream URL?


    Best,

    Michael F
     
  21. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    Yes, it could be that AVPro Video doesn't support this on Windows desktop platform when using the Media Foundation API. If you're willing to install a 3rd party codec (LAV Filters from Github) and set the API to DirectShow (in MediaPlayer component, section Platform Specific > Windows > Preferred API), then I think it should work.

    Thanks,
     
  22. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    Hi Everyone,

    The C# API in AVPro Video currently could do with a lot of improvements.

    We're busy refactoring the C# code for AVPro Video 2.0 and would love to hear your input. If you have some suggestions please could you submit them here or preferably on Github.

    Thanks,
     
  23. jpienbro_apollojourney

    jpienbro_apollojourney

    Joined:
    Jul 20, 2017
    Posts:
    11
    Thank you for the response.

    Regarding this subject:
    We'll currently already use a default MP4 url with "faststart" flag. Which seems to provide a faster start and better seek times.
    Now we tested our app in a location with weaker internet and noticed very long seek times on a 120 fps video. After some debugging in the plugin buffer log messages on Android, we noticed that it always tries to fill the buffer with 5s.
    Example: 15s 30fps: 33%, 15s 120 fps: 33%, 60s 120fps: 8%
    For our use case this shouldn't be 5s for a 120fps video, but 2.5s as we only allow a max playbackRate of 0.5X on 120 fps. We only allow 1X if the video has been downloaded completely and can be streamed from a local file.
    Is there a way to change the required size of the buffer before it can continue playing?
    Also, regarding the seeking of a default mp4 url: Does it sends a Range Header if you change the position within the video?
     
  24. c_andrews

    c_andrews

    Joined:
    Jan 26, 2015
    Posts:
    42
    Thank you that did indeed fix the issue.
    I can't believe I didn't try that.

    Thanks again
     
  25. kwajom_unity

    kwajom_unity

    Joined:
    Jul 16, 2018
    Posts:
    10
    Hi, I'm getting the error "the type or namespace name 'RenderHeads' could not be found" since I've moved from mac to windows. and updated unity to unity 2018.3.5f1. I have using RenderHeads.Media.AVProVideo; as described in the documentation but I can't seem to access the library at all. Can anyone offer some assistance. Thanks!
     
  26. matt_unity565

    matt_unity565

    Joined:
    Nov 12, 2018
    Posts:
    2
    Hi,

    The plugin is really great! I am having an issue with rewinding and playing.

    The video is paused on the final frame and I want a button that rewinds to the start and automatically starts playing. If the video is already playing (i.e. in the middle) then this works fine but if it is at the end the video rewinds to the beginning but doesn't play.

    I expected this to work:
    Code (CSharp):
    1. MediaPlayer.Rewind();
    2. MediaPlayer.Play();
    Then I thought it was probably because seeking wasn't finished, so I tried calling Rewind() and then waiting for seeking to finish then calling Play() but it still doesn't work reliably. On Mac in 2018.3 in the Editor and built to iPhone it's behaving the same.

    Thanks,
    Matt
     
  27. indie_mike

    indie_mike

    Joined:
    Nov 7, 2016
    Posts:
    29
    Yeah we tried it, same issues.

    So it seems it is just my editor. Tried it on other devs PC's and they have no issues so ill give unity a reinstall.

    W eve managed to get most of the issues working now. For the freezing we were forced to pause the video manually on the last second of play as nothing else worked.

    Another issue has also arisen. We are trying to load several videos on one scene at a time. They are roughly 2 minutes, 4k x 4k so relatively large files (500~mb). Loading all 3 at the start of the scene sometimes throws the error :

    "AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources."

    We are trying to open each video file with OpenFromFile individually when the video is selected, and then closing it when stop is pressed (CloseVideo()). When we tried this, only the first video opens, and every video after that doesn't open. If we try and reopen the first video again, that video still opens properly.

    Im not sure if this is the correct process to release the video from memory or not. But if we mimiced the OnDestroy() function when closing the video, and then re open videos in the same way, everything works fine. Any ideas?
     
  28. unity_TcYa9SLPhcqcdQ

    unity_TcYa9SLPhcqcdQ

    Joined:
    Feb 14, 2019
    Posts:
    1
    @AndrewRH, is it possible to create a build of the player with half the buffer size (2 or 3 seconds) to solve this. if it would require an additional payment of a couple hundred euros, just let us know
     
    Last edited: Feb 14, 2019
  29. jpienbro_apollojourney

    jpienbro_apollojourney

    Joined:
    Jul 20, 2017
    Posts:
    11
    A parameter that I can change in code would be better. We have 3 video types we are using in our app:
    30 fps: min buffer can stay at 5s (max playbackrate is 1X)
    120 fps: min buffer should be half, so 2.5s (max playbackrate is 0.5X)
    240 fps: min buffer should be quarter, so 1.25s (max playbackrate is 0.25X)
     
    Last edited: Feb 14, 2019
  30. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    This issue was resolved via email.
     
  31. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    Which version of AVPro Video are you seeing this in? Could you post the issue on GitHub Issues?

    Thanks,
     
  32. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    Yes if your APK is very large then it could have memory issues while unzipping the contents of SteamingAssets folder. For very large videos we recommend not putting them into StreamingAssets, but instead copy them somewhere on the device and access them via the absolute path. How those files get there is up to you. You could copy them manually via USB, or have a system that downloads them from the net and stores them in the persistentData folder.

    You could also check the ADB LOG CAT to see what error it's really having while trying to open the files. I suspect it is a memory one.

    It's interesting that you say that using OnDestroy function fixes it...Perhaps you could send us a simple repro case?

    Thanks,
     
  33. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    120 and 240 fps videos are not something we've tested - they're sort of edge cases. Can I ask what they're for?

    Also which version of Unity and AVPro Video are you using?

    I recommend you post this to GitHub Issues so we can create a proper ticket.

    Changing buffer size might be possible, but we would need to investigate this.

    I'm not sure whether range headers are used. Are you using the ExoPlayer or MediaPlayer video API? Perhaps you could also try changing these around to see if the one gives better buffering?

    Thanks,
     
  34. jpienbro_apollojourney

    jpienbro_apollojourney

    Joined:
    Jul 20, 2017
    Posts:
    11
    Basically we have an app that records footage of athletes. For some sport coaches it's important to view the footage in slow motion (120 fps or 240 fps) to better analyze the performance of the athlete. We work with multiple devices, that's why we want stream the recorded video from a server, but as we noticed while debugging: the plugin will always buffer 5 seconds regardless of the frame rate. For a 120 fps and 240 fps 5s is a lot of data to process, which causes slow buffering times. We only allow a max playbackrate of 0.5X for 120 fps videos and 0.25X for 240 fps video.

    A parameter to change the buffer size in code would be useful. We have 3 video types we are using in our app:
    30 fps: min buffer can stay at 5s (max playbackrate is 1X)
    120 fps: min buffer should be half, so 2.5s (max playbackrate is 0.5X)
    240 fps: min buffer should be quarter, so 1.25s (max playbackrate is 0.25X)

    I'll post this on your GitHub page too ;)
     
  35. indie_mike

    indie_mike

    Joined:
    Nov 7, 2016
    Posts:
    29
    We are already loading from the device and not from the streaming folder.

    Also that error is straight from logcat in android studio and we get no other info apart from that.

    Ill try make something quickly today. How would you like ti sent to you?
     
  36. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    Opening multiple 4K videos at once has a chance of not working on mobile devices, as they are only designed to have hardware decoding resources for a single 4K video.

    We can still take a look - you can email a reproducible case to unitysupport@renderheads.com perhaps with a google drive / dropbox / wetransfer link.

    Thanks,
     
  37. indie_mike

    indie_mike

    Joined:
    Nov 7, 2016
    Posts:
    29
    We are trying to open one at a time, but getting the error. So Open one file, Play, stop, CloseVideo(), then do same process with another file.

    Weird thing is if we open 3 at once, most of the time all 3 load without issues. But every now and then we get the same error but it is random. Doing the one by one process is 100% reproducible after the first load.
     
  38. indie_mike

    indie_mike

    Joined:
    Nov 7, 2016
    Posts:
    29
    Ok so in doing the test scene, i figured out the cause.

    We are using 3 different instances of the 360 player prefab. So we load video 1 on prefab 1, open and close it. Then when we try load video 2 on prefab 2, we get the error. Doing it all on one prefab there is no issue at all. Probably should of mentioned we are used multiple versions of the prefab in hindsight haha.
     
  39. gaoyu22

    gaoyu22

    Joined:
    Nov 22, 2018
    Posts:
    7
    Last questions i asked about the buffering and playing status still exist. And new problem occured when i using GetBufferedTimeRange() to check the buffering situation, let me show you.

    I set 02_Demo_imGui with a new link like http://xxx/xxx/xxx.mp4, then swtich to this media. AVPro will try to buffer. if you seek to the buffered time point, it cant play at all. it will stall and buffer again like this shown in the pictures:

    besides, the buffering seems to grow so fast that it will be complete in seconds, but actubally it cant cache the video like a html player which can seek to the buffered time point and play immediately.

    Another problem is that i still cant find a stable way to check is the online http video in playing status or not. this problem can be that playing progress keep growing but no frame update or it seems loop at some tiny range with IsPlaybackStalled() equals to false.

    i am developing a sdk with serious commercial purpose but AVPro seems not so stable. I hope you can solve the problems above, all of them are about the online buffering videos.
     

    Attached Files:

  40. catsfather

    catsfather

    Joined:
    Nov 5, 2013
    Posts:
    2
    I am using AVPro on the Windows platform.
    The videos are in the Streaming Assets folder. Users can search for files by .mp4 and take them.
    I want to allow users to play video only in applications I create.
    how can i do?
     
  41. IRobb

    IRobb

    Joined:
    Apr 29, 2014
    Posts:
    15
    Hello!

    I have avpro android and ios (through company inoiberica.com). I have two different projects for the two platforms. In android it works perfect but in iOS (after importing avpro for ios) the watermark keeps showing in device. I have tried to reimport just in case and unity detects no changes in files.

    Can you help me?

    Thanks
     
  42. MarkHenryC

    MarkHenryC

    Joined:
    Nov 30, 2009
    Posts:
    63
    Hi Andrew,

    Quick question: I'm getting a blink (brief blackout after video starts) about a half-second into videos. Files are mkv, encrypted according to AVPro spec, playing inside sphere on Oculus Go.Doesn't happen in Unity Editor. In the past, with other projects (and possibly other video plugins), I've tended to make sure there's a fade-in which doesn't reveal the video's first second, but was wondering if there's a simple setting which may fix this. The videos are mono, between 500 and 1200MB.
     
  43. LeaSchorling

    LeaSchorling

    Joined:
    Mar 7, 2018
    Posts:
    2
    Hi,
    I'm trying to export the current frame of an HLS as PNG using the GetTexture() function.
    When encoding the resulting Texture2D with Texture2D.EncodeToPNG() the following error occures:
    Unable to retrieve image reference
    UnityEngine.Texture2D:EncodeToPNG()

    Any ideas? Thanks a lot!

    Code (CSharp):
    1.  
    2. _texture = _mediaPlayer.TextureProducer.GetTexture() as Texture2D;
    3. byte[] bytes = _texture.EncodeToPNG();
    4.  

     
  44. ReadyPlayGames

    ReadyPlayGames

    Joined:
    Jan 24, 2015
    Posts:
    45
    I'm having a problem on Android, using AVProVideo 1.9.12.(Full version)

    Upon first launch, everything works fine with the fullscreen DisplayIMGUI prefab. I have it start up with a full screen video, calling the "OpenVideoFromFile" function from the MediaPlayer class.

    If I exit my app (via Application.Quit()) and load it back up, I receive the following errors:

    Code (CSharp):
    1. [AVProVideo] Failed to create player instance
    2. [AVProVideo] m_Video is null!
    3. [AVProVideo] Failed to open jar:file:/// <Big long string to the internal video file>
    If I remove my app from the "recent apps" list, I am then able to load it normally, and everything works again.
     
    Last edited: Mar 3, 2019
  45. phileday

    phileday

    Joined:
    Feb 8, 2014
    Posts:
    85
    Hi

    I've had reports that 5k no longer play smoothly since a windows update last year. Someone messaged me regarding this and sent me a link to Virtual desktop forum where they were having similar problems and had found a fix. Here's the link:
    https://steamcommunity.com/app/382110/discussions/0/1696043263491620382/

    I'm not sure if you're aware of this or have any suggestion of why it might be affecting AVPro in the same way but I thought I should bring it to your attention in case you weren't aware of it.

    Regards

    Phil
     
  46. Techlico

    Techlico

    Joined:
    Feb 3, 2017
    Posts:
    1
    Hi,
    Can I play audio when the application is in the background with iOS?

    The following settings are set.
    · MediaPlayer.PauseMediaOnAppPause = false;
    · [Player Settings] Behavior in Background - Audio, Air Play, PiP -> CHECKED

    But, the audio stops in the background.

    Is it possible for me to add the following implementation with my own plugin?
    https://developer.apple.com/documen...ng_audio_from_a_video_asset_in_the_background

    Regards
     
  47. NS24

    NS24

    Joined:
    Feb 21, 2018
    Posts:
    15
    Hi

    After upgrading to Oculus 1.34 SDK we noticed a regression on GearVR/GO whereby the left eye flickers when using Stereo Multipass rendering - it was fine with 1.32. This happens when using Exoplayer or MediaPlayer

    We also tried the FastOES path with Multipass but this plays nothing out of the right eye.

    The only solution we have is to go back to Single Pass rendering which unfortunately means a frame drop to 30FPS, whereas Multipass used to yield 60FPS for the main app outside of video playback.

    We tested using the latest AVPro plugin 1.9.12.

    If you can shed any light on this that would be great.


    thanks

    Nalin
     
  48. greggman

    greggman

    Joined:
    Nov 30, 2013
    Posts:
    19
    Quick question: Is it broken on Mac? I just downloaded the trial, imported into a new empty project in Unity 2018.3.6f1. All the demos I've opened so far the video skips. I assume that's not how it's supposed to work right? In on a Macbook Pro with MacOS 10.14.3

     
  49. blanx

    blanx

    Joined:
    Feb 26, 2016
    Posts:
    49
    Same is happening here and no solution for it.



     
  50. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,611
    No that's not how it's meant to work :)

    This is an issue we found that only happens on a specific model of the Macbook Pro when using Metal API and the trial version (it is due to the watermark rendering code).

    So you can either switch the graphics API to OpenGL (in Player Settings), try on a different machine, or switch to the full version. Probably switching to OpenGL is best to make sure it's working.

    Thanks,
     
unityunity