Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] AVPro Video - complete video playback solution

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

  1. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    We see you also posted on our Github. We will continue correspondence there.
     
  2. Lordmin

    Lordmin

    Joined:
    Mar 9, 2017
    Posts:
    62
    Hello, I am trying to build a 4K 360 degree video player in Android Mobile environment.

    *The capacity of each video is quite large. (4 GB or more)


    1. How to play by downloading the video, saving it locally, and then loading it

    2. How to upload a video to a storage service and play streaming by referring to the URL

    Which of the two is better?

    And, can you smoothly control the playback time when you select 2?
     
  3. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Would recommend using caching to achieve 1. if the video is going to be played multiple times, as then it will be stored on the device enabling local playback. It is also possible to play back the video while downloading if the network is strong enough. It really depends on your use-case though (the choice between 1. and 2.). Would recommend testing both in your environment.

    What do you mean by playback time? Do you mean playback rate? If so, these notes on optimal encoding could be useful to you.
     
  4. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi All, sorry about the cross-post, but I just wanted to announce a new RenderHeads plugin for Unity:
    External Game View

    It's a plugin for multi-monitor productivity and workflow improvement while using the Unity Editor and it's really changed the way we work. You can find out all about it here where you'll find documentation and a tutorial video.

    Thanks,
     
    seabits likes this.
  5. stefanob

    stefanob

    Joined:
    Nov 26, 2012
    Posts:
    67
    Hello,

    I just purchased avpro core and I need to play several videos from a mapped network folder over wifi on Windows. It's one main video and a few preview videos. When I click on a preview video, the main video shows the content.

    Due to network speed I cannot play all the preview videos at the same time. So I want to seek to a certain position and then pause the video and stop preloading. Is that possible?

    And I ran into a problem: in case the network connection is lost I want to show a message. But when that happens the Editor and also the build just freezes till the connection comes back. Any idea?
     
  6. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi Stefanob.
    Re: pausing. That might help, its certainly worth a try.
    Re: connection loss. Yes, we are looking into this at the moment.
     
  7. vampir26

    vampir26

    Joined:
    Mar 29, 2010
    Posts:
    108
    Hi

    Great plugin so far.

    Unfortunately, I couldn't figure out, how I can change brightness and contrast.

    I tried this, but it's not working:

    Code (CSharp):
    1.  
    2. public void IncreaseBrightness(float amount)
    3. {
    4.         //amount = slider value
    5.         mediaPlayer.UseVideoResolve = true;
    6.         float brightness = mediaPlayer.VideoResolveOptions.brightness;
    7.         brightness += amount;
    8.         var vro = mediaPlayer.VideoResolveOptions;
    9.         vro.brightness = brightness;
    10.         mediaPlayer.VideoResolveOptions = vro;
    11. }
    12.  
    Please give me a hint :)
     
  8. dawnr23

    dawnr23

    Joined:
    Dec 5, 2016
    Posts:
    41
    Hello, I bought the Core Edition.

    I have a question about a memory issue in the Android environment.

    1. OS: Android
    2. MediaPlayer Settings: Demo_360Stereo Scene
    3. VideoClip : 1GB Size, Bitrate 20Mbps, Length 6Min

    [button listener]: mediaPlayer.OpenMedia()
    If you click the play button above 4 times or more, a memory issue occurs and the app closes.

    [Error log]: Error Unity AndroidJavaException: java.lang.OutOfMemoryError: Failed to allocate a 88 byte allocation with 73376 free bytes and 71KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.

    *VideoClip is in path to StreamingAsset.

    Is there a way to improve it so that the memory issue does not occur?
     
  9. dawnr23

    dawnr23

    Joined:
    Dec 5, 2016
    Posts:
    41
    I have an additional question.

    When playing video (MP4 Size 1GB) using AVPro in Android environment

    Is 1 GB allocated to the RAM (memory) of the mobile phone device?
     
  10. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi Vampi26

    I'm glad that you are enjoying the plugin so far.
    That is a feature that we are working on, but its not currently possible until the work has been completed. We did have a quick fiddle about to see if there was a temporary workaround that you could use, but to no avail I'm afraid. Just keep an eye on upcoming versions.

    Kind regards,
    Chris
     

    Attached Files:

    vampir26 likes this.
  11. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi Dawnr23,

    Could you check to see if the MOOV atom is at the start of your video please? It is often defaulted to being at the end, which would cause the whole video file to open before playback commences. This and possibly the GC not kicking in quickly enough between open video calls to free off the memory used.
    You can check where the atoms are in the MP4 file by using something like AtomicParsley in Windows (http://atomicparsley.sourceforge.net/).
    To put the MOOV atom at the start of the video file you can use the flag "-movflags faststart" in ffmpeg.

    If this doesn't help, then you should look into a streaming format for you 1GB video.

    Kind regards,
    Chris
     
  12. dawnr23

    dawnr23

    Joined:
    Dec 5, 2016
    Posts:
    41
    Sorry but I'm not sure what that means.

    I solved it.

    There was a problem when playing 3 videos over 1GB in size at the same time.

    Currently only 2 are playing.

    Memory issue appears when calling 3 or more.

    I had to go through OpenMedia() and call CloseMedia().

    When playing a 1GB video at the same time in the Android environment, how many is recommended to play at the same time?
     
    Last edited: May 3, 2022
  13. AndrewRH

    AndrewRH

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

    AVPro Video version 2.5.0 has just been released!

    Changes include:

    General
    • Improvements
    • Fixes
      • Fixed bug where PlaylistMediaPlayer first item would always have audio volume of zero
      • Added #if ENABLE_LEGACY_INPUT_MANAGER to fix compile issues when the user has another input system
    Windows
    • Improvements
      • #865 Added ability in DirectShow to force usage of GDCL-MPEG4 splitter for MP4 playback. This is useful when using OpenMediaFromBuffer() as 3rd party splitters can cause problems (eg in StarCodec64) opening MP4 files into a buffer
      • Enabled full debug symbols on builds so that release callstacks are easier to debug
    • Fixes
      • Hap/Notch frame dropping no longer happens when playback rate is zero, fixing issues where seeking doesn't generate a frame
      • Fixed null pointer exceptions on SteamDeck game hardware due to non implemented Media Foundation API methods
    Android
    • Improvements
      • ExoPlayer API path now supports RTSP stream playback
    • Changes
      • Upgraded ExoPlayer from 2.16.1 to 2.17.1
      • Guava library updated to v31.1 and pre-build step added to offer delete of old guava library file if found
    • Fixes
      • #1162 User-Agent passed into headers is respected now
      • #1166 Fixed bug where videos would not play after a previous video is opened-and-not-played
    macOS
    • Fixes
      • #1167 Fixed crash on Intel based Macs when building with Xcode 13.3

    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,
     
    vampir26 likes this.
  14. Fatamos

    Fatamos

    Joined:
    May 27, 2020
    Posts:
    12
    I run into a weird bug. To use subtitles you have to browse the SRT file. That works perfectly but, to use multiple srt files and load them dynamically I had to tweak the code a little bit... My scene controller LoadSubtitles() method:

    Code (CSharp):
    1.  _mediaPlayer.SubtitlePath = new MediaPath(srtFilePath, MediaPathType.AbsolutePathOrURL);
    2. _mediaPlayer.EnableSubtitles(_mediaPlayer.SubtitlePath);
    srtFilePath stores subtitle path. It's weird that I had to disable SideloadSubtitles in MediaPlayer inspector and yet again call EnableSubtitles method in code... Is there any better way of doing this?
     
  15. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for reporting this. I'm not sure I actually understand what the issue is.

    Can't you just use this code to load new subtitles?

    Code (CSharp):
    1. _mediaPlayer.EnableSubtitles(new MediaPath(srtFilePath1, MediaPathType.AbsolutePathOrURL);
    and then call it again to load a different subtitle?

    Code (CSharp):
    1. _mediaPlayer.EnableSubtitles(new MediaPath(srtFilePath2, MediaPathType.AbsolutePathOrURL);
    Thanks,
     
  16. Fatamos

    Fatamos

    Joined:
    May 27, 2020
    Posts:
    12
    Yeah, that would work if I already predefined subtitle paths, but I kind of "generate" them, in other words, I pull them dynamically from custom CMS. So the srtFilePath is changing each time I call a different event. I'm fine with the method I used, I was just confused I had to tweak around so much and wanted to check if there is a better way of doing it :) Anyways, thank you!
     
  17. AndrewRH

    AndrewRH

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

    AVPro Video version 2.5.1 has just been released!

    Changes include:

    General
    Windows
    • Improvements
      • Better video loading performance using Media Foundation. The main thread is no longer blocked after loading begins by the calls to set state (volume, balance, playback rate etc)
    Android
    • Improvements
      • #1179 Playback of a partially cached video (in the QUEUED state) is now attempted when there is no network connection
    • Changes
      • Moved HasMetaData to inside the plugin so event ordering matches other platforms
      • DRM provider structure changes
    • Fixes
      • #1178 Altered method used to set Video/Audio/Subtitle tracks
    macOS / iOS / tvOS
    • Fixes
      • Rebuilt plugins with Xcode 13.2 in order to resolve build issues when using Unity Cloud Build

    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,
     
  18. daniel5johansson

    daniel5johansson

    Joined:
    Jun 21, 2018
    Posts:
    7
    Hi!

    I think there's a bug in "all" the AVPro players (I've tried Core v2.5.1 and some v1.x version)

    I can't seem to ever reach the very last frame of a video (in my case a 60 fps H.264 .mp4 video). It seems to completely skip the last frame when playing a video.

    When I run the video, I get a MediaPlayerEvent.EventType.FinishedPlaying when on the second to last frame, and the last frame is never showed.

    If I pause the video, and drag the slider in the Media Player component, I still cannot reach the last frame.
    I also tried seeking to the last timestamp but it won't.

    (Also I'm missing the Save PNG option in Core, to be able to color match my video perfectly with my live sprite buttons that you can click to start the video. My app contains three buttons, and when a button is pressed, the video starts animating that button. I want to cut the buttons out of the first/last frames of the video to get the exact same color on my sprites. Is there any other way to get a PNG?)
     
    Last edited: May 25, 2022
  19. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi Daniel,
    Which platform(s) are you finding this?
    Is it just one particular video file or several?
     
  20. daniel5johansson

    daniel5johansson

    Joined:
    Jun 21, 2018
    Posts:
    7
    Thanks for replying! Now that the delivery is actually done I had slightly more time to look into the problem. I was actually doing a mediaplayer.Stop() in the MediaPlayerEvent.EventType.FinishedPlaying callback, which apparently stops the video on an earlier frame. I definitely don't need to do that, and the video now plays through fully to the last frame. Sorry about that.


    As for grabbing a PNG of the last frame, that is still very difficult:
    I have to play the video to its end, then wait around 10 Unity updates (5 is too little), and then do SaveFrameToPng(). Otherwise I will not get the very last frame, but another one that is slightly earlier.

    I tried simply doing:
    Code (CSharp):
    1. mediaPlayer.ExtractFrame(null, mediaPlayer.Info.GetDuration(), true);
    before playing the video, but then I didn't get any frame at all.

    I did the same as above but in the middle of the playing video, but then I didn't get the very last frame, but something close.

    The only way is to play the video, and then wait ~10 of updates, then do SaveFrameToPng or ExtractFrame()

    I'm using "Media Foundation" API, on Windows 10, playing a 3840x2160 60fps h.264 .mp4 video.
    If I switch to "DirectShow API" I can do SaveToPng immediately on FinishedPlaying.
    (ExtractFrame before the video, or in the middle of the video still doesn't get the last frame)

    Is there any downside to using DirectShow? Is there any way to get the last frame before the video starts playing, to avoid a jank later?
     
  21. pleribus77

    pleribus77

    Joined:
    Jul 9, 2013
    Posts:
    36
    Quick question for the AVPro team.

    We're prototyping an interactive experience and was curious if we could use HDR10 video as a skybox source.

    We've tested a static EXR/HDR Image vs a HDR10 video, but have noted the HDR10 appears to come in and playback in SDR.

    Does AVPro support HDR video, and if so, can we extend the ApplyToMaterial to include the texture format necessary to display the full range of RGB values for HDR10?

    HDR10 Video as Skybox (via ApplyToMaterial) alongside VLC playing same video.
    HDR10Video.jpg

    Static EXR/HDR Image as Skybox alongside VLC playing HDR10 Video
    EXR.jpg
     
  22. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    savepng.png

    Hi, there is an option if you click on debug mode at the bottom of Global Settings, it will bring up this near the top.
     
    Last edited: May 30, 2022
  23. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi @pleribus77 ,
    We don't currently support HDR10, but 10-bit video is supported in the Ultra Edition. If you are using the Core Edition, then it is rendered to 8-bit. https://www.renderheads.com/content/docs/AVProVideo/articles/feature-10bit.html
    I hope that helps.
    Kind regards,
    Chris
     
  24. pleribus77

    pleribus77

    Joined:
    Jul 9, 2013
    Posts:
    36
    Thanks Chris.

    I see HDR support listed as Near Future in your milestones. Shout out if you'd like beta testers or if you have a version that supports the necessary RenderTextureFormat's :).

    Our project delivers in 6 weeks, so we'll look at alternative design / experience considerations, as I don't see HDR video support in any alternatives either - HDR video support would be very much appreciated in the Event / Installation space.
     
    AndrewRH and Chris-RH like this.
  25. Serhii-Horun

    Serhii-Horun

    Joined:
    Apr 12, 2015
    Posts:
    151
    Hi AVPro team!

    Currently we are working on streaming optimisation and one thing we found and not sure why it happens. We captured the network session(via Fiddler) and looks like for video streaming (m3u8) AVPro does such requests:
    1. Loads main video.m3u8
    2. Then loads both video_SD.m3u8 and video_HD.m3u8(we prepared for low and high quality video; but we expect it should load only 1 based on network).
    3. Then it does the request for video_HD_00001.ts
    4. Then it loads the same video_HD_00001.ts again.
    5. Then it loads next parts video_HD_0000X.ts (for some parts it sends only 1 request, for other it duplicates the requests). Worth to mention the server answers for duplicated requests are the same
    6. And during next video loop it seems to download everything except m3u8 again. And on the third loop it does NOT do it again.
    We would like to understand why AVPro loads both files on step 2; why it loads ts files in 1-2 requests; and why it repeats requests during second loop, but not the third one.

    Few more questions: is there any chance to cache files during playing? If we understand correctly cache media happens in separated requests(looks like 2x network traffic, right)?

    From the captured session seems AVPro does not have a connection pool and opens new connections quite often. Is it true?
    Platforms: UnityEditor(MacOs), iOS, Android

    Perhaps you can guide as with some best practices regarding video streaming(we are working on the app with a feed similar to the Tik Tok's one). Thanks!
     
    Last edited: Jun 6, 2022
  26. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi,

    I'm afraid I don't have the answers you are looking for. AVPro Video is a fairly high level video player, which means we rely on the operating system to handle a lot of the heavy lifting. I'm not sure which platforms your network observations are for, but I'm pretty sure that all of that is handled outside of AVPro Video by the operating system media implementation. It's certainly interesting behaviour but not something we have control over without reimplementing all of this.

    The implementation is probably just downloading all of the m3u8 initially as these are usually fairly small text files and it would need to grab them anyway when it switches quality. At first it doesn't know how much network bandwidth is available. On some of the platforms in AVPro Video you can force it to start with the highest bandwidth stream available (eg on Windows using the WinRT API).

    I guess if you really need a highly network optimised solution then you may need to implement something yourselves as this is not the focus of AVPro Video which is more of a general video playback solution.

    If you have more questions then I recommend posting them to our GitHub as this is where the main developers and tech support team monitors issues.

    Thanks,
     
    Serhii-Horun likes this.
  27. AndrewRH

    AndrewRH

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

    AVPro Video version 2.5.2 has just been released!

    Changes include:

    General
    • Improvements
      • New component ResolveToRenderTexture added. This component renders the video to a RenderTexture, allows colour adustments (hue, saturation, brightness, gamma, tint) and has some resolve options such as unpacking alpha, stereo eye selection, mip-generation
    • Fixes
      • Documentation fixes
    Windows
    • Improvements
      • Performance improvement in Media Foundation API for media loading. The main thread should block less now during loading
    • Fixes
      • #1195 Fixed issue with Unity 2022.x where using D3D12 would cause a crash due to stricter external texture format enforcement
      • #1122 Fixed issue where some HLS streaming media without a frame-rate reported would not fire the FinishedPlaying event again after firing it the first time
      • Some D3D11/12 state fixes
    Android
    • Improvements
      • #1097 Added new shader for DisplayGUI component which supports transparency when using OES mode
    • Fixes
      • Improved stereo eye selection when rendering to address issues seen on certain Pico VR devices. Related updates to notes on UpdateMultipassStereo component
      • #1114 Multiview VR rendering now working when OES rendering mode is being used
    macOS / iOS / tvOS
    • Fixes
      • #1186 Fixed issue with a video texture being applied incorrectly after a media player instance has been closed
    macOS
    • Improvements
      • Removed LGPL licensed code dependency from HapInAVFoundation
    • Fixes
      • Fixed watermarking of HapA, HapQ and HapQ+A videos formats in the trial version
    WebGL
    • Improvements
      • Added code to detect if playing in Safari or on iOS to prevent hls.js being used if selected as an external library
    • Fixes
      • #1186 Fixed issue with video playback not starting on iOS

    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,
     
  28. LivingBrain-Till

    LivingBrain-Till

    Joined:
    Jul 12, 2019
    Posts:
    12
    Hi,

    i'm really struggling to get OES Path running on Oculus Quest.
    I've enabled the setting in the media player and applied the InsideSphere Unlit OES Only Shader to the Material. Im using ApplyToMesh. The video does start, but the sphere is rendered below me, like im standing on top of the sphere. Moving the actual sphere has no effect. The mesh used for the octahedron sphere is the one from the demo scene.
    I assume that the shader is not applied correctly or i missed a setting somewhere.

    I'm using Unity 2021.3.0f1, AVPRO 2.5.2, Open GLES 3. Issue is the same in multiview and multipass.

    Also im getting the warning that multiview rendering is not supported and i should change it in the settings. Also i get a somewhat duplicated screen if i do build in multiview.

    Maybe you can give me a hint here, thanks!
     
  29. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
  30. LivingBrain-Till

    LivingBrain-Till

    Joined:
    Jul 12, 2019
    Posts:
    12
    Copy, will do.
    Ooooh, I might have failed when installing the android core version, and not properly uninstalling the trial version. I'll check that out on an empty project first.
     
    Chris-RH likes this.
  31. zdzx

    zdzx

    Joined:
    Jan 4, 2021
    Posts:
    6
    Hello, my packaged software can't play video normally on windows7. It can play normally in editor mode. I use "absolute path or URL" mode. The video format is m3u8
     
  32. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi @zdzx ,
    It would be helpful to know which version of AVPro Video, Unity, DX etc you are using, and also which Video API you have selected.
    Are you using any other plugins in your app?
    Does it crash on loading the app or at the point of video playing or what?
    Do you have any logs?
    It might be helpful if you put the issue on our github (https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues)
     
    zdzx likes this.
  33. AndrewRH

    AndrewRH

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

    AVPro Video version 2.5.3 has just been released!

    Changes include:

    General
    • Improvements
      • PlaylistMediaPlayer inspector UI improved and per-item name field added
      • Documentation updated: 10bit
      • Documentation updated: Caching
      • Documentation updated: VR Headsets Supported
    • Fixes
      • #1075 Fixed various issues related to in-editor global audio mute state not being applied
      • #1038 Fixed disabling ApplyToMesh component not removing video texture from mesh
      • Fixed PlaylistMediaPlayer issue when unpausing where it would replay a paused item that was meant to remain paused (due to transition starting)
    Windows
    • Fixes
      • Fixed regression (since 2.2.0) where video playback wouldn't update the texture in editor when not in play mode, now allowing previewing of video content to work as expected
    Android
    • Changes
      • Upgraded ExoPlayer from 2.17.1 to 2.18.0
    macOS / iOS / tvOS
    • Fixes
      • #1207 Fixed issue with FirstFrameReady event not being triggered due to delayed start of video track causing no frames to be generated

    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,
     
  34. DeJMan

    DeJMan

    Joined:
    Nov 26, 2013
    Posts:
    5
    Hello.

    We have upgraded to the newer AVPro version (from 1.x to Core) and have an issue.

    The documentation for "ApplyToMaterial" suggests using the shaders that you have provided. This works however, in HDRP, I would like to apply it to a emissive map and illuminate the room based on it. This works when using a default HDRP Unlit shader however, all the 'under the hood' adjustments the AVPro shader does is not available (gamma correction, flipping etc.)

    Would you have a emission shader available for HDRP ? Or a guide on how to make one in shadergraph?

    Thanks.
     
  35. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi @DeJMan,
    We don't have one available at the moment. You could try using the new ResolveToRenderTexture component, setting the RenderTexture to the emission slot on the standard HDRP shader? That would be the easiest method.
     
    Last edited: Jun 24, 2022
    DeJMan likes this.
  36. zdzx

    zdzx

    Joined:
    Jan 4, 2021
    Posts:
    6
    Hi
    The unity version I use is 2018.3.0f2. Avpro video is 1.11.1 can be used normally in the editor mode. It is packaged as The video screen is white when exe is used. It is normal when windows64 is used and invalid when windows32 is used. Because it's packed Exe, so there is no relevant log
     
  37. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi @zdzx

    I'm presuming you are using 64-bit Windows 7? Am I right in saying that the application works when it is built as a 64-bit app, but doesn't when its built as a 32-bit app? While some 32-bit apps can run on 64-bit Windows, not all of them will. Have you made sure that you have enabled 32-bit apps in your windows settings?
     
  38. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Hi, I'm an AVPro Ultra edition user and I'm experiencing a systematic audio latency (a delay indeed) in my current Windows project. That happens both streaming videos from Vimeo or downloading and playing them from the local disk, in both cases with the "Absolute Path or URL" option. The latency is small indeed but quite evident and annoying.

    The same project built in WebGL shows no delay at all, and everything works fine.

    Unity version is 2021.3.0f1 and AVPro version is the latest 2.5.3. The Media Player settings, both general and Windows specific, are 100% default.

    Any ideas?
     
  39. Chris-RH

    Chris-RH

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

    Hi, thanks for you message, I've just got a few questions.
    1. What are the specs of the video?
    2. Is it one specific video or all videos from vimeo?
    3. Have you followed this suggested setup? https://github.com/vimeo/vimeo-unity-sdk#streaming-with-avpro-video-and-vimeo
    4. Is this just with videos that are on vimeo and/or have been downloaded from vimeo? How are other video files that are currently on your PC (that have never been on vimeo)?
    5. By "default settings", can I assume you have tried playing them using the media player demo scene?
    Kind regards,
    Chris
     
    RiccardoAxed likes this.
  40. kancsa

    kancsa

    Joined:
    Feb 2, 2022
    Posts:
    9
    Hi,
    For my VR application I'm updating stereoPacking and VideoLayoutMapping via scripting.
    Setting those on start works, but not while playing. Is it possible to update those on runtime, or should I just update the material keyboards on the sphere directly?
    I'm using a similar setup to the Stereo360 demo scene.
    Thanks!
     
  41. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    On the ApplyToMesh component, call ForceUpdate() that should update the material keywords automatically.

    If you're still having trouble with this, please open a ticket on our Github Issues.

    Thanks,
     
  42. AndrewRH

    AndrewRH

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

    AVPro Video version 2.5.4 has just been released!

    Changes include:

    Android
    • Changes
      • ResolveToRenderTexture now supports Android OES textures
      • #1220 Headers passed into AddMediaToCache() now passed into the download manager - note internally to the plug-in headers are set globally for downloads and cannot be done 'per download' currently
    macOS / iOS / tvOS
    • Fixes
      • #1223 Fixed issue with duration being incorrect when max playback rate has been modified

    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,
     
  43. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Hi Chris,

    The videos are mp4 h264 uploaded on Vimeo and the delay - the opposite of what I said indeed, that is the audio slightly preceding video - occurs both streaming from Vimeo and loading them locally from PC (both cases with the standard Media Player and "Media Source" set to "Path/Absolute Path Or URL", so no specific Vimeo Player involved). The local videos are downloaded by the app from Vimeo indeed. As I said, both cases works fine in WebGL.

    The issue also occurs in some of your demo scenes. Anyway, just playing with the demos I eventually found a "magic" solution, that is switching the Media Player Windows setting "Audio Output" from the default "System Direct" option to "Unity", and of course adding an Audio Output component, together with an Audio Source to the object carrying the Media Player. That way everything works fine, both streaming from Vimeo and loading videos from disk, with no delays at all.
     
    Chris-RH likes this.
  44. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi @RiccardoAxed
    I'm glad to hear that you got it sorted. Thanks for letting me know :)
    Kind regards,
    Chris
     
  45. salvolannister

    salvolannister

    Joined:
    Jan 3, 2019
    Posts:
    50
    Hi everyone,
    I have a very good connection and I would like to see the video with high resolution from the beginning, is it possible to set the bitrate to a high-level also at the beginning?
     
  46. MarvellousLunatic

    MarvellousLunatic

    Joined:
    May 1, 2020
    Posts:
    11
    Greetings,

    the default unity video player doesn't handle looping webm video files with audio very well when you dynamically change the playback-speed. Therefore I'm evaluating other unity video players. This asset promised to be the best choice even seeing the price for the core edition.

    However, my first test was a short webm loop with audio and I immediately noticed a short break between loops. After a quick search I read I should remove the audio and play it separately. How can I ensure the synchronization between the audio source and the looping video clip when dynamically changing the playback-speed?
    Will there be a fix for this anytime soon, without the need of splitting audio and video?

    Kind regards.
     
  47. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi @salvolannister,
    This is an enhancement that we are looking into. It may not be equally possible on all platforms, but we will see what can be done. Out of interest, which platform(s) specifically are you wanting this for?

    Kind regards,
    Chris
     
  48. salvolannister

    salvolannister

    Joined:
    Jan 3, 2019
    Posts:
    50
    Hi @Chris-RH, thank you for the reply.
    I'd like to use it for android in order to display the video on the Meta Quest 2. Is still there a way to reduce the change of the bit-rate to low quality to a high-quality in a shorter time?
     
  49. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi @MarvellousLunatic,

    Have you tried re-encoding using VP9?
    What is it like when just looping at a static speed?
    Are the audio and video the same length?
    What range of playback speeds are you wanting to use and what rate are you wanting to change them?
    How are your videos encoded?

    Kind regards,
    Chris
     
  50. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    218
    Hi @salvolannister,

    There isn't a way at the moment, unless you were to change your HLS manifest; having each stream on its own as well as the adaptive version.

    In terms of future implementation. It is likely that this feature would only be fully available on Android if implemented. Windows might be possible in a limited form, and apple platforms are a 'maybe'.

    Kind regards,
    Chris
     
    salvolannister likes this.