Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

[Released] AVPro Video - complete video playback solution

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

  1. UnityDev101

    UnityDev101

    Joined:
    Dec 10, 2014
    Posts:
    7
    Probably the best video player on Asset Store.

    I find it weird that only iOS platform can use GetBufferedTimeRange(). Any plan of getting GetBufferedTimeRange() supported on Android in the future ?
     
  2. MingJ

    MingJ

    Joined:
    May 13, 2015
    Posts:
    12
    Hi!

    I have a question about this asset.
    I want to stream video from several IP Cameras (MJpeg format) and also record/save the video.
    Is that possible with AVPro?

    Thanks
     
  3. akthree88

    akthree88

    Joined:
    Sep 20, 2017
    Posts:
    6
    Hey!
    Does AVPro Video work with the Lightweight Render Pipeline LWRP? I am trying to use an alpha masked top-down video but dont seem to get it it working like i did with the Unity Standard Render Pipeline ... is this a Shader issue?
     
  4. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Hmm, well the player is querying the hardware decoding capabilities, so there should be no reason that it doesn't play those...You could try switching from ExoPlayer to MediaPlayer Video API (in MediaPlayer > Platform Specific > Preferred Video API) and see if that helps.

    Otherwise it must be that Samsung is misreporting the hardware decoding capabilities but in their own player they know the true capabilities, or have some special option they can toggle....

    Thanks,
     
  5. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Thanks!

    Yes we are adding GetBufferedTimeRange() to all platforms in Version 2.0, as well as many other great new features and improvements.
     
  6. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    AVPro Video doesn't have any recording capabilities. For this check out or plugin AVPro Movie Capture. There is a free version available for download from our website, but the plugin is Windows only.

    It may be able to play back IP camera streams, but in our experience the formats used aren't too common. We have had it working on Windows after installing LAV Filters, and setting DirectShow are the Video API (MediaPlayer > Platform Specific > Windows > Preferred Video API).

    Thanks,
     
  7. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Yes there is no reason why it shouldn't work with LWRP. It worked for us, but during our testing we found that switching to these alternative render pipelines was a complex action and could easily cause problems with materials and shaders. We would have to get more details on how/why it isn't working for you - but it should work.
     
  8. JackMini36

    JackMini36

    Joined:
    Feb 13, 2014
    Posts:
    20
    Thanks!

    However, it seems that now HIGH_QUALITY is not working with this version. I get the pole distortions again.
     
  9. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    That's strange...no difference between it on/off? Hmmm... I'll take a look tomorrow
     
  10. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Hey everyone, just to let you know we've started a Github project for AVPro Video where you can report bugs/issues:

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

    This will make it easier to keep track of each issue as they'll each have their own thread. We'll of course continue to use the forum too, but would prefer issues to be posted there.

    Thanks,
     
  11. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    765
    Hello, im preparing to purchase your AVPro player for Unity. I want to use it for different platforms like Android, iOS, WebGL, Windows, and MAC for playing LIVE 4K 360 video streams with HLS, or RTMP, RTSP , DASH, etc. So can AVPRo do any of those for LIVE streaming videos playback in VR?
     
    Last edited: Jan 18, 2019
  12. JackMini36

    JackMini36

    Joined:
    Feb 13, 2014
    Posts:
    20
    No difference. Tried it with both on and off.
     
  13. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Hi!
    Yes it supports Android, iOS, WebGL, Windows and macOS.
    The ability to play back 4K content will depend on the hardware.
    RTMP/RTSP isn't well supported by out player.
    HLS is supported on Windows, Android, iOS and macOS. On WebGL it is also supported but requires that you include HLS.js (notes on his in the PDF documentation).
    DASH is supported on Windows, Android and WebGL (again using Dash.js), but not iOS or macOS.
    There is a free trial version so I would recommend testing it for your needs.
    Thanks,
     
  14. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Are you using the shader I posted here, or did you upgrade to 1.9.10?
    I'm going to check this today...
    Thanks,
     
  15. JackMini36

    JackMini36

    Joined:
    Feb 13, 2014
    Posts:
    20
    Tried both, same result.
     
    AndrewRH likes this.
  16. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Sorry about that - there was a typo in the shader. Attached the fixed copy. Thanks for reporting this.
     

    Attached Files:

  17. JackMini36

    JackMini36

    Joined:
    Feb 13, 2014
    Posts:
    20
    Seems to work great now, thanks!

    I will test a bit with OES and see if we still encounter the memory leak issue.
    If we do, I will start a new issue on Github for it.
     
  18. UnityDev101

    UnityDev101

    Joined:
    Dec 10, 2014
    Posts:
    7
    Any ETA on the 2.0 version ? Can't wait!
     
  19. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    We're working on it... :)
     
  20. Denis_Cliofas

    Denis_Cliofas

    Joined:
    Jun 28, 2017
    Posts:
    1
    Hi AndrewRH, I have a scenario were I am using rendertotexture to capture video (Avi, x264 codec) and the color format of it is RGB11110 Float but the output is completely black. Is this color format not supported or my setup is completely wrong?
     
  21. sandman3

    sandman3

    Joined:
    Feb 21, 2017
    Posts:
    12
    Sorry for the slow response. We use Unity 2017.4.1f1 for this project.

    We are able to reproduce this on all of our video's, which are using H264 encoding at either 1440p or 4k resolution, both at 5MB bitrate. The video's are no longer than 2 minutes. We haven't tried testing this for other video's, as this used to be working just fine. We were using 1.8.9 which didn't have this, but had other issues, then updated to 1.9.3 and 1.9.5 respectively, both showing this same issue.

    Unity 2017.4.1f1 as above. Using AVProVideo version 1.9.5.

    It never unstalls, just throws the stall once and then no other events are ever called.

    We tried increasing the timing for playback stall but it didn't matter. No new frames are being rendered, and it only occurs at "startup" of the video's.

    I hope this helps, but I can understand that it is still too vague. If you have any other questions, please don't be afraid to ask them.
     
  22. Seven27

    Seven27

    Joined:
    Mar 10, 2013
    Posts:
    4
    Hi, I'm building an application on iOS.
    I am streaming a video from my own server(http).
    I want to implement progressive streaming, so that after 4-5 seconds when video starts playing once it plays continuously. The internet is good.

    There is some form of fine-grain control over how much of the video buffers before playback?

    I will really appreciate the help.
     
  23. DarknessYao

    DarknessYao

    Joined:
    Dec 17, 2017
    Posts:
    7
    I use the latest vision, it still can not work. I use the unity component itself. 0.0
     
  24. sfsadfsadfdsafdsaf

    sfsadfsadfdsafdsaf

    Joined:
    Jan 15, 2015
    Posts:
    2
    Hey guys, before I buy, I would like to confirm whether your tool allows me to specifically select feed from one of multiple cameras plugged into the PC while definitely avoiding any other cameras to be woken up by Unity. I'm having an issue where the cameras on my Vive choke my USB connection when they get woken up but I do need to get a live feed from another USB cam.
    (apologies for my username, which I must have chosen when I was in a rush years ago and can't change now :D)
     
  25. catsfather

    catsfather

    Joined:
    Nov 5, 2013
    Posts:
    2
    Hi I got Crash when I started AVPro video. That's happens when i build with Window X86. Window 64 build is very good. but, I want build on x86

    I feel like jumping into the river.
    Please save me.

    I posted an error log.
     

    Attached Files:

    AndrewRH likes this.
  26. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    thanks, we'll be looking into it very soon! keep checking for updates :)
     
  27. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    This bug has been fixed in 1.9.12 which will be released in the next few hours. Keep a look on this forum for the new version post.

    Thanks,
     
  28. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Hey! This forum is for AVPro Video, but I think you're asking about AVPro Live Camera - there is a different forum for this. Please post your question there if you need more details. There is a free trial version of the plugin which you can download from our website - that should give you all the answers you need.
     
  29. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    We're aware of this issue and are currently investigating..Hopefully we'll have a fix soon. It only seems to affect ExoPlayer, so you might be able to change the Video API setting to use MediaPlayer API instead for now. I think it's related to calling the API methods too quickly... Does it happen randomly? In our test case it happens very rarely...
     
  30. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Hi, are you talking about our plugin AVPro Movie Capture? If so, then you've posted to the wrong forum - this forum is for AVPro Video, our video playback plugin. I don't think floating point texture will be supported by the video capture engine...Please post more details on the AVPro Movie Capture forum. Thanks,
     
  31. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    This has been answered via email. Basically we don't have any fine grain control over the video buffering. On iOS though we do have a method you can call to ignore buffering and play immediately without waiting for buffering.

    mp.Control.SetPlayWithoutBuffering(true);

    Thanks,
     
  32. AndrewRH

    AndrewRH

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

    AVPro Video version 1.9.12 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
    • Fixed typos in OES shader introduced in 1.9.10
    WebGL
    • Fixed compile errors when building with Development Mode
    Windows
    • Fixed crash bug when running in 32-bit
    General
    • Fixed script warnings and errors showing in Unity 2018.3.x

    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,
     
  33. UnityDev101

    UnityDev101

    Joined:
    Dec 10, 2014
    Posts:
    7
    Hi, it seems that AVPro cannot play this video
    Here is the error log:
    Player 443: Failed to play movie: file:///var/containers/Bundle/Application/3F94C321-D4B2-4F5A-B857-853762F1A27B/Blast.app/Data/Raw/hidden_beach_hawaii_4K.mp4; error: The media data could not be decoded on this device.

    [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources.

    Error occurred on iPhone 5, iPhone 5s. Video works fine on Mac, Android devices.

    Appreciate any support! =))
     
  34. indie_mike

    indie_mike

    Joined:
    Nov 7, 2016
    Posts:
    29
    Sorry for this delayed reply been very busy!

    So when i went to look at the current API being used, we were using media player. Changed it to Exo and it can now play up to 4096x4096. But now we seem to be having a lot more weird niggling issues.

    For example, if we try to pause and then play via our UI, the player freezes even though it is receiving the correct calls.
    Also if we try and play a video again, the screen will go black and the video will not be rendered, and there is no sound. It seems like the player wont allow us to play the same video twice.

    If we change back to media player API, all the issues disappear but obviously no 4k.
     
  35. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Which version of Unity and AVPro Video are you using?
    Also do you have the YCbCr mode enabled (in MediaPlayer > Platform Specific > iOS)?

    Thanks,
     
  36. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Interesting. Which version of AVPro Video and Unity are you using?
    If you use the OES mode (in MediaPlayer > Platform Specific > Android) does that help?
    Are you able to reproduce this with any of our sample scenes?
    Is your UI running on another thread?

    Thanks,
     
  37. indie_mike

    indie_mike

    Joined:
    Nov 7, 2016
    Posts:
    29
    Using Unity 2017.2.0f3 and AVPro v1.9.8.

    We tried OES and it made no difference at all. Our platform is based around networking and android devices so it will be a little hard to try reproduce the same environment but ill give it a go.

    We are using NGUI for our UI.

    Edit: Also, the player seems to be freezing all of unity's editor while playing videos. Happening in both our scene and the example scene.
     
    Last edited: Jan 30, 2019
  38. remy_rm

    remy_rm

    Joined:
    Jan 16, 2017
    Posts:
    17
    What is the criteria for the mediaplayer to start requesting a lower resolution than the one last played?

    As it is right now The video starts at a medium quality resolution (1080p) as specified in the .m3u8 header file.Now when the stream recognises that it can handle more it will upscale the resolution to 4k where available. However if the internet connection becomes a bit slower for whatever reason it doesn't downscale from 4k to a lower resolution, but will instead keep buffering until it received 4k, and will request the next segment for 4k aswel.

    Is this related to the mediaplayer, or due to HLS implementations (apologies for asking here if it is)?
    using version 1.9.10. with the exoplayer video API on Android. Tested with both Unity 2019.1 and 2018.3
     
  39. UnityDev101

    UnityDev101

    Joined:
    Dec 10, 2014
    Posts:
    7
    I was using AVPro latest version 1.9.12, Unity 2018.3.2. YCbCr mode was enabled.

    Hope that helps.
     
  40. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    We tested the video on iPhone 5s and it played for us, although the second half didn't play.

    There are a few issues of note:

    1) We ran the video through a tool called FFProbe and it found some errors in the encoding:

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fce8c800000] st: 0 edit list: 1 Missing key frame while searching for timestamp: 0
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fce8c800000] st: 0 edit list 1 Cannot find an index entry before timestamp: 0.

    So the encoding looks a bit broken.

    2) The bitrate of this video is very high (42Mbit) which I believe is beyond the capabilities of the iPhone 5 video decoder - and could cause it to struggle.

    3) The video resolution is 3840x2160 which for a 2D video doesn't make much sensor to display on an iPhone 5/5s. It may be able to handle this resolution, but you're right at the limits of the device which is always a bit dangerous on mobile.

    4) iPhone 5 has older technology than the 5s, so I would expect it to struggle more (or fail) with this video.

    Thanks,
     
  41. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    It should adapt when the connection becomes slower. We will have to investigate. Could you also try changing the API to MediaPlayer to see if that helps?

    Thanks,
     
  42. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    If you disable multi-threaded rendering in Android Player Settings, does that help?

    The player certainly shouldn't be freezing in the editor. Is this macOS or Windows? Does it recover after freezing? Does it happen with our sample videos? This isn't something we've seen before.

    Thanks,
     
  43. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Just a reminder to everyone that we have now set up GitHub Issue Tracking for all of our plugins.

    We will of course keep using the forum, but it's best to use this proper issue tracker.

    Thanks,
     
    remy_rm likes this.
  44. UnityDev101

    UnityDev101

    Joined:
    Dec 10, 2014
    Posts:
    7
    Thank you for your quick reply!
     
  45. MESHED-space-GmbH

    MESHED-space-GmbH

    Joined:
    Nov 11, 2015
    Posts:
    22
    Problem description:

    Hello dear AVPRro Team,

    i am trying to play a standard (flat) HD 1920x1080 Video in a VR scene. The video should be
    played in 180 spherical mode in front of a starship window to simulate a journey
    through space.
    I used the 360SphereVideo-prefab with "Equi Rectangular 180" Video Mapping. The movie runs but is very unsharp and blurry as well in the editor as in the final build.
    Is there any solution for this problem?
    Regards, Michael

    Device (which devices are you having the issue with - model, OS version number):
    PC, Windows 7 and also tried on Windows 10

    Media (tell us about your videos - number of videos, resolution, codec, frame-rate, example URLs):
    .mov, HD 1920x1080, 29 f/s, 216 mb, bought from shutterstock



    System Information:

    AVPro Video: plugin v1.9.12 scripts v1.9.12
    Target Platform: Standalone
    Unity: v2018.2.5f1 WindowsEditor
    OS: Desktop - System Product Name (System manufacturer) - Windows 7 (6.1.0) 64bit - German
    CPU: Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz - 8 threads - 16375KB
    GPU: NVIDIA GeForce GTX 960 - NVIDIA - Direct3D 11.0 [level 11.0] - 1969KB - 16384
     
    Last edited: Feb 1, 2019
  46. jpienbro_apollojourney

    jpienbro_apollojourney

    Joined:
    Jul 20, 2017
    Posts:
    11
    Hello

    For a project we wants to stream videos from a server to a mobile device. Currently we just let the plugin play from a default mp4 url. We want to play and download the video file at same time. At the moment we use 2 processes for this: one to play/stream the video file and one that downloads the whole file.
    Is it possible to do this in 1 process to reduce the total amount that gets downloaded?
    We tried to use HLS: https://stackoverflow.com/questions...t-is-downloading-using-avpro-video-in-unity3d, but seems to make seeking (changing position within) the video while it's streaming very slow.

    Any ideas what video format and streaming protocol(if any) we could best use?
     
  47. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    Is it not just that the resolution of the video is too low? 1920x1080 for a 180 video seems quite low and will appear blurry when scaled up to fill the view. Or is it actually a rendering artifact?
     
  48. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,637
    We don't yet have any mechanism to download and cache the video while it is playing. You could play an MP4 directly from the server (make sure it's encoded with fast start so it can begin streaming immediately), but this would require knowing the bandwidth of your user. HLS is basically the same, but it's adaptive so it will still be responsive when bandwidth becomes low. Seeking into an undownloaded region of HLS can be slow because it must download that segment - so it depends on how the HLS was created and how big the segments are. Segment are usually 6 seconds long.
     
  49. flare-phoenix

    flare-phoenix

    Joined:
    Jun 4, 2015
    Posts:
    3
    Hello

    I'm trying to stream a video of HLS + AES 128 with AVProVideo.
    I put the url of key in the keyinfo which is put in the same place as the m3u8 file, but I want to hide the location of the key by describing this url with the custom URL.
    ex. mykey://file.key
    When calling OpenVideoFromFile, can I add code to interpret this custom url somewhere?

    avpro.video: Latest version
    platform: ios / android
     
  50. flare-phoenix

    flare-phoenix

    Joined:
    Jun 4, 2015
    Posts:
    3
    I found it now.
    It can be solved by using SetKeyServerAuthToken.
    I will try using it.
     
    AndrewRH likes this.
unityunity