Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Released] AVPro Video - complete video playback solution

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

  1. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    200
    Hi,

    We don't have anything specific for that. However a few years ago someone created this: https://github.com/ScatterCo/avpro2playables . It was for a much older version of AVPro Video, but it might give you a starting point perhaps?

    Kind regards,
    Chris
     
    schema_unity likes this.
  2. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    200
    Hi,

    Are you using the latest version of AVPro Video?
    Which shader are you using?
    Does it look correct in Linear colourspace?
    What are the specs of the videos you are using?

    Kind regards,
    Chris
     
  3. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    200
    Hi Phil,

    Is it a black flicker?
    Are you using "low latency" streaming option?
    Is it a particular graphics card?
    What are the GPU/CPU work levels like when playing the video?
    What are the specs of the videos? resolution? FPS? bitrate?

    Kind regards,
    Chris
     
  4. julbrich

    julbrich

    Joined:
    Aug 17, 2022
    Posts:
    1
    Hello

    I was wondering if there was any planned support for VisionOS, and if/when that would be coming.
     
  5. ickydime

    ickydime

    Joined:
    Nov 20, 2012
    Posts:
    110
    I'm curious about the recommended playback rates in the documentation where it suggests 0.25, 0.5, etc. Are they recommended because playbackrate gets rounded to certain values?

    We would like to set playbackrate to precise numbers like 0.74736 and be constantly changing the rate as we are working on an exercise application where the faster the user goes, the faster the video should playback. If the user slows down it may drop to 0.44321 and then if they go real fast it could go to 1.2323 or similar.

    Something seems off (and I don't know if it is the video playback) but the video tends to reach its end before the actual distance is reached. The video's completion percentage increases faster throughout playback than the distance travelled so the delta between the video completion and the distance actually completed slowly grows throughout the workout.

    Soooo. Is there any rounding being done on playbackrate? In the editor when I set it, I can get it back out and it is identical so the variable itself isn't rounded.
     
  6. phileday

    phileday

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

    Sorry I'm just replying, I didn't realise I was the last comment in the previous page.

    I'll answer as best as I can but there is a fundamental issue I has with reporting the problem.

    Is it a black flicker?
    I believe so.
    Are you using "low latency" streaming option?
    No, should I?

    Is it a particular graphics card?
    Not sure.

    What are the GPU/CPU work levels like when playing the video?
    Again not sure.

    What are the specs of the videos? resolution? FPS? bitrate?
    and a third time not sure.

    So as you can see the answers are very vague. This is because it's an issue that is being reported to me and something I've only noticed a couple of times myself. I'll say the the times I've noticed it it's been on a very high spec machine running Intel and an Nvidia card.

    As it's something that I personally can't reproduce I was wondering if you had ever come across these issues and if there is any advice on settings I might of put on that might be causing it. For instance would having "low latency" help or would multi thread rendering affect anything. I regularly update Unity (I'm on the 2022 builds) so it could well be solved in that.

    One quick question. I provide muxed subtitle support where possible. I'm using the language code to retrieve the relevant full names of the languages however AVPro seems to return a two letter language code when it should be three letters. For example "en" instead of "eng". In VLC it returns "eng". Is there a reason for this? In this case I can provide examples of videos (open source videos so no problem with sharing) that do this.

    Thanks for your help and thanks for making such a great plugin.

    Phil
     
  7. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    130
    AVPro Video version 2.8.5 has just been released!

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Changes include:

    General
    • Enhancements
      • #1627 Added support for scaling to the ResolveToRenderTexture component
    Android
    • Enhancements
      • #1619 Added ability to force TCP as the default RTP transport
    Windows
    • Fixes
      • Fixed issue with videos not playing in 32-bit builds
    iOS/macOS/tvOS
    • Fixes
      • Fixed issue with display aspect ratio (DAR) not being applied
      • #1460 Fixed issue with the colour transform not being applied correctly for full range (pc) videos
      • #1626 Fixed issue with ExtractFrame clearing the screen instead of the target render texture
      • #1625 Potential fix for crash

    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
     
  8. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    130
    We plan on supporting VisionOS in AVPro Video version 3. We do not have a date for it's release, but are hoping to make it some point before the end of the year.
     
  9. ickydime

    ickydime

    Joined:
    Nov 20, 2012
    Posts:
    110
    Does AVPro round playbackrate? Currently testing in Windows and iOS. The docs have recommended rates but it is unclear why those rates are recommended.

     
  10. JimmyIGT

    JimmyIGT

    Joined:
    Dec 2, 2021
    Posts:
    1
    Hi I bought the core version and was wondering if there is a way to swap video's like the Video Playlist Beta but based on certain triggers to choose which video to play next? Essentially like a unity animator events system.

    We have a simple video base game where the character animations are videos and need swapping to the specific animation video. I have done this we the inbuilt video system enabling different video clips via an animator but it had hitching and bought this to eliminate it.

    Cheers,
    James
     
  11. frangagn

    frangagn

    Joined:
    Sep 20, 2018
    Posts:
    48
    Is there any way to disable the AVPRO Video logo on the video screen when the screen is idle or when an exception is encountered?
     
  12. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Hi,

    I'm a longtime Ultra Edition user and I'm having an issue on Android I never seen before, a strong "time jittering" behavior that appears everytime a video starts playing, and affecting everything in scene. I mean, not only the video timeline jumps back and forth but also the camera, the UI and everything else seems to literally jump back and forth in time together with the video stream.

    This is an app I developed more than a year ago and published on various platforms (WebGL, Windows, MacOS, Android, iOS and Oculus) without any problems. The issue started showing just on devices with the latest Android versions, while it's still correctly working on Android 10. No problems at all in editor.

    Following is a video showing the issue:

    The navigation movements are automatic (standard Unity "AI Navigation" package) and as you can see, everytime the player enters a trigger that starts a video, the problem occurs (0:25 and following, 1:48 and following,...) while it disappears when no videos are playing (first few seconds and from 1:03 to 1:47).

    Here's the usual Android settings i used for the video players:


    I also tried to change a few parameters - e.g. Exo Player instead of Media Player, disable Multithreaded Rendering and so on - without any success.

    The app is available on Google Play, in case you would test yourself:
    https://play.google.com/store/apps/details?id=com.EditriceNuovoMondosrl.GIUSSANI100&hl=en&gl=US

    The current Google Play version uses an older AVPro Video package but I tested it with the latest package, and the issue is still present.

    Hope you can suggest me a solution.
     
    Last edited: Sep 7, 2023
  13. cnsjjj

    cnsjjj

    Joined:
    Aug 13, 2022
    Posts:
    21
    I want to render a video on a plane. How can I control the aspect ratio of the video to achieve the scale to fit function. At the same time, fill the empty areas with black.
    The left side of the picture below is VideoPlayer, which contains the Aspect Ratio option. Setting it to fit inside can support this function. But I don’t know how AVPro can achieve similar functions.
    Can you give me some help and suggestions? Thank you very much!

    upload_2023-9-14_13-38-29.png

    upload_2023-9-14_13-38-56.png
     
  14. amz012_utida

    amz012_utida

    Joined:
    Nov 16, 2016
    Posts:
    4
    AVPro Video uses the latest version. I am using Unity uGUI defaults Due to the specifications of the app, it cannot be created with linear, so I have not confirmed it with linear. This is a 1080 x 1920 px, frame rate 28, average bit rate 4Mbps, MP4 video recorded using AVPro Movie Capture.
     
    Last edited: Oct 4, 2023
  15. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    200
    Hi @JimmyIGT,

    Its not something that we specifically support, but you should be able to code it. We have API documentation to help you with coding: https://www.renderheads.com/content/docs/AVProVideo/api/RenderHeads.Media.AVProVideo.html

    Kind regards,
    Chris
     
  16. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    200
    Our logo is only on the trial versions. It won't be one the version of the platform that you purchase it from.

    Kind regards,
    Chris
     
  17. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    200
    Hi @RiccardoAxed,

    What are the specs of the videos?
    How many are playing concurrently?
    Where are they playing from (local or streaming?)
    What Android version and device(s) have you tested on?
    Can you provide a full logcat?
     
  18. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    200
    Hi @cnsjjj

    If you use Display UGUI, you can stretch to fill
    https://www.renderheads.com/content/docs/AVProVideo/articles/component-display-ugui.html

    Kind regards,
    Chris
     
  19. cnsjjj

    cnsjjj

    Joined:
    Aug 13, 2022
    Posts:
    21
  20. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Just ordinary mp4, h264 at various resolutions, from hd 1920x1080 downwards. The video that starts at 30s in the clip I attached is just 800x600.

    Just one at a time.

    Both, always having the same problem.

    I tested the app on a Samsung S10 with Android 12 and it works without issues, but every other phone with Android 13 seems to have the problem. For instance, a Galaxy S23 Ultra (Android 13) has the problem.

    Ok I'll try to generate one as soon as possibile.
    Anyway, as I was saying in my previous post, the app is available on Google Play, so you could test yourself:
    https://play.google.com/store/apps/details?id=com.EditriceNuovoMondosrl.GIUSSANI100&hl=en&gl=US
     
  21. SB

    SB

    Joined:
    Nov 19, 2012
    Posts:
    5
    Hi, I have the following problem with MediaPlayer on macOS: I want to use MediaPlayer with Unity Audio. In MediaPlayer, I have set the AudioOutput to "Unity" in the settings for macOS. When the loaded video is played for the first time, the sound comes through Unity Audio, as desired. However, on repeated playback (loop, stop / play), the sound no longer comes through Unity Audio, but is output directly.

    This can be easily tested in the editor: Load a movie with audio into the MediaPlayer, activate "loop" and play the video in the Inspector (in editor mode). Since the sound is supposed to come via the AudioSource, nothing is correctly heard. When the video starts again from the beginning, you hear the sound via the direct output, which should not be the case.

    Or you send the output of the AudioSource into an AudioMixerGroup, and watch the level meter (in play mode). During the first pass of the video you see the audio signal on the level meter, from the second pass on you don't see it anymore.

    I hope you have a solution for this.
    ---
    Edit: I have since done builds for macOS and iOS to test the behavior, and unfortunately the problem also occurs in the build for both platforms.
     
    Last edited: Oct 12, 2023
  22. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    347
    Forgive me if this has been asked before...Is it possible to replicate the Unity Camera's "Field of view" in your software?
    Sometimes I will set the main camera field of view to be 70 or even 90 but when recording the scene/project your capture app takes the camera back to the default 60 field of view. Can this (field of view) be changed using some method or another ?
    EDIT. Sorry..meant to mention this is on the component "capture from camera360".
     
    Last edited: Oct 14, 2023
  23. CaptainPyFace

    CaptainPyFace

    Joined:
    Apr 12, 2013
    Posts:
    7
    Hi I've noticed that if the Demo_MediaPlayer scene is streaming video via URL in a WebGL build, the video does not play in Safari Mac if sound is enabled, but does is sound is muted. Can this be fixed somehow? Safari iOS works fine btw as well as all the browsers I've tested
     
  24. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    200
    Hi @CaptainPyFace,

    We don't officially support WebGL, mostly because of various issues that come up with browser compatibility.

    For Safari, you need to make sure you are using WebGL 1.0.
    Are you auto-playing the media? In Safari, videos are not allowed to auto-play unless given permission by the user (in the preferences menu). This doesn’t affect videos that have no audio track. More details can be found here: https://webkit.org/blog/7734/auto-play-policy-changes-for-macos/ I wonder if you could start the video muted and then unmute it after a few frames?

    Kind regards,
    Chris
     
  25. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    200
    @vertexx

    No, its not possible.

    Kind regards,
    Chris
     
  26. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    200
    Hi @SB,

    That's strange.
    Can you reproduce this in a fresh project using just AVPro video?
    What version of AVPro Video are you using?
    Which Unity version are you using?
    Which macOS/iOS version?
    What are the specs of the videos used (codecs, resolution, FPS etc)?
    Are the videos streamed or played locally?

    Kind regards,
    Chris
     
  27. SpaceAgeInteractive

    SpaceAgeInteractive

    Joined:
    Feb 4, 2018
    Posts:
    59
    For anyone who is encountering the following error when building a Unity 2022 project for the Meta Quest with AVPro:

    Dependency ':exoplayer-datasource:' requires 'compileSdkVersion' to be set to 33 or higher.
    Compilation target for module ':launcher' is 'android-32'


    This error is due to Exoplayer requiring a min SDK level of 33 due to a Google Play Store requirement, but Meta requires a min SDK level no higher than 32 (as of 2023/11/01) so you cannot actually set the min SDK level to 33 otherwise Meta's build uploader will reject your build. In order to build with a min SDK level of 32 and bypass the error, you you must patch your installation of Unity 2022:

    1. In Unity, set the 'Minimum API Level' to Level 32. For the Meta Quest, you cannot currently set it any higher than this.
    2. Navigate to C:\UnityEditor\2022.3.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\GradleTemplates
    3. Create a backup of mainTemplate.gradle and launcherTemplate.gradle
    4. Open mainTemplate.gradle in a text editor and change the line compileSdkVersion **APIVERSION** to compileSdkVersion 33
    5. Change the line targetSdkVersion **TARGETSDKVERSION** to targetSdkVersion 32
    6. Repeat steps 3 and 4 for launcherTemplate.gradle
    7. Install Unity 2023 (I installed 2023.1.19f1) and navigate to the folder C:\UnityEditor\2023.1.19f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms
    8. Copy the android-33 folder into your Unity 2022 installation folder C:\UnityEditor\2022.3.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms
    9. Build the project and it should now work.

    More discussion about the problem can be found here.
     
  28. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    130
    AVPro Video version 2.9.0 has just been released!

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Changes include:

    General
    • Enhancements
      • #1059 | #1552 Added Paused and Unpaused events
      • #1627 | #1490 Added support for handling video orientation into the ResolveToRenderTexture component
    • Fixes
      • #1639 Fixed incorrect transform for videos that are landscape flipped
    Android
    • Changes
      • Upgraded ExoPlayer from 2.19.0 to 2.19.1
    • Fixes
      • When using the Unity audio pipe, samples from the buffer are now no longer drained/returned when video is paused
    • Enhancements
    iOS
    • Fixes
      • #1653 Fixed issue with Unity audio output mode failing due to changes in how the audio processing tap works with iOS 17
      • #1671 Disabled audio spectrum visualisation in the Media Player demo scene on iOS due to it causing GPU issues on certain devices with iOS 17

    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