Search Unity

[Released] AVPro Video - complete video playback solution

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

  1. halinc

    halinc

    Joined:
    Feb 24, 2019
    Posts:
    32
    Hi, is there a way to create a fade-in effect when the video is loaded? I am using the video in an AR app where the video should fade in instead of instantly appear. With Unity Video Player, this was possible by using a script like this:

    Code (CSharp):
    1.  
    2. Color c = rend.material.color;
    3. c.a = startPosition;
    4. rend.material.color = c;
    5.  
    6. for (float f = startPosition + 0.01f; f <= 1; f += 0.01f)
    7.             {
    8.                 if (rend == null)
    9.                 {
    10.                     break;
    11.                 }
    12.  
    13.                 c = rend.material.color;
    14.                 c.a = f;
    15.                 rend.material.color = c;
    16.                 await UniTask.Delay(TimeSpan.FromSeconds(fadeDuration / 100), cancellationToken: cancellationToken);
    17.             }
    This isn’t working with a material with the AVPro Shader (using the Apply To Material component). Is there a way to make it work?

    EDIT: nvm, just figured it out myself. Just had to set the transparent shader and then in the script below add the following before the for loop:
    Code (CSharp):
    1. ApplyToMaterial atm = GetComponent<ApplyToMaterial>();
    2.             if (atm != null)
    3.             {
    4.                 atm.Material = rend.material;
    5.             }
     
    Last edited: Feb 13, 2024
    Chris-RH likes this.
  2. phileday

    phileday

    Joined:
    Feb 8, 2014
    Posts:
    120
    @Chris-RH

    I've done a bit of digging and it seems that the IMediaControl.CanPlay() is returning false when loading the network location in. I can't work out why it's returning false but it appears to know where the file is as it doesn't give that error in the editor. The same file locally loads fine.

    If there is anything you could point me to I could try or if I can help test any issues please say. My email is phileday@yahoo.co.uk if you want to converse directly.

    My intention is to release a beta version of Whirligig over the weekend that has some network browsing in it. This currently will only work with the VLC plugin but if you want I can send you a copy if it helps.

    All the best

    Phil
     
  3. CatsonLee

    CatsonLee

    Joined:
    Feb 1, 2024
    Posts:
    3
    Unity Version:2022.3.13
    AVPro Version:2.9.0
    Platform:IOS
    Device:IPhone 14 Pro
    Yes,can repeated using a new project
     
  4. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    862
    Will you support MV-HEVC? Apples spatial video format, which, as I understand it, just contains SBS stereo.
     
  5. overbuiltsgames

    overbuiltsgames

    Joined:
    Aug 28, 2021
    Posts:
    3
    Does it work on Apple Vision Pro's VisionOS ?
     
  6. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    219
    Hi @cecarlsen,

    We are looking at adding support for MV-HECV. It is on our TO DO list :)

    Kind regards,
    Chris
     
  7. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    219
    Hi @overbuiltsgames

    We are planning on supporting VisionOS in AVPro Video version 3, which is due to be released in Q2 this year.

    Kind regards,
    Chris
     
    cecarlsen likes this.
  8. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    AVPro Video version 2.9.2 has just been released!

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Changes include:

    Windows
    • Fixes
      • Fixed issue with paths to files on a network share not working
    iOS/macOS/tvOS
    • Fixes
      • #1721 Fixed issue with the texture transform being incorrect for certain videos
      • #1745 Fixed issue with GetProgramDateTime() always returning 2001-01-01 after repeatedly seeking to the beginning of a HLS Live stream

    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
    Core Windows Edition
    Core Android Edition
    Core macOS/iOS/tvOS 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.

    Please report any issues to our Github Issues
     
  9. phileday

    phileday

    Joined:
    Feb 8, 2014
    Posts:
    120
    Hi

    This is brilliant, thank you. Being able to load network locations totally opens up the network support I'm installing into Whirligig.

    I do have a couple of notes though. The protocol I'm using to discover the network locations (the VLC plugin) returns this:
    Example:
    file://193.178.1.215/Z%20Drive/THE%20CLIMB%20360%C2%B0%20ALPS%20ASCENT.mp4

    This does not load but doesn't say the file is missing. Firstly I removed the "file:" to this:
    //193.178.1.215/Z%20Drive/THE%20CLIMB%20360%C2%B0%20ALPS%20ASCENT.mp4

    but it would then report that the file was missing. So I used "HttpUtility.UrlDecode(ThePath);" to decode the name into:
    //193.178.1.215/Z Drive/THE CLIMB 360° ALPS ASCENT.mp4

    Which then worked.

    So I have a solution for converting the file into a format that AVPro can recognize so for me there isn't a problem. I thought you might want to know though as I suspect that the original path should work but it's being flagged up somehow like it was before.

    As I say though I have a solution so it's more to let you know my findings.

    I will be testing this with Android soon so if I have any problems I'll let you know.

    Again thanks for the great work.

    Philippa
     
    Chris-RH likes this.
  10. phileday

    phileday

    Joined:
    Feb 8, 2014
    Posts:
    120
    @Chris-RH

    Hi again. Don't worry I'm not reporting any issues :) I'm actually reporting a solution I found for a previous post about black flicker.

    I found out what was causing the issue or at least what solved it after I changed a setting. So the black flicker was being cause by tearing. Every time there was a screen tear the chunk that tore went black making the tearing very obvious. The solution I found was turning on VSync Count to Every V Blank. This prevents the tearing and fixes (at least I think) the problem.

    You can understand how this was difficult to recreate as whether something tears is based on many different aspects.

    I hope this helps anyone who was suffering with the same problem.

    All the best

    Phil
     
    Ste-RH and Chris-RH like this.
  11. phileday

    phileday

    Joined:
    Feb 8, 2014
    Posts:
    120
    @Chris-RH I've finally had a chance to test it with android and this is still a problem. It's coming up with the same issues that the PC version had. Examples of paths:

    smb://192.168.8.172:495/Public/Films/Wonder%20Woman%.mkv

    http://192.168.8.101:17293/WMPNSSv4/433403194/1_MTVfMjYzZDliMDItMjE2MDE.mp4

    These locations are generated using the VLC video plugin network stuff and I've changed them a little so they don't lead back to me :)

    I've tried this with the addition of file:// and without and HttpUtility.UrlDecode fix and still get the same issue . The VLC plugin does work with these paths. These files also play fine with AVPro when local.

    I noticed in the last release that the update only applied to the Windows version so I'm guessing that no changes have been made to the android side of things so maybe it has the same issue?

    I can provide a copy of the apk so you can see the logcat issues if you want.

    A quick report of the Windows update. It is all working fine with the fixes I've mentioned above so thank you for that update it's very appreciated :)

    All the best

    Phil
     
  12. CatsonLee

    CatsonLee

    Joined:
    Feb 1, 2024
    Posts:
    3
    Hi,Chris-RH,I want to know, have you fixed this issue?I really hope to fix this issue because it affects my game memory
     
  13. unity_DC759DF0DA0A3487DB10

    unity_DC759DF0DA0A3487DB10

    Joined:
    Mar 11, 2024
    Posts:
    1
    @phileday Hi there, I am encountering a 404 error when calling the YouTube API. Could you please provide a solution for this?
    Reference image attached
     

    Attached Files:

  14. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    AVPro Video version 2.9.3 has just been released!

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Changes include:

    Android
    • Fixes
      • #1713 Fixed OES texture transform issue

    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
    Core Windows Edition
    Core Android Edition
    Core macOS/iOS/tvOS 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.

    Please report any issues to our Github Issues
     
  15. phileday

    phileday

    Joined:
    Feb 8, 2014
    Posts:
    120
    Hi

    I think you might have me mistaken for one of the Renderhead developers. I'm sure they'll pick of the thread though :)
     
  16. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    219
  17. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    Hi All,

    Finally, after many months of development, we can announce that we are swiftly moving towards the release of AVPro Video 3.0.

    It’s been over three years since we released version 2.0, with our original target for the asset being a two year life cycle. This was so we could offer developers continuity for a lengthy period, target stability, but also look ahead and focus attention on larger changes we wanted to make for the next major release. Whilst we transition over to v3.0, we will still aim to support version 2.0 for a period of time - this will be for a minimum of 2 months. At the point we release v3.0 on the Unity Asset Store we will then retire/deprecate v2.0 and it will no longer be available for purchase. At the moment of release, any developer who has purchased v2.0 within 60 days prior will receive a free upgrade to the equivalent edition in the v3.0 product chain. This will all be handled via the Unity Asset Store purchase chain. At this point, we are hoping to get AVPro Video to full release within days/weeks rather than months.

    As a stepping stone to the full release of v3.0 we have released a trial version release candidate onto github for any developer who wishes to look to migrate over to the new version prior to its release. Naturally, our team would very much appreciate the reporting of any issues that are seen via the usual channels - via GitHub issues is our teams preferred option.

    AVPro Video 3.0 RC4 trial version can be downloaded here.

    We've also updated both our PDF documentation and online web portal version. This can be accessed here.

    Finally, we have put together a guide/scripting that we hope will smooth updating projects from v2.x to v3.x. You can find that here. Please understand that this process is very much WIP and we do expect minor bumps in the road with it. As ever, we would always stress that your projects should be fully backed up before embarking on the process.
     
    Last edited: Mar 21, 2024
  18. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    We will be updating a 'known issues' and workarounds in the github announcement issue post. These issues will all be fixed for RC2 and beyond. You can view the post here.
     
  19. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    AVPro Video v3.0 RC3 (Trial) has now been released. You can download it here.

    Thanks to everyone for the reports so far.
     
  20. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    AVPro Video v3.0 RC4 (Trial) has now been released. You can download it here.
     
  21. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,874
    Hi!

    I've a grid of ~20 videos. I need to fetch their first frames as quickly as possible and display them as thumbnails on the grid. In addition, ~5 of these videos are playing simultaneously. Currently, I'm using a brute-force approach using Unity's VideoPlayer: having ~20 VideoPlayers (one for each video), playing them as soon as the app starts and pausing them at the first frame. These VideoPlayers render into the grid cells (an Unlit Quad per cell). For the ~5 videos that are playing, I simply unpause their VideoPlayers.

    This works fine on iOS and modern Android devices. Older Android devices either crash or the videos randomly freeze for a few seconds. I am planning to switch to AVPro to see if it'd fix these problems. Would you have any recommendations for my scenario? Would switching those ~20 VideoPlayers to MediaPlayer possibly be sufficient or would you recommend any further optimizations like having just a few MediaPlayers to generate the thumbnails (load a video->get its first frame->unload the video->load the next video)? I'd like to repeat that I need to get the video thumbnails as quickly as possible. I'm also thinking that "OES Playback Path" alone would help optimize this process even further.

    PS. Do you know if Unity's VideoPlayer uses MediaPlayer, ExoPlayer, or something else entirely?
    PPS. Congratulations on v3.0!
     
  22. DN_KyeongMin

    DN_KyeongMin

    Joined:
    Mar 21, 2024
    Posts:
    1
    Hello!

    I am developing a video player app in a Windows 10 environment.

    You must display multiple 4K videos using AVPro.

    ex)
    Play A 4K video on Display 1
    Play B 4K video on Display 2
    Play C 4K video on Display 3
    Play D 4K video on Display 4
    Play E 4K video on Display 5

    Is it possible to play with AVPro in this environment?
     
  23. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    I am afraid we do not have any information on what APIs the Unity Video player uses.

    Regarding playing many videos at once. Ultimately, the limitation is hardware. Older devices will just not have enough resources to cope with having many videos decoding. Even holding videos open is a drain on a devices resources. So our advice here is that if you are not playing the video, close it.

    There might be a possible path around hardware limitations. Use software decoding for videos over a set amount (that number would be device specific though and there is no rule to decide what that is). That said, you would likely hit bottlenecks pretty quickly as, again, hardware limits you (CPU this time).

    In AVPro Video, we provide an async frame extract as part of the API. That will in essence open, seek, grab.

    We offer a free (watermarked) trial version. Grab that and see if the asset works for you. It might offer you nothing over the Unity player, but all you will have lost is a bit of time investigating :) I would recommend the latest v3.0 RC4 trial version as we will soon be deprecating v2.0.

    Do let us know how you get on, or if we can be of further help.
     
    yasirkula likes this.
  24. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    There is no yes or no answer to this. Rather, this might be possible. It will depend on the videos specifics (codec, bitrate, framerate, etc) and the hardware (GPU, and if you are using HAP then CPU) you are using.

    From memory, the only project RenderHeads have done with multiple 4k videos in a Windows environment was 3x 4k (h265) simultaneously. This was on a single NVidia Quadro RTX6000 - which, although we cannot really compare, performance wise is somewhere between a GTX 3070 and 3080. The Quadro 6000 did struggle with the videos we threw at it, though they were 60fps and mid level high bitrate.

    I would advise downloading our free (watermarked) trial version and test out the asset for your use case on the projects final hardware. Grab the latest v3.0 RC4 trial version and do let us know how you get on.
     
  25. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    AVPro Video v3 is now live on the Unity Asset Store

    All editions of the asset, excluding Enterprise, can now be purchased/upgraded via the following links:

    • Core Desktop Edition (core features for Windows, macOS platforms)
    • Core Mobile Edition (core features for Android, iOS, tvOS platforms)
    • Core Edition (core features for Windows, macOS, Android, iOS, tvOS platforms)
    • Ultra Edition (advanced features for all platforms : Windows, macOS, Android, iOS, tvOS, visionOS)
    • Enterprise Edition (for larger companies with multiple sites/offices/subsidiaries) - Contact us for pricing details

    We have deprecated AVPro Video version 2.x and it is no longer available for purchase. As previously stated, we will continue to offer support for this version for the next 2 months. After this time we will officially stop supporting v2.x. Should you wish to benefit from continued support and updates, you will need to upgrade your license to v3.x via the Unity Asset Store. As with our previous major version update, we are offering v2.x license holders a discount for upgrading to v3.x. More information on this can be found here in the documentation.

    Thank you to all developers for your continued support, bug reporting, patience, enhancement ideas, and just being a lovely community of talented people spanning the entire globe.
     
  26. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,874
    @Ste-RH Thank you for the detailed response. I've tried the trial version and encountered similar issues to VideoPlayer (except it didn't crash in AVPro, at least). So I'll be implementing a solution to generate thumbnails using 1 or 2 dedicated MediaPlayers and see how it goes.
     
    Ste-RH likes this.
  27. frangagn

    frangagn

    Joined:
    Sep 20, 2018
    Posts:
    53
    What are the differences between version 2 and version 3. Is there an upgrade pricing?
     
    Last edited: Mar 27, 2024
  28. frangagn

    frangagn

    Joined:
    Sep 20, 2018
    Posts:
    53
    Error: Loading failed, FIle not found, codec not supperted, video resolution too high etc....

    I keep having this error on one of my projects using AVPRO 2.9.3. I have this plug-in in two different projects. And in one of them, the video plays without a problem, while in the other I keep getting that error.

    The computer is the same, the file is the same, the codec is the same, the video resolution is the same in both projects. The video file plays within Windows using a normal video player (e.g. Zoom Player or Window TV player). So the file is ok.

    I copied the setting from the AVPRO Media Player, step by step from the project where it works to the project where it does not. I copied the Unity Player settings exactly as well.

    Any idea of what could be causing this? The error message itself is not very useful.....
     
  29. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    219
    Hi @frangagn

    The main improvements with AVPro Video version 3 is that it supports Vulkan on Android and VisionOS for the VisionPro.
    There is a discounted upgrade path between versions 2 and 3, which will be automatically applied in the Unity Asset Store. More info: https://www.renderheads.com/content/docs/AVProVideo-v3/articles/download.html#upgrade-pricing

    Kind regards,
    Chris
     
  30. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    219
    Hi @frangagn

    Which platform is it not playing on?
    What sort of media are you trying to play?
    if it works in the demo scenes on the same hardware, then it is something within your project that is preventing it from playing. it may be that something else in your project is hogging resources. it could be that the settings are slightly different. Difficult to know without comparing them both. Perhaps try rebuilding it around the demo scene?

    Kind regards,
    Chris