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
    Hi,

    Yes it is compatible with all Unity versions above 4.6. We test with the latest versions such as 2018.2 and even the beta versions.

    Thanks,
     
    cecarlsen likes this.
  2. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    What are the specs of your video?
    What version of Windows are you using? Is there a reason you've switched to DirectShow as the Video API instead of the default Media Foundation? Hardware decoding is only available when using Media Foundation.
     
  3. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Seeking should work just fine on all platforms. Are you using the latest version of AVPro Video (version 1.8.9)? Another thing you can try to Android is to switch the Video API to ExoPlayer (in MediaPlayer > Platform Specific > Android). Thanks,
     
  4. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,684
    Hello! I tried the trial version before buying and that's the problem when I get RTSP stream from IP camera (in 4k) on some machines it runs fine, and on some kind of error the error "Loading failed." Codec not supported or video resolution too high or insufficient system resources. " And the machines are powerful 36 gigabytes of RAM, i7 7 generation GTX-1050. We found out some regularity, on machines with WIn 10 collection 1703 this error is, and on machines with assembly 1803 everything works perfectly. FYI also i test this stream in VLC player, on all machines works fine.
     
  5. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi,
    What codec is the RTSP stream using?
    Is it possible that you could share the URL for us to test? (can email us at http://www.renderheads.com/contact/)

    Thanks,
     
  6. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,684
  7. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,684
    Any ideas? :)
     
  8. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    So AVPro Video doesn't really have good support for RTSP currently. You can see this in the PDF documentation where we have a table showing supported formats. On Windows desktop we do support it, but only when using the Directshow video API (selectable in MediaPlayer > Platform Specific > Windows) and using a 3rd party codec installed, such as LAV Filters. Android has some support for it, but maybe only for lower resolutions.
     
  9. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,684
    Thx, Android not interested, only Windows. But strange, why this works on some Win machines and not work on other (with same hardware). Now i change Video API to DS, how to enable LAV in plugin? Also as I say before, Media Foundation works fine on some machines (hardware decoding)
     
    Last edited: Jul 31, 2018
  10. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    For LAV Filters you just download and install it.

    Can you try this link?
    rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov

    Is your video using HEVC/H265? Because I know different versions of Windows have different abilities to decode this. If your video is using H264 then I'm not sure of the issue... Hard to say without the URL
     
  11. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,187
    We are trying to display an animation while the video is paused and seeking.We have set up code to respond to
    MediaPlayerEvent.EventType.StartedSeeking and MediaPlayerEvent.EventType.FinishedSeeking

    In editor, the code works perfectly fine. But when built out to mobile (I'm testing on Android currently) the events are only called once at the start of the video player but then when I pause the video and try to seek, the event doesn't trigger so I don't get any animation. Is there something I'm missing on mobile?

    Oh, and we are calling PlayingPlayer.Control.Seek(float value) to trigger the seek.
     
  12. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,684
    Watch my second post to you :) this link first that I try after issue :)
     
  13. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,684
  14. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,684
    FYI After updating Windows to build 1803, RTSP stream on these machines starts working without error.
     
    AndrewRH likes this.
  15. MarkHenryC

    MarkHenryC

    Joined:
    Nov 30, 2009
    Posts:
    67
    Problem description:

    When I'm switching between MediaPlayer an Exo Player in code (depending on the video I'm loading) it doesn't reinitialise. Dos this mean I have to create a new MediaPlayer for each video format I support?
    This would not be ideal, as I bind the player to a sphere for 360 video. What's the recommended way to handle this? The main two formats I need to support are those handled by MediaPlayer (H264 etc) and
    Facebook Audio 360 which requires Exo Player. I can set the PlatformOptionsAndroid.videoApi field at runtime but this field only seems to be used for initialisation at the MediaPlayer's creation.

    Device (which devices are you having the issue with - model, OS version number):

    Oculus Go

    System Information:

    AVPro Video: plugin v1.8.9 scripts v1.8.9
    Target Platform: Android
    Unity: v2017.4.1f1 WindowsEditor
    OS: Desktop - MS-7816 (MSI) - Windows 10 (10.0.0) 64bit - English
    CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz - 8 threads - 16069KB
    GPU: Emulated GPU running OpenGL ES 3.0 - Emulated - OpenGL ES 3.0 [emulated] - 8088KB - 4096

    UPDATE:

    I'll make the question simpler: I can use Exo Player for all formats I require. But how do I change the format at runtime? I can set Audio Mode and Channel Mode in the Inspector, but only the Channel Mode seems available in the API. But changing these fields doesn't initiate any re-initialisation, so I'm stuck with the same format as when the MediaPlayer component is first created (when the Initialize() method is first called. There must be a way around this but I can't find it in the source code or the API docs.
     
    Last edited: Aug 3, 2018
  16. jungduksu

    jungduksu

    Joined:
    Mar 6, 2018
    Posts:
    1
    Problem description:
    We are a licensee of AVProVideo the latest unity version and Use the latest version of Unity 2018 2.1f1
    Not compatible on some Android devices.
    For example, in an app installed on Lenovo Tab 4 Pro,
    the slider is abnormal when playing a video. Please tell me how to fix it!



    Email : iwa14master@gmail.com
    Device (which devices are you having the issue with - model, OS version number):
    Media (tell us about your videos - number of videos, resolution, codec, frame-rate, example URLs):
    System Information:
    AVPro Video: plugin v1.8.9 scripts v1.8.9
    Target Platform: Android
    Unity: v2018.2.1f1 WindowsEditor
    OS: Desktop - GL62 6QE (Micro-Star International Co., Ltd.) - Windows 7 (6.1.0) 64bit - Korean
    CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 8 threads - 16260KB
    GPU: Emulated GPU running OpenGL ES 3.0 - Emulated - OpenGL ES 3.0 [emulated] - 1995KB - 4096
     
  17. Idlepenguin

    Idlepenguin

    Joined:
    Jan 27, 2013
    Posts:
    2
    Hey Guys,

    I'm using AVPro at the moment for a HTC Vive project with Facbook 360 Audio. I noticed that if I use Media Foundation the video splits in half only giving me one of the eyes. If I turn of Top and Bottom in the video packing it then gives me one half of the image per eye. Using Direct Show fixes this, as does removing the VR MetaData from the video.

    My current issue, which may or may not be related to the above one, is that when using the Facbook360 Audio I have to use Media Foundation and the video needs the meta data for sound. Even with the meta data (and half an image) at the moment it is not specializing the sound. I've tried just about everything I can think of and I'm at a loss. I've triple checked that the video is working with the audio perfectly in other media players (Vive Cinema for example), but I cannot seem to get anything out of it using AVPro.

    Any advice on how I can solve this issue? Or why the issue would be occurring?

    Thanks.
     
    tufeixp likes this.
  18. MarkHenryC

    MarkHenryC

    Joined:
    Nov 30, 2009
    Posts:
    67
    This is the only link I could find that references VideoApi. Good to know that runtime switching is supposed to be supported but it doesn't work on Android switching from MediaPlayer to ExoPlayer - at least when the Exo Player is set up for FB 360
     
  19. shiquhudong

    shiquhudong

    Joined:
    May 19, 2017
    Posts:
    26
    ExoPlayer supports DRM?
     
  20. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    ExoPlayer does, but we haven't implemented any of the DRM features yet in our player.
     
  21. AndrewRH

    AndrewRH

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

    On Android did you try switching to the ExoPlayer API? This can be found in MediaPlayer > Platform Specific > Android. It may give you matching events. Otherwise, perhaps you also need to listen for the Buffering and Stalled events, and only hide your animation when all of the Seeking, Buffering and Stalled events have completed.

    I hope this helps you. Let me know if you have any more questions.
     
  22. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    What do you mean exactly by "the slider is abnormal when playing a video"?
    Perhaps try switching to the ExoPlayer API option (in MediaPlayer > Platform Specific > Android) to see if that helps?

    Thanks,
     
  23. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes currently in our Windows implementation if there is any stereo metadata embedded in the video then our player will only decode the left eye. So we require videos without this metadata embedded.

    Using the FB Audio 360 tools you should be able to generate a MKV video file that doesn't contain any of the stereo metadata, but still contains the audio 360 metadata. The MKV audio channels should be in the Opus format. We list all of the requirements for this in the PDF documentation.

    I hope this helps you. In the future we plan to fix the issue with stereo metadata, and also plan to include a demo scene (and video) of the FB Audio 360 feature - probably in the next release (v1.9.0).

    Thanks,
     
  24. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes you are correct. Some of the MediaPlayer options aren't adjustable once the MediaPlayer is created. The best thing you can do is to destroy the MediaPlayer and create it again with the settings that you need. In the future I hope we can make more of these options switchable. We have this on our roadmap.

    Thanks,
     
  25. dmahajan_chicmic

    dmahajan_chicmic

    Joined:
    Aug 10, 2018
    Posts:
    1
    Hi Team, I am trying your trial version for AVPro Video. I am getting issue while streaming .mp4 video, It is playing audio only and displaying black texture. Here is the link for video displaying issue: https://www.dropbox.com/s/tmh1aois57gihw4/BlackTexture.mp4?dl=0,
    Please look into this and let me know how can I resolve this issue. Looking for your reply.

    Device (which devices are you having the issue with - model, OS version number):

    Device Model : Galaxy S9 SM-G960F, Android Version: 8.0.0

    Media (tell us about your videos - number of videos, resolution, codec, frame-rate, example URLs):

    Here are the links for videos: http://52.17.12.187/uploads/2018/Jun/Empire.mp4, http://52.17.12.187/uploads/2018/Jun/Reactions.mp4

    System Information:

    AVPro Video: plugin v1.8.8t scripts v1.8.9
    Target Platform: Android
    Unity: v2017.4.8f1 OSXEditor
    OS: Desktop - Macmini7,1 - Mac OS X 10.12.6 - English
    CPU: Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz - 4 threads - 8192KB
    GPU: Emulated GPU running OpenGL ES 3.0 - Emulated - OpenGL ES 3.0 [emulated] - 1536KB - 4096
     
  26. wurzel-digital

    wurzel-digital

    Joined:
    Jun 21, 2013
    Posts:
    9
    Hi,

    I am trying to get HLS Streaming on Android to work and it is working only partially.
    The problem:

    The video is playing correctly if internet is available, but after the internet connection was interrupted and video stopped playing, it is never starting again, although internet is available again. Only way to get it to run again is to restart it completely. On iOS HLS streaming is working correctly and video starts automatically again after internet reconnection.

    Unity: 2017.4.5f1
    AVProVideo: 1.8.9 (current version of Asset store)

    I tested it with the demo scene 02_Demo_imGui.
    it is not working with exoplayer api and not working with mediaplayer api.

    can someone help me to get it running on android or is this just not possible?
     
  27. Labmda

    Labmda

    Joined:
    Oct 21, 2016
    Posts:
    3
    hi all, please how i can simulate the button Load from interface avpro, i have try function play() but that do nothing when i use url for path
     
  28. pitt_unity

    pitt_unity

    Joined:
    May 9, 2018
    Posts:
    3
    Hi, I have a same problem. Is this bug fixed?
    1) AVPro Version: 1.8.9
    2) 2017.4.5f1
    3) Windows 10 - 1803
     
  29. Roycemedia

    Roycemedia

    Joined:
    Jun 26, 2018
    Posts:
    1
    Hi,

    We are using AVPro Video Trial to play live CCTV camera stream (HTTP stream and HLS stream). The live stream is hosted internally using a media server.

    Both streams (HLS & HTTP) work perfectly fine in Unity Editor, but not on WebGL (Edge browser). Thus, we are wondering if the plugin supports live stream on WebGL.

    Scene: 02_Demo_imGui
    Target Platform: WebGL
    AVPro Trial Version 1.8.9
    Unity Version 5.6.4f1
    Windows 10

    In addition, can AVPro support PTZ control of CCTV, as well as playback of CCTV stream?

    Lastly, will there be any updates on supporting HLS (.m3u8) on other browsers (E.g. Firefox and Chrome)?

    Thank you.
     
  30. toripopo

    toripopo

    Joined:
    Sep 15, 2017
    Posts:
    6
    Hi.

    I want to know how do I get http error response code while playing HLS streaming.
    Stalled event does not fired in AVProVideo windows 1.8.9, but in 1.7.3, stalled event fired when 50x http response received.
