Search Unity

[Released] AVPro Video - complete video playback solution

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

  1. 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:

  2. danielesuppo

    danielesuppo

    Joined:
    Oct 20, 2015
    Posts:
    168
    Hello, I'd like to be able to put a 360 video into a Canvas2D panel.
    With the standard VideoPlayer I would create a script to manage to mouse rotation, I would choose "render to texture" as output and next I would apply this texture to the Image on the 2d panel.
    How can achieve this with AvPro?

    P.S. Since I'm working on WebGl, is there a better way to do this without Render Texture?

    Many thanks
     
    Last edited: Apr 4, 2019
  3. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    302
    Hi there, any clues about what's causing the OSXMediaPlayer to crash?
     
  4. QianXiYa

    QianXiYa

    Joined:
    Nov 1, 2017
    Posts:
    27
    Hi, I'm playing online video on the mobile end and there's a lag. I look at the change in the speed of the Internet during the loading process. It doesn't seem to be loading all the time. Which parameter sets the load cache?
     
  5. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    333
    Hi there

    Can you stream live footage using AVPro video?

    Thanks
     
  6. mikerz1985

    mikerz1985

    Joined:
    Oct 23, 2014
    Posts:
    66
    You should write a shader to combine the textures into these areas directly on the mesh; don't do it on the CPU. You're doing something very custom, which requires extra work.
     
  7. iw-ben

    iw-ben

    Joined:
    Jun 12, 2018
    Posts:
    2
    Hi, my team is also now seeing an issue where our HoloLens builds cannot find AVProVideo.dll after we have updated to version 1.9.12

    I'm not sure if there's been any discovery on this issue outside the forum posts.

    I've only tried on the Emulator so far, but I plan to try on the device and a regular UWP Desktop build later this week.
    I'll also try out using a blank Unity project when I can find time later this week to report on the findings
     
  8. awesome_suri

    awesome_suri

    Joined:
    Dec 10, 2016
    Posts:
    3
    Hello guys!

    I have a small question about loading a video through url. How do I check if the video is completely loaded, so that the video doesn't stop even if my internet connection breaks after playing the video. Is the ReadyToPlay event the right one or is this event called as soon as the video is ready to be played even if it's not completely loaded? If it's not the right one, is there a way to find out when the loading is completed?

    Cheers!
     
  9. Piranha771

    Piranha771

    Joined:
    Oct 19, 2016
    Posts:
    6
    Hello. We really like your product. But we have 4 graphic cards. Please let us select on which graphics card the decoding should be done. This is essential for our product.
     
  10. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    148
    I don't think they are supporting this product anymore.
     
  11. markzorn

    markzorn

    Joined:
    Oct 6, 2016
    Posts:
    10
    Does this asset have support for xbox, ps4, and switch?
     
  12. conigliocattivo

    conigliocattivo

    Joined:
    May 14, 2013
    Posts:
    8
    Hello,

    for my VR app I want to switch video without having black frames in the middle, to do so I am saving a texture from the TextureProducer and showing it on a mesh during the time the new video is loading. It works quite well on iOS and it works on Android using Media Player but not using ExoPlayer, wiith ExoPlayer the shown texture is black.
    Is this a known issue?

    This is the code I am using:
    Code (CSharp):
    1. // Get a reference to the current frame as Texture2D.
    2. Texture2D currentFrame = (Texture2D)mediaPlayer.TextureProducer.GetTexture();
    3. // Blit the pixels on texture to the RenderTexture
    4. Graphics.Blit(currentFrame, TransitionRenderTexture);
    5. // Set the Texture on the Transition Screen Mesh Renderer Material
    6. transitionScreenMeshRenderer.material.SetTexture("_MainTex", TransitionRenderTexture);
    Thanks,
    Antonio
     
  13. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    165
    Hi,

    I am a big fan of Renderheads. I use the AVpro movie capture a lot and now I am ready to work with AVPro Video.

    In the past, I experimented lags when exporting video directly to occulus or android. I hope using unity with your marvelous asset will help solve these issues. I have been using unity for a few months but haven't built anything yet so I am pretty new to this.

    I read the whole manual, but is there any step by step tutorials to export a 360 video with ambisonic (3d sound)? I am using the demo360 sphere video and I already have the ambx sound. I can select specific platform in the component and my guess is I should I do the same in the unity build setting but I would definitely need a little help to understand how to distribute my 360 video movies for different platforms.

    Your help would be greatly appreciated.


    Thank you.
     
  14. iw-ben

    iw-ben

    Joined:
    Jun 12, 2018
    Posts:
    2
    I'm back, and I've gone through several more rounds of testing!

    Stepping back, I tried a UWP HoloLens & Desktop builds with a clean AVPro test project. Everything worked fine there.
    I've tried on physical devices and in emulator for HoloLens, no change of performance whether it worked fine with the test project or crashed in our real project.

    After reading back at old posts, it seems my error message is actually a bit different.
    This is my exception, and it happens at the very beginning while the application is loading all the DLLs and starting them up. Before any scenes and the Unity Engine really take effect:
    Exception thrown at 0x69BD74C0 (AVProVideo.dll) in REDACTED.exe: 0xC0000005: Access violation reading location 0x00000000.


    Since it seemed to be with DLLs loading and before any client code could really fire, I eventually started looking at possible collisions in DLLs.

    My problem seems to be stemming from having both AVPro and Dissonance Voice Chat included into our project.
    They seem to be having some sort of native conflict when I include the UWP native DLLs for both projects.

    I am replicating this by having a clean Unity 2018.1.9f2 project only containing these 2 plugins and building for UWP.

    We will be contacting their development team soon as well, but I wanted to put this out there for AVPro and any other devs that might run into this crash.
     
  15. seriousGeorge

    seriousGeorge

    Joined:
    Dec 17, 2013
    Posts:
    24
    As https://forum.unity.com/threads/rel...playback-solution.385611/page-64#post-4281433 I have the same problems.

    Where and how can you add Items to the Playlist-Mediaplayer?
    I need to set that via code (but can't even figure out with gui too tough).

    I can create a MediaPlaylist, I can create MediaItems and add them to the MediaPlaylist but I can't add the playlist to the PlaylistMediaPlayer anywhere because it is read-only - as is almost every property.

    How are you supposed to do that?
     
  16. synthesisvr

    synthesisvr

    Joined:
    Dec 19, 2018
    Posts:
    3
    Hi Andrew,

    I'm evaluating the trial version and it works great for what I need. However, can I load a video from the assets VS always loading it from a file? Or, do you have any suggestions on how to have (at least) some basic protection on the video files?
     
  17. intelligent2610

    intelligent2610

    Joined:
    Nov 26, 2016
    Posts:
    2
    Does AVPro(Android) support for Oculus Go and can streaming m3u8 file ??.
    I will buy AVPro(Android) Plugin if it can do two things above
     
  18. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    302
    Starting to wonder this also. I've asked questions on here, reported bugs, sent support email, haven't heard anything. We're stuck on compiling, is this product dead? are we to find alternatives??
     
    SniperED007 likes this.
  19. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,612
    We're here and our products aren't going anywhere :) We're currently really busy finishing a bunch of projects, but we'll soon be back to the usual frequent releases of new versions. We're doing our best to catch up with the support tickets currently.
     
    LostPanda likes this.
  20. torotake

    torotake

    Joined:
    Apr 22, 2019
    Posts:
    1
    Is AVPro able to read ID3 tags metadata when playing HLS?
     
  21. gino_pisello

    gino_pisello

    Joined:
    Jun 24, 2013
    Posts:
    28
    Hello!
    In the documentation is written:

    19.iOS - How can I fix the error message:"MissingPushNotificationEntitlement  Your app includes an API for Apple's Push Notification service, but the aps-environment entitlement is missing from the app's signature" ? 

    If you are not using Push notifications in your app, this Unity Asset does the job of fixing this error: https://www.assetstore.unity3d.com/en/#!/content/59160 . Just import it, and build the xcode files again.


    but the linked asset doesn't exist anymore. So how can I fix the error message "MissingPushNotificationEntitlement Your app includes an API for Apple's Push Notification service, but the aps-environment entitlement is missing from the app's signature" ?

    Thank you
     
  22. firepad9

    firepad9

    Joined:
    May 20, 2016
    Posts:
    3
    how about vivefocus or other android platform HMD? I tried but doesn't work well... ...
     
  23. elhongo

    elhongo

    Joined:
    Aug 13, 2015
    Posts:
    27
    Hey,

    Does anyone know if AVPro is compatible with Unity 2019.1?

    I'm trying it out on a Mac and Unity Crashes running any of the Demo scenes of AVPro.

    Any ideas?

    Thanks!
     
  24. andychanx007

    andychanx007

    Joined:
    Apr 26, 2019
    Posts:
    2
    Problem description:

    Got following errors when try to play a rtsp demo streaming from Wowza:

    Player 320: failed to load asset rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
    UnityEngine.Debug:LogError(Object)
    RenderHeads.Media.AVProVideo_OSXMediaPlayer:DebugLogCallback(Int32, Int32, String) (at Assets/AVProVideo/Scripts/Internal/OSXMediaPlayer.cs:307)

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

    Thanks
    Andy

    andychanx007@gmail.com


    Device (which devices are you having the issue with - model, OS version number):

    Mac

    Media (tell us about your videos - number of videos, resolution, codec, frame-rate, example URLs):

    The testing rtsp video is:

    rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov


    System Information:

    AVPro Video: plugin v1.9.6t scripts v1.9.12
    Target Platform: Standalone
    Unity: v2018.3.12f1 OSXEditor
    OS: Desktop - iMac18,3 - Mac OS X 10.14.4 - English
    CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz - 8 threads - 40960KB
    GPU: AMD Radeon Pro 580 - Apple - Metal - 8192KB - 16384
     
  25. matt_unity565

    matt_unity565

    Joined:
    Nov 12, 2018
    Posts:
    2
    I'm looking to have audio play whilst seeking video on iOS. Similar to how Adobe Premiere works, I believe it's called scrubbing when referring to audio. Is there a way to access the audio directly on iOS? GrabAudio doesn't seem to be implemented and audio can't be sent to Unity on iOS?
     
  26. huxley

    huxley

    Joined:
    Apr 27, 2009
    Posts:
    323
    We are using AV Pro to stream videos from an AWS S3 bucket which works fine when the files are listed as public. The client on this project has created a private video server. Is there a way to specify a specific URL endpoint (possibly non-S3)?
     
  27. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    148
    On Android... throws the following error when running on ARM64 with IL2CPP which is a requirement from Google Play store starting from 1 August 2019 all releases must be compliant with the Play 64-bit requirement.


    05-01 11:33:12.901 14728 14801 E Unity : AndroidJavaException: java.lang.NoClassDefFoundError: com.RenderHeads.AVProVideo.AVProMobileVideo
    05-01 11:33:12.901 14728 14801 E Unity : java.lang.NoClassDefFoundError: com.RenderHeads.AVProVideo.AVProMobileVideo
    05-01 11:33:12.901 14728 14801 E Unity : at java.lang.Class.classForName(Native Method)
    05-01 11:33:12.901 14728 14801 E Unity : at java.lang.Class.forName(Class.java:453)
    05-01 11:33:12.901 14728 14801 E Unity : at java.lang.Class.forName(Class.java:378)
    05-01 11:33:12.901 14728 14801 E Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    05-01 11:33:12.901 14728 14801 E Unity : at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
    05-01 11:33:12.901 14728 14801 E Unity : at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source:72)
    05-01 11:33:12.901 14728 14801 E Unity : at android.os.MessageQueue.next(MessageQueue.java:395)
    05-01 11:33:12.901 14728 14801 E Unity : at android.os.Looper.loop(Looper.java:181)
    05-01 11:33:12.901 14728 14801 E Unity : at com.unity3d.player.UnityPlayer$e.run(Unknown Source:32)
    05-01 11:33:12.901 14728 14801 E Unity : Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.LighthouseGamesStudio.ChallengeStars-m8qVikusn872Di8r-NwmyA==/base.apk"],nativeLibraryDirectories=[/data/app/com.LighthouseGamesStudio.ChallengeStars-m8qVikusn872Di8r-NwmyA==/lib/arm64, /data/app
     
  28. mikerz1985

    mikerz1985

    Joined:
    Oct 23, 2014
    Posts:
    66
    I have the same problem. I don't think 2019.1 supports Mac at the moment.
     
  29. zrabbott

    zrabbott

    Joined:
    Jul 2, 2018
    Posts:
    6
    Hi there. I've been using AVpro for a hot second, and have just recently run into an issue. My app is for both android and iOS and I can't seem to get audio from videos to play on any of my iOS devices? Even the stock demo scene labeled 04_Demo_uGi (the one with the bunny haha) doesn't play any audio. Any ideas? Also I'm working in Unity 2018.3.7f1
     
  30. ccklokwerks

    ccklokwerks

    Joined:
    Oct 21, 2014
    Posts:
    62
    I tried to update to 2019.1 (am on OSX) and found that even examining a game object with the MediaPlayer script on it would make the editor crash. Has anyone else run into this problem?
     
  31. mikkotikkanen

    mikkotikkanen

    Joined:
    Jan 18, 2018
    Posts:
    2
    I'm trying to stream progressive on-demand 360 video, either with HLS or MPEG-DASH. The streamswitching works correctly on PC, where the video starts from crappy video and moves to better quality bit later but doesn't seem to work on Android - Even when I scale the crappiest version down to just moving blobs (80kbit/sec) and the phone is on wifi, it just never moves up to the better quality, not even to just moderately better (1000kbit/sec).

    Should Android version be capable of doing the streamswitch much like PC can?
     
  32. EarMaster

    EarMaster

    Joined:
    Mar 7, 2013
    Posts:
    28
    I have the same problem. When I add a new MediaPlayer or inspect a GameObject the Editor crashes immediatly.
     
  33. dersh

    dersh

    Joined:
    Mar 25, 2017
    Posts:
    2
    Hey guys.

    We're trying to get the android plugin files in our project to remove the renderheads watermark. I've followed the instructions on the documentation a few times over with no success. First closing unity, removing the specific android native plugin files, reopening unity and importing the new android package's plugin files and the videos fail to play on the device.

    I then tried closing and reopening unity and overwriting the entire plugin/android portion with the plugin/android section from the android package and the videos fail to play on the device.

    In all cases I've tried the videos just no longer play at all. Has anybody had experience adding additional platforms after the fact? Any help would be greatly appreciated.
     
  34. amerkel

    amerkel

    Joined:
    Nov 22, 2016
    Posts:
    2
    We are attempting to view an rtsp stream on a windows machine. The stream is provided localhost through VLC. We can view it successfully outside of using AV Pro, but when using AV Pro, we just get a white texture. It says it's successfully connected and started, but it always remains a white texture.

    Our stream is using H264 at 800x450 30fps. The video content is a webcam being sent through VLC to an RTSP stream. We can see the feed through VLC and through Unreals Streaming Media Player, but not through AV Pro.

    The rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov link works properly in AV Pro, which makes this a little more confusing. Is there somewhere we can look for additional debugging information, or does anyone have any ideas what might be going wrong? We've updated Windows, made sure it's set for Direct Show, reduced resolution (basically in response to all error messages we received up until this point), but without any new messages, we're at a loss as to how to continue.

    Thanks!
    @AndrewRH
     
    Last edited: May 8, 2019
  35. shoo

    shoo

    Joined:
    Nov 19, 2012
    Posts:
    60
    File Offset option for ExoPlayer API doesn't work for some reasone. I use same file and same offset, when I choose MediaPlayer API it works, but when I change API to EXO, it just start playback from dummy file(tho in log it says "offset XXXXX") with no error at all. Can I fix it somehow?

    Playing files from external storage, AVPro v 1.9.12
     
  36. andychanx007

    andychanx007

    Joined:
    Apr 26, 2019
    Posts:
    2
    Hi AmerKel,

    This is Andy. I tested the rtsp using the trial version (I also used the same wowza demo rtsp) but failed (I used the 04_Demo_uGui by changing the source path to "Absolute Path or URL"). May I know how you get it work?

    Many Thanks
     
  37. Rutty03153

    Rutty03153

    Joined:
    Nov 21, 2013
    Posts:
    5
    Same problem here, latest Unity & AVPro versions, OSX editor crashes the moment I try to inspect an object in the editor that has a MediaPlayer on it, also crashes if you try running the scene the moment it tries to play a video.
     
  38. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,612
    Yes, the API isn't very clear. You could do something like this:

    Code (CSharp):
    1.             player.Playlist.Items.Clear();
    2.             MediaPlaylist.MediaItem mi = new MediaPlaylist.MediaItem();
    3.             mi.filePath = "AVProVideoSamples/AlphaTopBottom.mp4";
    4.             mi.loop = true;
    5.             mi.autoPlay = true;
    6.             player.Playlist.Items.Add(mi);
    7.             player.JumpToItem(0);
     
  39. BakuDigital

    BakuDigital

    Joined:
    May 9, 2013
    Posts:
    18
    Same hard crash with the OSX Editor! @AndrewRH are you aware of this bug? Can we expect a fix soon? Thank you.
    In the meantime, has anyone found a workaround or the only solution is to use a previous version of Unity?
     
  40. smeagols

    smeagols

    Joined:
    Oct 5, 2013
    Posts:
    35
    Hi, @AndrewRH

    I need to do an app on iOS using videos with transparency and alpha channel.

    I use avpro for windows for many years and use Hap Alpha without any problem. But i saw at documentation that iOS it's not compatible with Hap Alpha.
    is there any way to use videos with transparency on iOS.

    Thanks you
     
  41. amerkel

    amerkel

    Joined:
    Nov 22, 2016
    Posts:
    2
    • Updated Windows 10 to Version 1809 (needs to be at least 1803)
    • Installed the LAV Filters that their documentation mentioned
    • Set the windows player from WMF to DirectShow on the AVPro Media Player
    • Reduced resolution to 800x450
     
    AndrewRH likes this.
  42. JPLee

    JPLee

    Joined:
    Jul 31, 2017
    Posts:
    3
    We can't get 4 channels of audio through our video storage provider. They always reconvert to stereo.
    Any chance of adding support for Ambisonic UHJ format so that we can use a standard 2 channel stereo streaming service and still get spatial audio out of it?
     
  43. adrianstaude

    adrianstaude

    Joined:
    Jan 8, 2019
    Posts:
    4
    I am working with AVPro Android on Oculus Go, recently my App crashes randomly and spits out some error about exoplayer. Do you know what could cause this?

    Unity Version: 2017.4.24
    AVPro Version: 1.9.12

    If you need more specific info, I'll gladly provide it.

    EDIT: When I use the software decoder for Audio it works, but the framerate is sh*t.
     
    Last edited: May 9, 2019
  44. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,612

    If you already have items in the playlist, then you can click on one of them and click "Insert" to add a new item. Currently there is no way to add an item if the list is empty, but we will add this in the upcoming 1.9.14 version. Until then you can add this line to PlaylistMediaPlayerEditor.cs line 26:

    Code (CSharp):
    1.             if (propItems.arraySize == 0)
    2.             {
    3.                 if (GUILayout.Button("Insert Item"))
    4.                 {
    5.                     propItems.InsertArrayElementAtIndex(0);
    6.                 }
    7.             }
    Yes, we have a script called VideoTrigger.cs that:
    "Causes a video to play when the trigger collider is entered and rewind+pause when it is exited. Audio is faded up and down too"

    That should give you a good starting point.

    Thanks,
     
  45. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,612
    Unfortunately currently this isn't possible.
     
  46. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,612
    Afraid not...
     
  47. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,612
    Hi Peter,

    I believe this is a known issue. It only affects the trial version, on a specific hardware combination, and only when using Metal graphics API. If you switch the graphics API (in Player Settings to OpenGL Core) then it should work correctly.

    Thanks,
     
  48. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,612
    That's pretty strange..
    Is it both ExoPlayer and MediaPlayer that only show the first 4 audio tracks?
    Perhaps you could send us over the video file?

    Thanks,
     
  49. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,612
    Hi YongsooKim,

    I think this is related to the new ARM64 build support in Unity. You could try disabling the ARM64 build option, and/or go into the /Plugins/Android/Libs/Arm64 folder and click on each file in there and make sure it is assigned to the Android Arm64 profile. That should help. If it's still not working you could try deleting that folder with the ARM64 plugin files as a last resort..

    Thanks,
     
  50. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,612
    The loading happens internally inside the native plugin. So it will use low-level operating system sockets or something else depending on the platform. No high-level comms like WebRequest are exposed.
     
unityunity