Search Unity

[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:
    222
    Hi @xy849288321

    Have you got the HEVC codec pack for Windows 10? It doesn't come included anymore, you have to purchase it from the Microsoft Store.
    We are sadly limited by native support on the Windows platform. We currently have no plans to change our media support at the moment.

    Kind regards,
    Chris
     
  2. mchangxe

    mchangxe

    Joined:
    Jun 16, 2019
    Posts:
    69
    Hi Chris, i having trouble play hap q alpha/hap alpha videos on windows via either direct show or media foundation. My video is originally in webm format with vp8 transparency and I convert them to hap q alpha via media encoder with the correct present. But in unity, I see my video with a black backdrop, even when i set media hint fallback from opaque to transparency. I think the documentation is lacking here. any ideas?
     
  3. MMeyers23

    MMeyers23

    Joined:
    Dec 29, 2019
    Posts:
    101
    Problem description:
    Hi, I have avpro trial implemented in my project just how I want it, but I want to get rid of splash screns by upgrading to core. How can I upgrade without any changes to my settings in my project? Thanks.
    Device (which devices are you having the issue with - model, OS version number):
    Windows 10
    Media (tell us about your videos - number of videos, resolution, codec, frame-rate, example URLs):
    System Information:
    AVPro Video: plugin v1.11.1t scripts v1.11.1
    Target Platform: Standalone
    Unity: v2021.2.14f1 WindowsEditor
    OS: Desktop - System Product Name (System manufacturer) - Windows 10 (10.0.19043) 64bit - English
    CPU: AMD Ryzen 9 3900X 12-Core Processor - 24 threads - 49060KB
    GPU: NVIDIA GeForce RTX 3090 - NVIDIA - Direct3D 11.0 [level 11.1] - 24348KB - 16384
     
  4. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
    Hi @mchangxe,

    Is this in the editor? Are you getting any error messages? Could you send a copy of the file to unitysupport@renderheads.com please?

    Kind regards,
    Chris
     
  5. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
    Hi @MMeyers23,

    Let me get this right, are you using the trial of AVPro Version 1? Version 1 was depreciated in early 2021 and is no longer available to purchase.

    Trial versions of Version 2 are available (https://github.com/RenderHeads/UnityPlugin-AVProVideo/releases)

    It is possible to upgrade a project from version 1 to version 2, but there are a lot of differences. More info here: (https://www.renderheads.com/content/docs/AVProVideo/articles/upgrading-from-avpro-video-1x.html)

    Kind regards,
    Chris
     
  6. avclubvids

    avclubvids

    Joined:
    Jan 6, 2015
    Posts:
    27
    @Chris-RH I've just downloaded a fresh version of AVPro Core into a new Unity project and I keep getting this error:

    Code (CSharp):
    1. [AVProVideo] Plugin version number 2.5.4-core build 1282 doesn't match the expected version number 2.6.1.  It looks like the plugin didn't upgrade correctly.  To resolve this please restart Unity and try to upgrade the package again.
    I've tried forcing an update from the Package manager but this error persists, I'm not sure at this point if I'm actually getting v2.6.x from the Package manager or if it keeps pulling down 2.5.4. Is this just a phantom error or is it true that the Package manager is pushing older builds?
     
  7. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
    Hi @avclubvids,

    If you go to the Help section at the bottom of the media player component, it will tell you which version it is.

    I know that there had been issues with some versions of unity where the package manager was not always getting the correct versions. More info, with some workarounds:
    https://forum.unity.com/threads/package-manager-not-showing-latest-version-from-asset-store.791718/

    Kind regards,
    Chris
     
  8. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    It looks like you are definitely not getting the latest pulled down. Maybe some odd caching issue somewhere. Are you still seeing the issue a day on?
     
  9. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
    Hi @avclubvids

    Were you able to sort out the correct version?

    Kind regards,
    Chris
     
  10. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    AVPro Video version 2.6.2 has just been released!

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Changes include:

    macOS / iOS / tvOS
    • Improvements
      • Added support for getting track title from "org.mp4ra" metadata when the common metadata lookup fails
    • Fixes
      • Fixed crash caused by enabling looping on a player that was created with looping disabled and "Use single player item" is not enabled
    Android
    • Fixes
      • #1283 Regression issue fixed due to previous fix for issue #1278
    Windows
    • Known Issues
      • HAP playback of videos with a width greater than 8192 might currently fail. We hope to fix this in the next update. Advise using v2.5.7 until then. Contact us if you do not have this version available to you

    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
     
    Last edited: Sep 26, 2022
  11. mevlme44

    mevlme44

    Joined:
    Jun 24, 2019
    Posts:
    1
    Hello, I am facing some problem using AVPro. I have a server that streams video using HLS. The server supports range requests, but often when trying to play a video, either empty or incorrect range requests are received. Please tell me where I went wrong.
     
  12. dawnr23

    dawnr23

    Joined:
    Dec 5, 2016
    Posts:
    41
    Hi.
    I often use AVPro Video - Core Edition.
    But there's a problem.
    In iOS, the URL path video is played until the end without any problems
    But on Android, long videos are not played until the end, but the app itself stops and crashes.
    I don’t' know the reason.
    From Platform Specific - android
    Video API : Exo Player
    Preferred Maximum Resolution: 1080p
    Preferred Peak Bitrate: 1Kbps
    Minimum Buffer Ms: 50000
    Maximum Buffer Ms: 50000
    Buffer For Playback Ms: 2500
    Buffer For Playback After Rebuffer Ms: 5000
    Use Unity Version: 2018.4.36f1
    and AVPro version: 2.3.1(plugin v2.3.0f1-core)
     
  13. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
  14. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
  15. rosssssss

    rosssssss

    Joined:
    Jan 27, 2017
    Posts:
    70
    Hello - when using adaptive playback - we'd like to display which of the available streams is currently being played -
    so in the ResolutionChanged event I'm able to look at the MediaPlayer info and get the width and height of the new texture and I can compare this to the list of streams I've gathered from the HLSStreamParser. So far, so good - but in some instances our streams only differ in their bitrate - and I can't seem to retrieve the bitrate/bandwidth information from the MediaPlayer Info struct. Is there any way I can get hold of this so I know which stream is playing? Thanks!
    (it's this bandwidth value from the manifest i'm referring to btw: #EXT-X-STREAM-INF:BANDWIDTH=46491170,)
     
    Last edited: Sep 20, 2022
  16. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    Maybe you could poke something like:

    _mediaPlayer.VideoTracks.GetActiveVideoTrack().Bitrate

    ...or more widely:

    _mediaPlayer.VideoTracks.GetVideoTracks()

    (see Tracks.cs)

    The same exists for Audio and Text tracks.
     
  17. rosssssss

    rosssssss

    Joined:
    Jan 27, 2017
    Posts:
    70
    Thanks for the info however this doesn't seem to work for me. At both the ResolutionChanged event and FirstFrameReady - the bitrate value is 0. if I get the VideoTracks object - I see one track but even if I directly get the Bitrate from that with Player.VideoTracks.GetVideoTracks()[0].Bitrate - it's still 0. So it seems like that value is not being set.
    I can see in Tracks.cs that it is described as optional and doesn't seem to be referenced anywhere in the codebase:
    Code (CSharp):
    1. // Optional
    2.         public int Bitrate { get; private set; }
    Any idea how we could get that to be set? Thanks
     
  18. Morg0t

    Morg0t

    Joined:
    Aug 6, 2020
    Posts:
    2
    Hello, I was curious about how AVPro deals with videos "rotation" metadata. I was recently working with default Unity Video Player & Native Gallery by yasirkula and surely it gets videos from native gallery with rotation info being at 0/90/180/270 and video recorded in landscape mode. While trying to switch to AVPro I've run into some troubles but I've found out that your plugin successfully handles such rotations and displays video correctly. So I was wondering, maybe you could guide me to a function that handles these rotations, to move it into mine project without actually switching to AVPro player. Surely, it might be even more challenging than figuring out how to change video player, but I am ready to give it a try
     
  19. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    Rotation is handled on each platform at plug-in code level, and as such not exposed.
     
    Morg0t likes this.
  20. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    Hmm, you are right. It appears there might be a hole in the implementation. That said, the interface does not lend itself to a sensible value for adaptive track sets - by which I mean a bitrate would only make sense if the video stream was actually playing and a specific track in the stream was therefore considered 'active'.

    We will have a think/look to see if an implementation makes sense.
     
  21. Kiran554

    Kiran554

    Joined:
    Nov 22, 2021
    Posts:
    2
    Hi Renderheads Support team,

    We use AVPro Video player to play videos in our Unity app based on WebGL. Our Videos used to work fine when seeking the video until like June 2022, but since then we are seeing issues when we seek videos in our application. The video seek works until like 2 seconds (frames move as expected) for video and beyond 2nd seconds despite moving the seek bar the frame is **struck at 2nd second** and frame some times move at around 15th or 20th second (Of course only when the video is longer than 15 seconds, which is not usual in our applications). Interestingly it ONLY happens in browser, but works absolutely fine in Unity editor (making life hard to debug lol).

    Any idea why we are seeing issues with seek bar since June (despite not making any changes to our code for quite a while). Could this be due to video source having less frames or some form of video encoding could cause this behaviour. Can a browser update also could cause this behaviour?

    Below are some of the environment info:

    Code that seeks the video:
    Code (CSharp):
    1. timeMs = mediaPlayer.Info.GetDurationMs()* VideoSlider.value // We use slider to determine the position of seek bar
    2. mediaPlayer.Control.Seek(timeMs);
    3. // Note: We pause the video when customer is actively seeking the video
    [/code]



    Platform: MacOS/ Windows

    AVPro Video Player Version: 1.11.4

    Unity Version: 2019.4.29f1

    --- Thanks in advance
     
    Last edited: Sep 22, 2022
  22. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
    Hi @Kiran554,

    AVPro Video version 1.x was depreciated with the last version being 1.11.7 in November 2020. We don't officially support WebGL.
    Have you changed the way in which your videos are encoded?
    Its most likely caused by the browser updating, if that is the only thing that is causing it not to work. There is very little that can be done at this point as we are no longer making updates to the version 1 assets.
     
  23. Kiran554

    Kiran554

    Joined:
    Nov 22, 2021
    Posts:
    2
    Thanks for prompt response.
    Is their a possibility of change in video encoding or video frame rate could cause this behaviour from your experience?
     
  24. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
  25. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    In addition @Kiran554. Maybe you could test playback in v2.x of AVPro Video? You can grab the trial version here.
     
  26. Ste-RH

    Ste-RH

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

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Changes include:

    Android
    • Improvements
      • #1283 Regression issue fixed due to previous fix for issue #1278
        NOTE: ExoPlayer API path now supports RTMP playback
      • Note: There are known issues around address resolution
      • #1293 Added pause/resume functionality to Download/Cache (Android only)
    • Fixes
      • #1289 Fixed 'Resolve To RenderTexture' for none-OES playback
    Windows
    • Fixes
      • #1265 Fix for first frame of video not being correctly shown sometimes
      • #1286 Fix for D3D12 texture crash with Unity 2022
      • #1297 Fix for some videos greater than 8K in resolution causing errors

    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
     
  27. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    how to release memory after playing video. i am try with CloseVideo but memory not releasing. also i am pick video from storage and playing then repick another video and playing etc. every time increase memory not clearing if you have any solution then let me know
    thank you
     
  28. rosssssss

    rosssssss

    Joined:
    Jan 27, 2017
    Posts:
    70
    I'm not 100% sure I follow you. I think in the case that I'm getting the FirstFrameReady event a stream has been selected and is just starting - as shown by the resolution which i can get accurately from MediaPlayer.Info.GetVideoHeight() so could be considered 'active' couldn't it? Or do you mean that the bitrate would need to be calculated once it had been playign for a little while?

    The bandwidth/bitrate value that I really need is just the value that is in the manifest. This is so that in the case where there are multiple streams with identical resolution - I can identify which of the streams is playing by its bitrate in order to show in the UI which stream the ABR has selected.

    However having just said that i'm now wondering if some other identifier is available like the index into the ABR manifest?
    Or if there's some other way to identify it?
    Thanks!
     
  29. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
    Hi @Riken_rds,

    Which platform are using using?

    Kind regards,
    Chris
     
  30. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    android and ios
     
  31. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
    Hi @Riken_rds

    Call force dispose on the mediaplayer object:

    mediaPlayer.ForceDispose();
    mediaPlayer = null;

    ...and then call for some garbage collection

    GC.WaitForPendingFinalizers()
    System.GC.Collect();

    Garbage Collection can be quite expensive and is not really recommended though. More info here: https://stackoverflow.com/questions/4257372/how-to-force-garbage-collector-to-run

    Does that help?

    Kind regards,
    Chris
     
    AndrewRH likes this.
  32. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    No, for what you require I think you are correct. You want the 'currently playing video stream in an the currently active adaptive video track'. AVPro Video is not giving you this correctly as things stand.

    I was referring to the wider logic for getting the bitrate. For a playing video (as is your use case) it makes perfect sense. But for something not playing we need to thing about what value is returned - not that it makes much sense whatever we return!

    I have an implementation on Android that should make it into the next build. Not sure what platform(s) you are looking for this to be supported on...?
     
  33. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    not helping this solution
    i am try to use mediaPlayer.ForceDispose(); but not releasing memory and getting null reference exception please check attachment screenshot.
    also we can't use System.GC.Collect(); because it's very expensive.
    if you know any other solution then let me know

    Thanks you for support
     

    Attached Files:

    • s10.PNG
      s10.PNG
      File size:
      35.5 KB
      Views:
      117
  34. Ste-RH

    Ste-RH

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

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Changes include:

    Android
    • Fixes
      • Better feedback of bitrate for video tracks
    macOS/iOS/tvOS
    • Fixes
      • #1305 Fixed issue 'currentDate' always returning 0 even though the media has a time mapping
      • #1311 Fixed issue with textures persisting in the texture cache after all player instances have been released
    iOS
    • Fixes
      • Fixed issue with player not being paused on iOS when the control centre overlay is showing


    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
     
  35. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    please give me answer ASAP of above my issue
     
  36. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    Please open a github issue and supply all the information asked for when opening the issue.
     
  37. rosssssss

    rosssssss

    Joined:
    Jan 27, 2017
    Posts:
    70
    Yes, Android! thanks
     
  38. rosssssss

    rosssssss

    Joined:
    Jan 27, 2017
    Posts:
    70
    Is it possible to play an adaptive (HLS) stream from local storage - on Android? I seem to be getting a Loading Failed:File not found, codec not supported, resolution ... etc error

    Ah, I see I think this was added to Android in AVPro 2.0.2 - any idea why i'd be getting these errors then - the Index.m3u8 is definitely in the right place.
     
    Last edited: Oct 4, 2022
  39. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    This is usually due to access or incorrect paths. Maybe try an mp4 in the same location to ensure it is not one of those?

    Failing that...If you email over your HLS then we will take a look.
     
  40. rosssssss

    rosssssss

    Joined:
    Jan 27, 2017
    Posts:
    70
    Thanks actually I think I have found the problem - it seems like having the subfeed m3u8 files anywhere other than in the same directory as the main manifest doesn't work. So if they are defined in the main manifest as E/index_1.m3u8 for example and they are in a sub directory E beneath the main manifest it fails.
    But if i move them into the same folder and adjust the main manifest then they work. (this doesn't apply to the chunks which can be elsewhere.)
    ---
    When the manifest is defined with subdirectories for the subfeeds it works with pot-player but not with AVPro - and the file structure also works fine when the m3u8s are streamed.
    (I'm working with m3u8s that i've downloaded so want to preserve the file structure if possible.)

    (I'm using AVPro 2.5.2 )

    does this make any sense?
     
    Last edited: Oct 5, 2022
  41. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    EDIT: For changing these settings in runtime, see: https://forum.unity.com/threads/uni...-set-single-pass-instanced-multiview.1044049/

    Hey, sorry for the question that has probably been ask a million time. I've been looking, i swear.

    Using an Oculus Quest 2 headset in Unity editor and my Windows settings are set to Single Pass Instanced but with this the video played through a Display UGUI component only renders in the left eye. The right eye doesn't detect the video.
    If I change this to Multipass it works as expected but I have an asset that requires Single Pass Instanced.

    Is there any way around this?

    Thank you in advance,
    Nathan
     
    Last edited: Oct 6, 2022
  42. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    I think there must be an issue with your HLS, because I have just tested an HLS playing back off device that has each adaptive video track embedded three folders deep.
     
  43. rosssssss

    rosssssss

    Joined:
    Jan 27, 2017
    Posts:
    70
    Hmm thanks for testing! - ok if I send you the HLS to try there?
     
  44. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
    Hi @rosssssss,
    Thanks for sending the email, we'll take a look at it and get back to you. In the meantime, I suggest updating to the latest version and seeing if you are still encountering the problem.
    Kind regards,
    Chris
     
    Last edited: Oct 6, 2022
  45. Chris-RH

    Chris-RH

    Joined:
    Apr 21, 2022
    Posts:
    222
    Hi @nathanjams,

    We are going to have a look at this and get back to you.

    Kind regards,
    Chris
     
  46. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    @rosssssss

    We have taken a look at your HLS. There is a problem in:

    \A\B\C\D\2a86f0e91454438aa508873cb515ee11\3181e50443a54472a853dec7fe578584\index_1.m3u8

    You need more ../ in your paths to the TS files. You need 5 in total, like this:

    upload_2022-10-6_11-6-40.png

    Your HLS stream plays back here just fine with that change.
     
  47. rosssssss

    rosssssss

    Joined:
    Jan 27, 2017
    Posts:
    70
    Ahhh.. thanks! and sorry - that was foolish of me... obviously i just put the chunks in the wrong place when i downloaded them - so moving the index_1 down two directories also fixed it... Odd that pot-player played it anyway - it must do some searching around - Anyway thanks for taking the time to look at that.
     
    Ste-RH likes this.
  48. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    Sorry, not entirely sure what your set-up is here, and what you are trying to achieve.

    On Oculus devices the only supported options these days are Multi Pass and Multiview. Are you trying to make single-pass work in the Windows Editor environment? If so, is everything as you expect it to be on the Oculus device (i.e. this is a Windows Editor issue not Android device)

    It would be best to report your issue on github here.
     
  49. rosssssss

    rosssssss

    Joined:
    Jan 27, 2017
    Posts:
    70
    Hello again.
    We are allowing users to select the different streams from within an HLS file - when they select a new resolution I'm calling MediaPlayer.OpenMedia with the new substream url. It is all working fine except that it briefly jumps back to the first frame of the playing video. It does this during the SeekFast I think which I call like this

    Code (CSharp):
    1. if (Player.OpenMedia(mediaPathType, vInfo.location, vInfo.autoPlay))
    2.         {
    3.             if (startFromSeconds > 0f) Player.Control.SeekFast(startFromSeconds);
    Is there anyway to avoid showing the first frame like that in that scenario? I don't think I can give OpenMedia a position to start from ? -
    any clues appreciated!
    Thanks
     
  50. Ste-RH

    Ste-RH

    Joined:
    May 17, 2019
    Posts:
    145
    That is just the way that the underlying API works. We have no real control over that. Best bet is usually to have a second MediaPlayer for your stream swap. Then swap the render when the new player is open and at the desired time. This also will afford you the ability to transition between the two.

    All that said, I think the MediaPlayer API path (as opposed to ExoPlayer) might not have that behaviour.

    EDIT: Having tested a bit more here we see that:

    Android (ExoPlayer) : Videos first frame rendered before seek finishes. There is a possibility to seek before the video is prepared which should give you the desired result. That said, there appears to be an extra load/stall that happens when you do this. We might look to implement this in some form.
    Android (MediaPlayer) : Already works as you desire.

    iOS/macOS/tvOS : Videos first frame rendered before seek happens.

    Windows (MediaFoundation) : Videos first frame rendered before seek finishes.
    Windows (WinRT) : Already works as you desire.
    Windows (DirectShow) : Already works as you desire.
     
    Last edited: Oct 13, 2022