Search Unity

[Released] AVPro Video - complete video playback solution

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

  1. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    It's a little hard to guess what the problem could be..
    Which version of Windows, Unity and AVPro Video are you using?
    Are you using the DX12 graphics API in Player Settings?
    Which codec does your video use?
     
  2. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I don't know what Lightshaft Youtube is :)

    You can purchase any of the assets to get the WebGL support - they all include it as a bonus.

    There shouldn't be any difference between the trial and full versions, so if you're having a bug it will likely remain. If you could give us more information about the issue and a reproducible case then we can take a look at it.

    Thanks,
     
  3. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    There isn't a way to do it via scripting. It works by defining a pre-processor symbol, which then causes the debug logging to be stripped.
     
  4. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for this great detailed bug report! We will investigate this and hopefully fix it in the next version or two. Thanks!
     
  5. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Sadly our team doesn't have a Linux video guru :)
    Also we have very little requests for this...
    It's on the list, but unlikely to happen unless we add support for FFMPEG/libVLC or something, which may happen at some point. Still, we shudder at the prospect of offering support for this, knowing all of the many many flavours and issues with Linux.
     
  6. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes that's supported.
     
  7. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    This is caused by the YpCbCr option. You can disable this in MediaPlayer > Platform Specific > iOS
    I'm not sure why it's not working though...if you use our DisplayUGUI component without any custom material attached, then it should work without having to disable YpCbCr.

    I hope this helps you, and let me know if you can think of any reason for it not working.

    Thanks,
     
  8. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    You can use the DisplayUGUI component that we have. Simply add it to your Canvas hierarchy and then assign the MediaPlayer to it

    Thanks,
     
  9. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    We currently don't expose any controls over the buffering and currently it is controlled by the operating system / video library. You could look at how many seconds are buffered ahead and pause the video until you think there are enough seconds. Buffering control is something we plan to improve in the near future.

    Thanks,
     
  10. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes you can. Not all platforms and streaming manifests are supported though.

    It should work with HLS on Windows 10, macOS, iOS, tvOS and Android. Please do test using the free trial version to confirm though, as there are so many flavours of media configuration.

    Thanks,
     
  11. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Maybe your video is heavily compressed. You could try encoding it with a "fastdecode" tuning profile, and also disabling B-frames and reducing the number of "ref" frames. This should make it faster to begin playback.

    I'm very curious to hear more about these freezes. In our tests we never get any freezes calling these methods. I would like to know:

    1) Does this happen if you use our sample video files (included with AVPro Video in the StreamingAssets folder)?
    2) Which version of iOS are you using?
    3) What is your iOS device type?
    4) Which version of AVPro Video are you using? (the latest is 1.9.12)

    Thanks,
     
  12. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I think you need to check the Seekable and Buffered range. If those include the entire video then you should be fine if the internet connection drops. You can call them via:

    TimeRange[] GetSeekableTimeRanges();
    int GetBufferedTimeRangeCount();
    bool GetBufferedTimeRange(int index, ref float startTimeMs, ref float endTimeMs);

    Thanks,
     
    awesome_suri likes this.
  13. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Currently decoding will happen on the same GPU device that Unity uses. We only support decoding on single GPU device currently. Feel free to download the trial version to see if it suits your needs.
     
  14. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    PS4 and Switch - No
    XBox - Maybe, if you make a UWP build it might work, but we have not tested this
     
  15. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    There is :) We're back!
     
  16. AndrewRH

    AndrewRH

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

    Thanks for the report. We're going to look into this.

    You could also look at some of the demo scenes we include with AVPro Video. They show how to seamlessly transition by using two MediaPlayers.

    Your method should work though, so we'll debug this and get back to you.

    Thanks,
     
  17. AndrewRH

    AndrewRH

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

    Thanks for the kind words :)

    We include the sample scene "13_Demo_360StereoSpatialAudio". This is already set up with 360 video with spatial audio sample. It should export to Windows and Android as these are the only platforms that we currently support for spatial audio. Facebook Audio 360 by default supports their custom format, so if you have a video with ambisonic audio you will need to transcode this into a MKV file. We have some steps on how to do this in the PDF documentation. Email us if you are having issues.

    Thanks,
     
  18. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi iw-ben,

    Great detective work!

    Did you manage to find any solution / clues with the authors of Dissonance Voice Chat plugin?

    If not, we can start to investigate on this side.

    Thanks,
     
  19. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    You can do it via by GUI by clicking on an existing Item and then clicking the "insert" button. There is currently a bug where if you delete all the items you can't add any more. We're going to fix this in the next release (1.9.14).

    To add items via code you do this:

    Code (CSharp):
    1.        player.Playlist.Items.Clear();
    2.             MediaPlaylist.MediaItem mi = new MediaPlaylist.MediaItem();
    3.             mi.filePath = "AVProVideoSamples/AlphaTopBottom.mp4";
    4.             mi.loop = true;
    5.             mi.autoPlay = true;
    6.             player.Playlist.Items.Add(mi);
    7.             player.JumpToItem(0);
    Thanks,
     
    trojant likes this.
  20. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    You can't load the file via assets / assetbundles. Files must either be loaded from a file on disk, or from a URL. On UWP we have a special method which allows videos to be loaded from memory. This can be handy, but in practice it only works well for small videos. On Android we have a "file offset" feature, where you can specify a byte offset value for a location of the start of the video file. This allows you to embed videos within other files and hide them from sight. We also have some support for HLS streaming with AES encryption on macOS, iOS and tvOS.

    Those are the only protection methods we have now. In the future we hope to offer more methods.

    Thanks,
     
  21. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Not currently, but this is something we're working on for the version 2.0
     
  22. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes...they should all work. If not, let us know via a bug report.
     
  23. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    AVPro Video wasn't compatibly with 2019. We're fixing this today though with a new version 1.9.14 which will be released soon.

    Thanks,
     
  24. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks, we will fix the documentation. I don't actually think this has anything to do with our plugin, but here are some steps you can take to fix it:

    In the generated Xcode project
    Select the project
    Select Capabilities
    Scroll down to Push Notifications
    And make sure it’s turned off

    Thanks,
     
  25. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes, Oculus Go and streaming HLS (m3u8) are supported :)
     
  26. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    First of all, your plugin and script versions are very different. It looks like you've upgraded to 1.9.12 from 1.9.6, but you did it while the plugin was in use, so the Bundle file was locked by Unity and didn't update. I recommend closing Unity, opening Unity and immedaitely importing the AVPro Video unitypackage. This should get your plugin to the latest version.

    RTSP isn't supported on macOS / iOS. Can you not use HLS (m3u8)?

    Thanks,
     
  27. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I'm afraid this isn't supported, and I don't think there is an easy way for us to add support for this. Yes, GrabAudio currently isn't implemented on iOS but we keep looking for ways to do this.

    Thanks,
     
  28. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I'm not sure what you mean. On some platforms (Android, macOS, iOS) we support having a custom HTTP header field. You could use this to pass information to the server to authenticate the user. Beyond that I can't think of any other methods that might be supported currently...
     
  29. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for reporting this - we will investigate. Did you make sure that the files in /Assets/Plugins/Android/libs/Arm64 have the correct platform assigned?

    Thanks,
     
  30. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes it isn't supported on any platform and currently crashes on Windows and macOS. We have a fix coming today (1.9.14).

    Thanks,
     
  31. AndrewRH

    AndrewRH

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

    Unplugging the headphones causing the mediaplayers to pause is a system-wide behaviour. We don't have any control over this - this happens at the Apple level.

    In the future we hope to expose an event for this. If you have low-level iOS coding skills then it's possible for you to add your own listening for the "audio path change message" which happens when the headphones are unplugged.

    Currently you could poll the MediaPlayers that you know are currently playing and if you find they've suddenly become paused (without you doing it), then you could unpause them to continue playback.

    Thanks,
     
  32. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    That's strange..Are you using the trial or full vesion for iOS?
    Did you check your Media volume slider?

    Thanks,
     
  33. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes, this is a known issue. AVPro Video isn't compatible with Unity 2019 and crashes in the editor. We are working on a fix for this which will be out today (version 1.9.14).

    Thanks,
     
  34. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    That's strange. Android certainly should adapt to higher resolutions if it detects enough bandwidth.

    Which version of Unity and AVPro Video are you using?
    Which Android device is it, and which version of Android is it running?
    Have you tried toggling the Video API setting (in MediaPlayer > Platform Specific > Android)?

    Thanks,
     
  35. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes, this is a known issue. AVPro Video doesn't support Unity 2019 yet and crashes in the editor. We're working on a fix for this which should be out today in version 1.9.14

    Thanks,
     
  36. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    That's very strange.

    Have you tried to create just a blank project and import the .unitypackage file?

    Thanks,
     
  37. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    RTSP isn't very well supported I'm afraid. We don't guarantee support for it. It could be related to the codec used, but I'm not sure really.. It isn't something that we really support. We leave it up to the operating system codecs to handle the decoding, and with RTSP it is a bit hit and miss. It's sort of a long neglected standard in modern operating systems.... In the future I hope we can improve this, perhaps by writing our own implementation..
     
  38. AndrewRH

    AndrewRH

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

    Yes this is a known issue. AVPro Video isn't compatible with Unity 2019 yet and causes a crash in the editor. We're working on a fix for this which should be released today in version 1.9.14

    Thanks,
     
  39. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for reporting this. That is strange, I'm sure it was working recently. We will investigate.
     
  40. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes, we're aware of it. AVPro Video isn't compatible with Unity 2019 yet, and causes the editor to crash. We're working on a fix which should be released today in version 1.9.14

    Thanks,
     
  41. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    You can use packed alpha. See the PDF documentation where we show how to do this. There is also a transparency example included in the plugin (with sample videos) that shows how to do this.

    Thanks,
     
  42. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    This is the first time I've heard about "Ambisonic UHJ". Interesting!

    I don't think we will be adding support soon... Currently we support Ambisonic audio and Facebooks Audio 360 format, but only on Windows and Android, and there are some format requirements (in the manual).

    Wish we had more resources to improve this.
     
  43. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I think this may be a bug that we're aware of. I think it's related to multi-threaded rendering.

    If you switch to the MediaPlayer API (from ExoPlayer) then you shouldn't get this crash. You probably require some of the features of ExoPlayer though.... Hopefully we will get to the bottom of this one soon. Thanks for providing the stack trace.
     
  44. AndrewRH

    AndrewRH

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

    This seems to be related to IL2CPP. If you disable IL2CPP perhaps the issue goes away? We're working on a fix for it this end.

    Thanks,
     
  45. BakuDigital

    BakuDigital

    Joined:
    May 9, 2013
    Posts:
    18
    Awesome support! Thanks ;)
     
  46. adrianstaude

    adrianstaude

    Joined:
    Jan 8, 2019
    Posts:
    4
    Figured this one out, I think. My Application created and destroyed a media player twice within a couple of frames, which should only happen once. When I fixed that, this bug was gone as well. So I don't know if it's a problem from your side :)
     
  47. zrabbott

    zrabbott

    Joined:
    Jul 2, 2018
    Posts:
    6
    Oh crap sorry about that. Iphones are great as they not only have a physical mute switch, but also have Unity apps natively play through ringer volume not media. Forever an Android user. End of the day it was just me being dumb. Thanks for the quick reply.
     
  48. JC_Amtote

    JC_Amtote

    Joined:
    Nov 8, 2016
    Posts:
    2
    My team is working on a project where we load multiple .wmvs / .mp4 video files using the AVProVideo plugin.

    We have observed that videos fail to load after the first one when using the Media Foundation video API and running in Windows 10. The Direct Show video api works, but we have situations with projects using Media Foundation which cannot be rebuilt and are now being fielded on Windows 10 hardware.

    Unity version is 5.6.
     
  49. AndrewRH

    AndrewRH

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

    AVPro Video version 1.9.14 has just been released!

    You can find the updated version on the Asset Store and the free trial version on our website.

    Changes include:

    Windows
    • Fixed crash bug introduced with Unity 2019
    • Added support for auto-generating mipmaps for Hap videos and a few other formats
    macOS / iOS / tvOS
    • Fixed crash bug introduced with Unity 2019
    • Fixed status state on media closing
    • Improved accuracy of seeking
    • Fixed incorrect colours when using the uGUI Mask component
    • Fixed compile error when building with IL2CPP
    General
    • Fixed parsing bug in HLSStream
    • Added ability to add item to PlaylistMediaPlayer

    Thanks to everyone that reported bugs that were fixed in this release :)

    Please report any issues here on the forum, or to our Github Issues

    Thanks,
     
    LostPanda and ccklokwerks like this.
  50. Rutty03153

    Rutty03153

    Joined:
    Nov 21, 2013
    Posts:
    5
    New version seems like a great fix for the issues I've had, no issues from what I've seen so far.

    Thank you guys for the quick support there!
     
    AndrewRH likes this.