Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

[Released] AVPro Video - complete video playback solution

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

  1. trojant

    trojant

    Joined:
    May 8, 2015
    Posts:
    65
    Hi,@AndrewRH
    Auto open is disabled, but the path still cannot be obtained. If I manually add an item of playlistmediaplayer in the inspector panel, mediaplayerA and mediaplayerB can get the path correctly.
    upload_2021-7-13_18-31-59.png
     
  2. Tubbritt

    Tubbritt

    Joined:
    Nov 30, 2015
    Posts:
    23
    Upgraded and feeling rather disappoint to see Playmaker support has been completely removed. Are there any plans to reintroduce these features to AVPro?

    Regards
    James.
     
  3. trojant

    trojant

    Joined:
    May 8, 2015
    Posts:
    65
    Hi,@AndrewRH
    After manually creating items by C #, which method should I call manually? Or what?
     
  4. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    421
    Your code looks correct. What's the problem? I'm not sure what you want to know..

    Thanks,
     
  5. trojant

    trojant

    Joined:
    May 8, 2015
    Posts:
    65
    These are the issues we discussed earlier:
    https://forum.unity.com/threads/rel...playback-solution.385611/page-93#post-7322635
    https://forum.unity.com/threads/rel...playback-solution.385611/page-93#post-7322953
    https://forum.unity.com/threads/rel...playback-solution.385611/page-94#post-7323070
    https://forum.unity.com/threads/rel...playback-solution.385611/page-94#post-7326235

    at run time,I instantiate the prefab of playlistmediaplayer, mediaplayerA, mediaplayer B and displayugui first, and then add the playlist items of playlistmediaplayer.

    for Media Player A and media player B,how can I get the data of playlist items again in playlistmediaplayer, because it may not get the data after adding the items.
     
    Last edited: Jul 15, 2021
  6. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Hi there,

    Our previous plugin contained Playmaker support because its implementation was provided to us by users who wanted it included. It's not something we use and so is difficult to maintain. If someone wanted to submit Playmaker actions then we could think about adding it, but we are unlikely to add it otherwise. Sorry about that.
     
  7. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    There isn't a way to control this - it's up to the operating system and varies across platforms.
     
  8. Tubbritt

    Tubbritt

    Joined:
    Nov 30, 2015
    Posts:
    23
    I appreciate the reply, but have you not considered how many people bought your Asset simply because it had playmaker support in the first place? That’s sales you profit from.

    Buy dropping playmaker scrips now, that’s a pretty large user base you are all of a sudden discarding.

    With all the above in mind, I’d kindly ask you to please reconsider doing this work yourself as you will directly profit from it.

    Kind regards
    James.
     
  9. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Thanks James. We have the removal documented in our v2 notes here. We're a small team, so ultimately don't have the resources to add and maintain every feature requested. It might however still be added at some point in the future.
     
  10. P3ndragonLLC

    P3ndragonLLC

    Joined:
    Sep 19, 2019
    Posts:
    82
    Hello :)

    Can you load media from asset bundles?
     
  11. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    421
    No media cannot be loaded directly from asset bundles. You could however add the asset into the bundle as a text asset (probably by renaming it to .txt or .bin) and then extract it to a local file before playback.

    Thanks,
     
    P3ndragonLLC likes this.
  12. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    421
    Ahh I see - it gets difficult to track on the forum. We have github issues which works better for reporting these things and our support and developers are active there.

    I will investigate this and get back to you, but if you are able to post to github it will probably get solved faster.
     
  13. trojant

    trojant

    Joined:
    May 8, 2015
    Posts:
    65
    Thanks,I've transferred it to GitHub.
     
    NathanRH likes this.
  14. DebugDotLog

    DebugDotLog

    Joined:
    Feb 1, 2019
    Posts:
    20
    Hello there,

    Is there a way to open a video from a byte array ? I actually encrypt my data to local storage before decrypting it at runtime and then play. But anything that I've tried so far has been unsuccessful.
    I've seen that this is a feature in your ultra version but it doesn't seem to work on Android (which I need).

    Thanks in advance !
     
  15. Seginus

    Seginus

    Joined:
    Feb 1, 2018
    Posts:
    17
    Think this question got passed over, I'd appreciate any tips or info on controlling the buffer length for videos.
     
  16. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Hi @Seginus

    I replied above: Unfortunately there isn't a way to control this - it's up to the operating system and varies across platforms.
     
  17. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Hi @DebugDotLog

    Unfortunately this is not a feature on Android.
     
  18. DebugDotLog

    DebugDotLog

    Joined:
    Feb 1, 2019
    Posts:
    20
    @TerryRH Thanks for your reply!

    Do you guys intend to support overrideDecriptionKey on Android someday ?

    Regards

    EDIT : Got the answer here
     
    Last edited: Jul 22, 2021
  19. Seginus

    Seginus

    Joined:
    Feb 1, 2018
    Posts:
    17
    Oh, sorry for not seeing the previous post. Thanks for the answer.
     
    TerryRH likes this.
  20. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Thanks, we'll keep an eye on this and see if it's something we can support in the future.
     
  21. AndrewRH

    AndrewRH

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

    AVPro Video version 2.1.7 has just been released!

    Changes include:

    General
    • Improvements
      • Documentation improvements
    • Changes
      • MediaPlayer UI demo script now exposes public methods to control UI and makes keyboard controls optional
    • Fixes
      • #867 Fixed PlaylistMediaPlayer script to handle scripting better
      • Fixed Playlist demo scene issue where it wouldn't play the first item
    Windows
    • Improvements
      • Stereo detection and Hap/NotchLC features are now optional and can be disabled to improve performance when not required
      • GetTextureTimeStamp() and GetTextureFrameCount() now thread lock while the frame is being updated to improve frame accuracy
    • Fixes
      • #873 Fixed bug where Windows 7 running a GPU without D3D11.1 capabilities would crash
      • Fixed bug where Media Foundation software decoder in Linear colorspace mode would apply incorrect gamma correction
      • Fixed rare crash bug when loading multiple high resolution videos quickly using the same MediaPlayer
      • Fixed issue where sometimes a media sample would not get released (due to the custom Hap/NotchLC MFT in pass-through mode not detecting cases where it was already processing a sample)
      • Fixed critical section being entered but not leaving in Media Foundation in pass-through mode
    iOS / macOS / tvOS
    • Improvements
      • Improved how texture caching is handled when all player instances have been closed
    • Changes
      • Made the texture cache per player instance instead of global
    • Fixes
      • Fixed compilation issue when iOS Build Support is not installed
    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,
     
    Last edited: Jul 26, 2021
  22. pjaimin

    pjaimin

    Joined:
    Nov 3, 2018
    Posts:
    3
    Can we record video using AvPro ?? and if yes how ??
     
  23. Serhii-Horun

    Serhii-Horun

    Joined:
    Apr 12, 2015
    Posts:
    122
    Hi @AndrewRH !

    We are developing app like TikTok where user have video feed.
    We have an issue: when user swipe to the next video it takes some time to download first part of video(we use HLS(m3u8) streaming). Instead, we want to play next video immediately. Seems we need to have buffered at least first few seconds of video, or first ".ts" video file part.

    We see API - MediaPlayer.OpenFileFromBuffer / AddChunkToVideoBuffer / EndOpenVideoFromBuffer. It seems a little bit complicated. Don't we have ability to set buffer should be fetched before start play video? What should be our strategy to solve that issue(pre-buffer piece of next videos)?

    Thanks
     
  24. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    421
  25. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    421
    OpenFileFromBuffer() is for Windows only.

    You would have to have 2 MediaPlayers - the currently playing one, and another one for the next video to download. This way to you start the next video loading (just play and pause it to start the buffering).

    Hope that helps. If you're having issues the best place to post it for our developers to investigate is our GitHub Issues page:
    https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues

    Thanks,
     
  26. AndrewRH

    AndrewRH

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

    AVPro Video version 2.1.8 has just been released!

    Changes include:

    General
    • Improvements
      • Scripting documentation improved for PlaylistMediaPlayer component
      • Media can now toggle play/pause by clicking on the the MediaPlayer preview area in the Inspector window
    • Changes
      • #875 PlaylistMediaPlayer has been improved with new methods Play() and Pause() to correctly control the playlist logic
      • PlaylistMediaPlayer has had the AutoPlay option removed as it is no longer needed due to the StartMode option
      • PlaylistMediaPlayer has more properties exposed for scripting
    • Fixes
      • #867 Fixed issue in PlaylistMediaPlayer where the first item would be skipped if it was set to transition before the end
    Windows
    • Improvements
      • Seeking and scrubbing through Hap/NotchLC videos performance greatly improved
    • Changes
      • Player is now in a paused state by default on startup until Play() is called, previously IsPaused() would return false when the video was loaded
    • Fixes
      • #855 #873 Fixed crash bug when running on Windows 7 systems without KB2670838 which adds D3D11.1 support
      • #877 Fixed issue where Hap/NotchLC videos would not update frames sometimes after seeking, or would lock up during seeking
      • Fixed issue where using few buffers in Hap/NotchLC could result in no frames being produced, causing stalling
      • Fixed change in 2.1.7 which allowed Hap/NotchLC feature to be disabled
    iOS / macOS / tvOS
    • Improvements
      • Added Preferred Forward Buffer Duration setting to the player settings
      • Can now modify network settings during media playback by updating the platform options

    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,
     
  27. LuisJavierLopez

    LuisJavierLopez

    Joined:
    May 23, 2019
    Posts:
    6
    We are evaluating buying this asset to our project, but... we cannot see the example in stereo mode (Android)

    Documentation doesn't say anything about any step to run Demo360_stereo; only one eye is being rendered. We also need to change VR <--> no VR. Is that possible?

    We have managed to compile the project with Google Cardboard, but there is no head movement.



    The image seems to be the same one in both eyes.
    Do we have to control head rotation?
    Is it easy to disable VR?
    Is it compatible with ARFoundation?

    Luis

    llopez @ Many - Worlds.es
     
  28. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Hi there,

    We saw you made an issue on our Github. Will continue correspondence there.
     
  29. Futurristic

    Futurristic

    Joined:
    Jun 21, 2016
    Posts:
    37
    Hi @AndrewRH, useful plugin. I have used it in my Oculus GO Project. and it's working nice. Does it also work for Oculus Quest 2 ?
     
  30. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Hi @Futurristic

    Yes, it does work on Quest 2
     
  31. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    307
    Hi there, we just had real performance issues on streaming Videos on the Samsung Tab A7. On Samsung Tab S7 its running fast and allright. Any Ideas? (Haven't really touched any settings on AVPro module) the Videos are about 2k Resolution. If you need any more Infos let me know.

    Kind regards
    Daniel
     
  32. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Hi Daniel

    Would you mind logging this as a bug on our Github here please (filling out the template)? It's a bit difficult to say with this kind of issue without getting more details about your project and media. Have you tried optimising your media at all? It looks like the A7 supports lower resolutions than the S7, for example.
     
  33. apranvoku

    apranvoku

    Joined:
    Jul 29, 2021
    Posts:
    1
    Hi, simple question. I want to load an obs screen capture and live stream it to Unity. So far, the most common three possible options I've seen for this are to use RTSP, RTMP, or a .m3u8 file and load it locally as obs writes to it. None of these options have worked out of the box so to speak. I've had the most success with .m3u8, but after loading the first 1 or 2 .ts files, it just stalls. I'm not sure if this is due to OBS or what. I've tried following this issue for RTSP and RTMP

    https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/839

    But unfortunately it doesn't look like it ever got resolved here. I am using Unity 2019.4.23f1, and the trial version of AVPro. (v2.1.8) and OBS 27.0.1. Any assistance with this?
     
  34. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Hi,

    Sorry about that. I've reopened the issue. As noted in the docs, support for both RTSP and RTMP is quite limited and the Microsoft documentation is quite thin, see here. We include the feature because it might be useful in some cases, but don't really advertise it as a reliable feature - we basically just have to try and see what works. In your case it would be useful to figure out where it's going wrong - perhaps you could append that issue on Github that I've reopened with steps to reproduce the issue you're having with m3u8, as a starting point?
     
    NathanRH likes this.
  35. clint205

    clint205

    Joined:
    Dec 19, 2016
    Posts:
    13
    Problem description:

    Hey! We originally built for Oculus Rift and all was good. We just built for Quest (which apparently is Android based) and we are getting a water marked. What can we do?


    System Information:

    AVPro Video: plugin v1.10.1 scripts v1.10.1
    Target Platform: Android
    Unity: v2020.3.13f1 WindowsEditor
    OS: Desktop - To be filled by O.E.M. (Gigabyte Technology Co., Ltd.) - Windows 10 (10.0.19043) 64bit - English
    CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz - 8 threads - 63076KB
    GPU: NVIDIA GeForce GTX 1080 - NVIDIA - Direct3D 11.0 [level 11.1] - 8079KB - 16384
     
  36. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Hi!

    Which version of AVPro Video do you own, the full 1.x or the Windows-only package? A Windows-only package would be watermarked on Quest.
     
  37. wechat_os_Qy0xDpfinjkEWGe6l6f0fNcXM

    wechat_os_Qy0xDpfinjkEWGe6l6f0fNcXM

    Joined:
    Aug 24, 2021
    Posts:
    1
    When avpro plays 8K video (h264, 7680 * 4320 60FPS.mov), there will be Caton phenomenon. NVIDIA geforce RTX 3060 / Direct3D 11.0. The video API is set with different options, but it still appears stuck. Do you have a solution?
     
  38. clint205

    clint205

    Joined:
    Dec 19, 2016
    Posts:
    13
    We have 1.x. I believe it is the Windows only package. We are wanting to keep using 1.x for now. What can we do in order to keep using 1.x and get rid of the water mark?
     
  39. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    H264 is not meant for such high resolutions. See here. Have you tried H265?
     
  40. clint205

    clint205

    Joined:
    Dec 19, 2016
    Posts:
    13
    Hey TerryRH,

    Could you please get back to us here or email?

    We have 1.x. I believe it is the Windows only package. We are wanting to keep using 1.x for now. What can we do in order to keep using 1.x and get rid of the Android water mark?
     
  41. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Sorry for the delay, have replied via email.
     
  42. EDU8K

    EDU8K

    Joined:
    May 20, 2019
    Posts:
    3
    Hello,

    I want to play video from not file stream or URL but memory stream. Please tell me how to do it.

    The reason for this is to play encrypted file while decrypting on memory.

    Thanks,
     
  43. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Hi, I'm not sure we support this. Which platform and which type of encryption?
     
  44. EDU8K

    EDU8K

    Joined:
    May 20, 2019
    Posts:
    3
    Hi, platform is Windows. Encryption type is original so we want to pass via memory or stream instead of file.
     
  45. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    143
    Sorry, what do you mean by original?
     
  46. EDU8K

    EDU8K

    Joined:
    May 20, 2019
    Posts:
    3
    I meant it as what I created and not following typical encryption format.

    So the decryption is needed before reading from file.
     
  47. dh7300

    dh7300

    Joined:
    Jan 23, 2020
    Posts:
    9

    Hello. Have you ever succeeded in reproducing the spatial sound in Oculus Quest 2? We also encoded the mkv file, and the video was confirmed to have spatial sound in the Oculus TV app. When I built the app using that video, spatial sound didn't work in that app. If successful, can you tell me how? I really need it. Thanks.
     
  48. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    317
    Hello I'm testing the trial version using the Demo_Mediaplayer scene to test AvPro in builds-

    That demo scene does not work in Windows or Mac builds- the player UI shows up but the video does not play- is playback disabled in builds for the trial version?

    I tried using a media source of "Reference" and "Path" neither works in builds- everything works fine in the editor though-

    The Mac I'm testing the builds on is an M1 Macbook Pro

    Update: If I move the mp4 I'm using to the streamingAssets folder it works in Windows Builds but still nothing on the Mac build. What needs to be done/where should the video file be to play in a Mac build?
     
    Last edited: Sep 9, 2021
  49. OneApocaleone

    OneApocaleone

    Joined:
    Sep 9, 2021
    Posts:
    1
    Heya. I was trying to create a video with alpha packing with a sequence of images using AV pro. But the video is not playing at all in the scene.

    If I create it with half resolution, it works fine. my guess is that the texture size has become too large when creating alpha packing using top bottom or left right. (Videos with smaller textures work fine)

    Is there a work around for this? Can we use ffmpeg commands to pack alpha channels seperately? Instead of in the same texture?
     
  50. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    99
    Yes it worked on Oculus Quest 2 too.

    Just be sure to blindly follow all the video/audio specifications int the "360 Audio" section in the AVPro documentation, also dragging the camera from the Oculus Rig in the "Head Transform" field and enabling the Facebook 360 support in the "Platform specific" panel. About the "Channel Mode", I left it to default, that is “TBE_8_2".

    Audio360.png

    You can anyway make some tests without the need to build the apk everytime, just temporarily switching your project to Windows - and enabling the 360 Audio on the corresponding AVPro panel - so you can try the spatial audio directly in the Unity editor, simply rotating the camera and checking if the sound passes correctly from an ear to the other or if it remains head-locked. When you're sure it works in the editor, simply switch again the project to Android and build the apk.

    Hope it helps.
     
    Last edited: Sep 10, 2021
    TerryRH likes this.
unityunity