Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[Released] AVPro Video - complete video playback solution

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

  1. trojant

    trojant

    Joined:
    May 8, 2015
    Posts:
    24
    Hi,I have a lot of playlistMediaPlayer in scene,but I can't control their muteaudio function.I used These methods,and the audio will still play.What shall I do? Thank you.

    (1)playlistMediaPlayer.m_Muted = true; (invalid)
    (2)playlistMediaPlayer.Control.MuteAudio(true); (invalid)
     
  2. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hi @trojant

    There are two methods you could use to do this:

    Either you could set the mute state on each of the sub-players:
    playlistMediaPlayer.CurrentPlayer.m_Muted = true;
    playlistMediaPlayer.NextPlayer.m_Muted = true;
    playlistMediaPlayer.CurrentPlayer.Control.MuteAudio(true);
    playlistMediaPlayer.NextPlayer.Control.MuteAudio(true);

    Or you could add your own Mute method to PlaylistMediaPlayer.cs:
    void Mute(bool enabled)
    {
    CurrentPlayer.m_Muted = enabled;
    NextPlayer.m_Muted = enabled;
    CurrentPlayer.Control.MuteAudio(enabled);
    NextPlayer.Control.MuteAudio(enabled);
    }

    and then call:
    playlistMediaPlayer.Mute(true);
     
    trojant likes this.
  3. AndrewRH

    AndrewRH

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

    AVPro Video version 2.0.9 has just been released!

    Changes include:

    General
    • Added
      • New documentation about upgrading projects using AVPro Video 1.x
    • Improvements
      • Backward compatibility with scenes and prefabs made with AVPro Video 1.x has been improved
    • Fixed
      • #657 Playback does not resume after re-enabling the MediaPlayer component
      • Fixed compile issue in PlaylistMediaPlayer component
    Windows
    • Improvements
      • Optimised Hap and NotchLC playback performance
    • Fixed
      • Fixed Hap and NotchLC MOV files with > 4Gbps bitrate not opening. Enable the new "Use Custom MOV Parser" option in Platform Specific > Windows settings.
      • Fixed potential null exception when calling GetAudioBufferedSampleCount()
    macOS / iOS / tvOS
    • Added
      • Added support for GetAudioBufferedSampleCount()
    • Fixed
      • #636 Playback starting before seek when quickly re-opening a video
      • #652 IsPlaying returning true when the MediaPlayer component has been disabled
      • #658 BT.709 videos appear washed out
      • #659 FirstFrameReady firing prematurely when re-using a player instance
    macOS
    • Fixed
      • #642 Crash on Apple Silicon when using the Mono scripting backend
    Android
    • Fixed
      • Builds made with Unity 2020.1 and above were crashing because the new Gradle was stripping out 'unused' code. We've added a new build script that ensures the Gradle project has the required setting to fix this.
    WebGL
    • Fixed
      • Fixed issue where Chrome and Edge would show a black frame when triggering FirstFrameReady event on streaming MP4 files
      • IsPlaying() now returns whether the intent is for the timeline to progress, instead of whether the timeline is actually progressing (stalled)
      • Fixed webGL 1.0 throwing error when loading the MediaPlayer UI due to audio spectrum shader

    Download Links

    Editions
    On the Unity Asset Store we've made several editions of AVPro Video available so you can pick the one that's best for your project:
    Core Edition
    Ultra Edition
    • Enterprise Edition (contact us for multi-site licensing / support options)​

    You can read this page to learn more about the features, pricing and upgrades for the different editions.

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Thanks to everyone who reported bugs or feature requests! We're looking forward continuing to support this product into the future and adding more features.

    Thanks,
     
  4. HarethTariq

    HarethTariq

    Joined:
    May 27, 2016
    Posts:
    1
    Hello, I am interested in this Plugin. Can you please tell me if it can be used for Projection Mapping?

    We have a room with 5 projectors, and all of them are connected to one computer PC windows 10, and each projector has its own identification (Display 1, 2, 3, 4, 5), can we use your plugin in Unity to adjust the video display on the Projector with it's physical values for edge blending etc...
    Create a similar experience to Resolume Arena?
     
    leavittx likes this.
  5. trojant

    trojant

    Joined:
    May 8, 2015
    Posts:
    24
    Hi, I use this playlistMediaPlayer script. I want to replay all video again. I don't know how to stop it and let it go back to the default state(There is no video). Then I don't know how to start playing from the first item video again. What can I do ? Thank you.
     
    Last edited: Mar 6, 2021
  6. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hi @HarethTariq

    No, unfortunately we don't have support for projection mapping.
     
  7. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hey @trojant

    In 1.x to restart the playlist you could use playlistMediaPlayer.JumpToItem(0);
    When there is no video playing you could set the display component to false: displayComponent.enabled = false;
    And then set it to true once you've started your playlist.

    Hope that helps!
     
    trojant likes this.
  8. TheElumenati

    TheElumenati

    Joined:
    Jan 22, 2014
    Posts:
    27
    Hello, we bought "AVPro Video", "Avpro Windows", and "Avpro Live" and want to update. But "AVPro Video" and "Apro windows" are depreciated and replaced with "core version". Can I get my license transferred or is our old license no good?
     
  9. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hi @TheElumenati
    I'm assuming you mean you have a license for version 1.x? AVPro Video 1.x still works and you can upgrade to the latest version (1.11.7) via the asset store - but if you want to upgrade to 2.x which is a separate product, all owners of 1.x are eligible for a discount - please see discounted upgrade paths here for specific versions: https://www.renderheads.com/content/docs/AVProVideo/articles/download.html.
    Also, when did you purchase 1.x? All users who purchased 1.x after 9 November 2020 are eligible for a free copy of 2.x.
     
  10. TheElumenati

    TheElumenati

    Joined:
    Jan 22, 2014
    Posts:
    27
    Thank you! I'll check out the options you suggested.
     
    TerryRH likes this.
  11. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    114
    Hi there!
    What is ASync Hap codec? How is it working?
    Is usual non-async Hap available in the 2.0 Core Edition?
     
    LostPanda likes this.
  12. edufurlaneto

    edufurlaneto

    Joined:
    Sep 18, 2017
    Posts:
    8
    Hi.
    The upgrade seems to have a lot of nice features, but I only realized there are no more Playmaker actions after install and it`s not very friendly when you try to control videos (unless using lots of code).
    Any chance for Playmaker actions or some tips for Playmakers users?
    I tried your Player example, but unfortunately, I was getting lots of errors because I am using the new input system on my project.
    Maybe if you separate the input controls form the script controlling the player and convert the video Methods to Public would be possible to use Playmaker to access the Methods.
     
  13. Acryllium

    Acryllium

    Joined:
    Oct 27, 2016
    Posts:
    1
    Hello,
    Are there current plans to upgrade AVPro to support ExoPlayer r2.13.X or later? I'm interested in the low-latency streaming features added to this version, and would appreciate any insight on when this might become available.

    https://github.com/google/ExoPlayer/releases/tag/r2.13.0
     
  14. suspect7

    suspect7

    Joined:
    Jan 24, 2016
    Posts:
    5
    I would also very much be interested in some playmaker actions! Even just some basics like setting the Media Reference would be a huge help.
     
  15. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    166
    watting for window core version @TerryRH
     
  16. psyhama

    psyhama

    Joined:
    Sep 4, 2018
    Posts:
    7
    Hi, we're using AVPro (1.x) for Oculus Quest (Android based) and there's a requirement that the app must pause when the OS's dashboard appears.
    So, is there any good way to pause all MediaPlayer globally, and unpause afterwards?
     
  17. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    @LostPanda I'm not sure what you mean - we already have a Windows Core edition.
     
  18. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hi @psyhama

    Is it not suitable to iterate over all your MediaPlayers using mediaPlayer.Control.Pause() and then mediaPlayer.Control.Play()?
     
  19. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hi
    Hi @Acryllium

    We are currently already using ExoPlayer 2.13.1. We do plan to update to the latest release 2.13.2, but can't give an exact timeline on that just yet. Please see our Android Platform notes here: https://www.renderheads.com/content/docs/AVProVideo/articles/platform-android.html.
     
  20. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    166
    sorry, it only Windows Ultra Edition.thanks
     
  21. pravinyadav

    pravinyadav

    Joined:
    Jan 24, 2010
    Posts:
    30
    Hi,
    I have many videos in VCR script. Based on some action I have to load a new video and want to play from specific position. Seek command works only on first video but does not work on dynamically loaded video. I can wait for polling and buffering of video but not sure why it us not working.
    I have FrontVideoListTable that has VideoStartTime, VideoEndTime and other info of the videos. I am calling a coroutine that has following code
    LoadingPlayer.OpenVideoFromFile(_location, System.IO.Path.Combine(_folder, _videoFiles[FrontVideoListTable[_VideoIndex - 1].Get<int>("NextVideoSrNo") - 1]), true);
    yield return new WaitForEndOfFrame();
    _VideoIndex++;
    yield return new WaitUntil(() => PlayingPlayer.Control.GetBufferingProgress() == 1f);
    yield return new WaitUntil(() => PlayingPlayer.Control.HasMetaData());
    Debug.Log("Buffering " + PlayingPlayer.Control.GetBufferingProgress().ToString());
    _videoSeekSlider.value = (float)(FrontVideoListTable[_VideoIndex - 1].Get<int>("VideoStartTime")) / (float)(FrontVideoListTable[_VideoIndex - 1].Get<int>("TotalDuration"));
    Debug.Log("New Front slider value: " + _videoSeekSlider.value.ToString());
    OnVideoSeekSlider();
    yield return new WaitForEndOfFrame();
    ----------------------
    New Video is loading but not respecting user defined startframe.
    In debug it is showing updated slider value but not playing from that point. It is playing from it start of video.
    Limitation is that I can't join all these videos. At runtime only I can decide the video and its start an end time.
    Please guide me to solve this issue.
     
  22. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hi @pravinyadev

    Could you please let me know the following:

    1. Which version of AVPro Video are you using?
    2. Which operating system are you using?
    3. Which Unity are you using?
    Thanks
     
  23. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    We are still considering doing this but as said above having 3 extra editions means that releases require more testing and slows down the process. I will bring this up again but it might be better suited to when more time has passes since the initial release.
     
  24. pravinyadav

    pravinyadav

    Joined:
    Jan 24, 2010
    Posts:
    30
    AVPro Version 1.11.2 Core Windows edition
    OS: Windows 10 Pro
    Unity 2019.4.20f1
    We have already bought Version 2 but we don't want to upgrade it. As of now entire project is already deployed and working fine at client end.
     
    Last edited: Mar 17, 2021
  25. CONGOBILL

    CONGOBILL

    Joined:
    Mar 4, 2020
    Posts:
    4
    I am considering to buy this plugin, but I it's impossible to get it working on Linux. Any future plans about this? I think you're losing a lot of potential clients.
     
  26. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    405
    Hi,

    Yes we do not support Linux sadly, and we currently have no plans to. We are a small team so we can't easily add support for all platforms. Linux is also a bit of a tricky one because it doesn't have any built-in codec support, so we would have to add support for VLC/FFMPEG or something like that, and hardware decoding can be tricky too I suspect. We just just haven't had the resources to investigate this. If you know any good Linux coders who want to work on cool software they can send us their CVs :)

    We have noted your interest though, and obviously if there is a lot of interest then we can put more effort towards this.

    Thanks,
     
    CONGOBILL likes this.
  27. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    405
    Hi,

    It's difficult to know what could be causing this. You should certainly be able to seek to a specific point in the video. There's a chance there may be a bug in your code.

    Otherwise, you could try adding more key-frames to your videos as there's a change it is seeking to the nearest keyframe.

    Without a reproducible case it's hard to know what's going on. Have a look or consider sending us a cut-down repro-case (unitysupport@renderheads.com) if you still can't get it to behave.

    Thanks,
     
  28. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hi @leavittx

    In 1.x we only supported the HAP codec using the only DirectShow API which was synchronous. A lot of users complained that this would freeze their application while loading a video or seeking, because running these operations would block the main thread. In 2.x we've added HAP support for MediaFoundation as well, which functions asynchronously. The synchronous DirectShow implementation is still available. But we now only offer HAP support as a feature of the Ultra edition, not the Core edition.

    Does this help?
     
  29. frangagn

    frangagn

    Joined:
    Sep 20, 2018
    Posts:
    46
    Hi! I know you said that the fisheye was not supported by AVPRO 2.0. However, could it be possible to simply have a fisheye mesh and project to it to do the trick? Where could I find this?
     
  30. m4lumm

    m4lumm

    Joined:
    Nov 15, 2012
    Posts:
    15
    We would like to use this in our projects, however, it currently crashes Unity when streaming HAP files.

    Any idea when this will be fixed?
     
  31. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    114
    Yeah, perfect, thank you!
    I didn't know about the main thread blocking, good it's fixed now!
     
    TerryRH likes this.
  32. laolajia

    laolajia

    Joined:
    Jul 31, 2018
    Posts:
    3
    In the editor of 2019.2.11, whenever I play a video, the editor will crash and flash back. However, it can play normally after publishing, and other versions of Unity editor can also play normally. How is this happening
     
  33. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hi @edufurlaneto and @suspect7

    None of us in our team really use or have much experience with Playmaker, which is why it became untenable to keep updating it with our updates. The original code for this was introduced because it was given to us by the creators of Playmaker, and it would need to be updated to work with 2.x. We are unlikely to make this a priority unless it is requested by a lot of users. I've created an issue on our Github, you're welcome to follow this here: https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/695. Please feel free to comment your specific requests so we can attend to this when we have time.

    If you would like further support on using AVPro Video without Playmaker, please feel free to drop us a line at unitysupport@renderheads.com.
     
  34. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hi @laolajia

    Could you please supply some more information?

    1. What version of AVPro Video are you using?
    2. Which platform are you using?
    3. Could you please provide some more detail about the crash?
    Thanks.
     
  35. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hi @m4lumm

    Which version of AVPro Video are you using? If you're using the latest (2.0.9) there was a crash bug that was fixed recently (the fix will be in our upcoming release which will be out very soon) - but that was a memory leak bug so it would only be crashing after your application has been running for a while, not on the first play.

    Could you please provide a more detailed description of the crash?

    Thanks
     
  36. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hi @frangagn

    It's possible that I'm not interpreting what you mean by fisheye correctly - but I'm assuming you mean to play fisheye video to be played as a 360 video? If not, could you please provide an image so that we know what you're trying to achieve.

    If the above interpretation is correct, we don't support this. But you could implement this yourself - you'd basically need a shader to help you convert the video. Please see the following post for a good starting point: https://www.reddit.com/r/Unity3D/comments/8ybpo2/dewarping_a_180deg_fisheye_lens_camera/.

    Does that help?
     
  37. frangagn

    frangagn

    Joined:
    Sep 20, 2018
    Posts:
    46
    Will look, thanks.
     
    TerryRH likes this.
  38. CONGOBILL

    CONGOBILL

    Joined:
    Mar 4, 2020
    Posts:
    4
    The problem is that I need Linux to run a Unity App on server, so I have to create a virtual X Screen, and Windows is not able to do that. Is it possible to stream a Unity camera over RTMP with this plugin, inside Unity?

    Thanks!
     
  39. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    85
    Hey @CONGOBILL

    Yeah, we don't really support RTMP or Linux. Not sure this is possible.
     
  40. sebasspenaherrera

    sebasspenaherrera

    Joined:
    Nov 6, 2020
    Posts:
    1
    Hi!

    Does anyone know how to clear VideoPlayer Cache or buffer? I am trying to implement a testbed where the video is loaded several times. I have noticed that the first time the "initial playback time" is about 1.5s, but the second, third... time this value is about 0.2s.

    Thank you so much!
     
  41. laolajia

    laolajia

    Joined:
    Jul 31, 2018
    Posts:
    3
    After a day of debugging, I found that the call

    _instance = Native.OpenSource(_instance, path, (int)_videoApi, _useHardwareDecoding, _useTextureMips, _hintAlphaChannel, _useLowLatency, _audioDeviceOutputName, _useUnityAudio, _forceAudioResample, AudioSettings.outputSampleRate, filters, filterCount, (int)_audioChannelMode);

    And then it collapses
     
  42. rosssssss

    rosssssss

    Joined:
    Jan 27, 2017
    Posts:
    32
    Hello, we're having an issue where after the firstFrameReady event fires the - video, though displayable, is not actually yet playing - it's kindof paused for approximately a second (maybe more) still - is there any way to get the moment that the video is actually ready to play?
    it's an almost 4k video with Codec: avc1.4D4033,mp4a.40.2 - if that makes any difference...
    (same thing happens on Windows and Android)
    AVPro 1.11.3
    Thanks!
     
    Last edited: Mar 29, 2021
  43. rosssssss

    rosssssss

    Joined:
    Jan 27, 2017
    Posts:
    32
    A second slightly related question. Can you point me to information on the best practises for reducing video load times? We are building a VR experience where you can jump between cameras/videos and it's very important that we get that spooling time down as low as possible. Any clues? Thanks.
     
  44. inthenighttime

    inthenighttime

    Joined:
    Jun 5, 2018
    Posts:
    3
    Hello, having an issue with audio not rotating with picture in a stereo 360 video. Using the latest version of Avpro all settings setup accordingly. Muxed video with facebook encoder as a mkv with channel mappings set up to (TBE_8_2). Audio 360 set to main camera transform but when I move around the video, the spatialized audio doesn't move with the camera. It stays static at one position. Testing on Windows platform. Is there something I'm missing?
     
  45. laolajia

    laolajia

    Joined:
    Jul 31, 2018
    Posts:
    3
    This problem was solved by updating the plug-in

    thank you very much
     
    TerryRH likes this.
  46. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,700
    Which platform is this on?
    What type of media are you playing back?
    Which version of AVPro Vidoe?

    Are you sure that the initial time doesn't include the plugin loading time? If it's the first time your app uses the plugin (especially on Windows) there is a delay as the required DLLs are loaded for the first time.
    There is currently no option to clear any caches.

    Thanks,
     
  47. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,700
    First perhaps you should try upgrading to the latest 1.x version - 1.11.7.

    I guess the video is still buffering internally and this can take a variable amount of time depending on how complex the video encoding is and whether it's local or not.
    Are you playing streaming or local media?

    It sounds like a reasonable request.

    You may want to post this issue with more details to GitHub so that our dev team can take a look for you:
    https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues

    Thanks,
     
  48. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,700
    I think if you encode your video with less complexity it can reduce loading times. This means this like reducing the number of B frames (or removing them), disabling CABAC for H.264, reducing the number of ref frames.

    Also on Windows there is a 'low latency' option which will give you more immediate playback, but it can affect other qualities (eg playback smoothness).

    Thanks,
     
  49. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,700
    Spatial audio is only for rotation really, so it should adjust as you rotate the camera, but not for moving position.
     
  50. AndrewRH

    AndrewRH

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

    AVPro Video version 2.0.10 has just been released!

    Changes include:

    General
    • Improvements
      • sRGB-Linear conversion now defaults to more accurate version
    Windows
    • Improvements
      • Hap and NotchLC can now loop seamlessly (when using Custom MOV Parser option) and have many performance improvements
    • Fixed
      • #612 Fixed Windows 8.1 support for hardware decoding
      • Fixed issue where seeking to a frame would randomly not display that frame
      • Fixed various issues with Hap and NotchLC decoder including a memory leak
      • Fixed issue where Custom MOV Parser option would prevent H.264/HEVC MOV files from opening
    macOS / iOS / tvOS
    • Improvements
      • #692 Added support for smooth playback when the playback rate is set greater than 2x
    • Fixed
      • #664 Fixed issue with playback not starting unless a seek was performed when opening a video without autoplay enabled
      • #687 Fixed issue with status changes lagging behind the calls that caused them
      • #682 Fixed issue with seeking to time 0 not working
      • #678 Fixed issue with sideloaded subtitles not rendering
      • #674 Fixed issue with pausing and then deactivating a media player not remaining paused when reactivated
      • #670 Fixed issue with seeks not affecting a video that has finished playing
    macOS
    • Fixed
      • #701 Fixed issue Hap playback not producing textures
    Android
    • Fixed
      • #212 Fixed default texture not displaying in ApplyToMesh and ApplyToMaterial components
    WebGL
    • Fixed
      • #504 Fixed error logged on closing media
      • #627 Fixed media with display aspect ratio showing with gaps, and media with rotation showing as black

    Download Links

    Editions
    On the Unity Asset Store we've made several editions of AVPro Video available so you can pick the one that's best for your project:
    Core Edition
    Ultra Edition
    • Enterprise Edition (contact us for multi-site licensing / support options)​

    You can read this page to learn more about the features, pricing and upgrades for the different editions.

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Thanks to everyone who reported bugs or feature requests! We're looking forward continuing to support this product into the future and adding more features.

    Thanks,
     
unityunity