How do I know http error after start playing HLS in latest version of AVProVideo windows?

    Thanks,
     
  31. jpienbro_apollojourney

    jpienbro_apollojourney

    Joined:
    Jul 20, 2017
    Posts:
    11
    Hello

    We are currently developing a video recording app and using this plugin for the video playback but on multiple Android devices it seems to keep buffering forever. It mainly happens with videos with high framerates. Is that a limitation of the device or can I increase the buffer size somewhere?
    For example on my Nexus 6P the buffering gets stuck at 36% on a highspeed video. On my Galaxy S7 it can fully buffer that video.
    We need precise control of the video frame/time, that's why we're buffering everything first.
     
  32. spxyz

    spxyz

    Joined:
    Feb 7, 2014
    Posts:
    11
    Hello.

    I want to switch the audio mode runtime. How is it better to do this? Looks like this way does not work:

    Code (CSharp):
    1. if (multiChannel)
    2.         {
    3.             MP.PlatformOptionsAndroid.enableAudio360 = true;
    4.             MP.PlatformOptionsAndroid.audio360ChannelMode = Audio360ChannelMode.AMBIX_4;
    5.         }
    6. else
    7.         {
    8.             MP.PlatformOptionsAndroid.enableAudio360 = false;
    9.         }
     
  33. willisp

    willisp

    Joined:
    Sep 29, 2016
    Posts:
    2
    Hello @AndrewRH ,

    I'm curious, when is the next version of AVPro is going to come up?
    Is it going to support live subtitle tracks?

    Thanks a lot for you answer!
     
  34. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Version 1.9.0 will be released this week...Maybe even today.

    Thanks,
     
  35. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Currently you have to destroy and recreate the MediaPlayer component if you want to toggle the audio 360 option. An alternative could be to have two MediaPlayers, each with a different audio setting and toggle between them based on the file you want to play, and calling CloseVideo() on the other Mediaplayer. We hope to make this feature toggleable in the near future. Thanks,
     
  36. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Did you try setting the option in Global Settings: TimeScale support? This option is there to help video capture/recording of apps with video in (non real-time).

    We don't have any way to increase buffering size. What sort of high frame-rate videos you are talking about? 60hz or above? Perhaps you can send us more information and a sample file/code via email? (www.renderheads.com/contact/)

    Thanks,
     
  37. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hmm.. That's strange - the stalling behaviour should be improved in the new version. There is an error event...you could use that to detect an error...

    Is there an example you could send me (www.renderheads.com/contact/) so that we can test this?

    Thanks,
     
  38. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    In the last version (1.8.9) we just relied on the Web Browsers ability. In the upcoming version (1.9.0) we have added support for 3rd party Javascript libraries, like HLS.JS. The new version should be released this week and I think it will improve the HLS support, as these libraries are usually ahead of the browser implementations.

    AVPro Video has no support for PTZ.

    Again, in the new version we have support for HLS.JS, which will give support for HLS in Firefox and Chrome which don't have native support for HLS (unlike Edge).

    Thanks,
     
  39. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Take a look at the ChangeVideoExample.cs example script that is included in the package.

    Otherwise, try something like this to reload the current video:

    _mediaPlayer.OpenVideoFromFile(_mediaPlayer.m_VideoLocation, _mediaPlayer.m_VideoPath, true);

    Thanks,
     
  40. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I presume it's working in the editor, but not on Android?

    This is strange.. Did you try using the ExoPlayer API (in MediaPlayer > Platform Specific > Video API)?

    I had a look at the video files, and they appear to contain very strange metadata...Perhaps there is sometihng in there that Android doesn't like - try reencoding the videos with something like Handbrake or FFMPEG.

    Thanks,
     
  41. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hmm...It should throw the Stall event, and then when the connection is restored throw the Unstalled event. At which point either the playback should resume, or you should have to send Play() command..Or maybe Pauses() and then Play() if there is a bug..

    Are you using the ExoPlayer or MediaPLayer video API? (in MediaPlayer > Platform Specific > Android > Video API)?

    Thanks,
     
  42. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hmm..We will have to investigate this... Do you have a test URL? Please get in touch via email (www.renderheads.com/contact/)

    Thanks,
     
  43. pitt_unity

    pitt_unity

    Joined:
    May 9, 2018
    Posts:
    3
  44. jpienbro_apollojourney

    jpienbro_apollojourney

    Joined:
    Jul 20, 2017
    Posts:
    11
    The videos are 120fps and 240fps. The 240fps videos can't be buffered completely more often on some devices, probably because on the buffer size limit.
    Maybe we need to find a workaround for our app (if we can't change the buffer size), like limit the max fps for a recording.
     
  45. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks, we're investigating and will get back to you.
     
  46. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    120 and 240fps videos are very much edge cases. A lot of decoders aren't designed to handle frame rates up to that high. Could you possibly record at 120fps but set the video to 30fps...then you can use PlaybackRate to play it faster, or even pause and scrub it...
     
  47. AndrewRH

    AndrewRH

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

    AVPro Video version 1.9.0 has just been released!

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

    Changes include:

    Android
    • Upgraded Facebook Audio 360 to version 1.6.0 from 1.5.0
    • Upgraded ExoPlayer to 2.8.4 from 2.8.2
    • ExoPlayer is now the default video API instead of MediaPlayer
    • Changed Android API level requirement to 15 from 16 when using MediaPlayer API (ExoPlayer still requires 16)
    Windows Desktop
    • Upgraded Facebook Audio 360 to version 1.6.0 from 1.5.0
    WebGL
    • Added support for 3rd party decoder libraries such as dash.js and hls.js, see documentation for details
    • Added warning for unsupported WebGL 2.0
    General
    • Added new (beta) PlaylistMediaPlayer component which allows seamless playlist progression and has a number of optional transitions, and a new demo scene using it
    • Added a new demo scene and video showing stereo 360 playback with spatial audio (on Windows and Android only)
    Minor
    • Resampler now has some support for videos with unknown frame rate
    • Sphere demo no longer has camera affected by VR positional head tracking
    • Added demo scriptlet to show how to toggle stereo mode via script
    Please report any issues here on the forum, or to our customer support email.

    Thanks,
     
  48. jpienbro_apollojourney

    jpienbro_apollojourney

    Joined:
    Jul 20, 2017
    Posts:
    11
    Thank you for the response
    We'll try that option.
     
  49. Jeeva1803

    Jeeva1803

    Joined:
    Aug 25, 2018
    Posts:
    2
    Hi,
    I want to play the video simultaneously while it is downloading via unitywebrequest. Will AVPro video support this? If so please provide me some guidance, as i am new to unity and avpro video.
    I can able to play the video which is downloaded fully through FullscreenVideo.prefab.
    Any help will be much appreciated!!!
     
  50. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi, no I'm afraid that isn't possible. We don't support passing data chunks into the player, via unitywebrequest or anything. For live streaming we support the standards HLS (.m3u8) and MPEG-DASH (.mpd). You could MAYBE download an mp4 file (encoded with fast-start) manually to disk and then play from that file file as it is being written to, but this is not something we official support or have tested, so if tries to play a region that isn't buffered yet it could crash..

    Thanks,