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

[Released] AVPro Video - complete video playback solution

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

  1. toripopo

    toripopo

    Joined:
    Sep 15, 2017
    Posts:
    6
    Thanks your reply.

    I already updated to latest version.
    Windows 10 Pro
    Version 1703
    Build 15063.608

    Do you have/know some H.265/HEVC HLS URL which can be played by AVProVideo?
     
  2. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    The video FPS should be available for all platforms except Android.

    You can query it via the API:

    Code (CSharp):
    1. mp.Info.GetVideoFrameRate()
    Hope that helps.

    Thanks,
     
  3. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Unity broke their OBB (split application binary) support for quite a few Unity versions...It seems to be working again in 2017..
     
  4. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    :D
     
    GamerPET likes this.
  5. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    There are some here:
    https://developer.apple.com/streaming/examples/

    They're called "preliminary" I guess because HEVC support is new for HLS..

    It is also nice to see that this stream has a fallback path for H.264...

    Thanks,
     
  6. 785130190

    785130190

    Joined:
    May 11, 2017
    Posts:
    21
    That's what I want,thanks!
     
  7. 785130190

    785130190

    Joined:
    May 11, 2017
    Posts:
    21
    There's a problem,GetVideoFrameRate is Commented-Out Code!I forget the version,and I can't find the version number.
     
  8. billywang

    billywang

    Joined:
    Apr 14, 2016
    Posts:
    5
    So, The problem is Unity OBB problem? It can't be solved with now unity version?
    Or Unity 2017 can solve this problem?
    I will try another way to test, and hope helpful!!
     
  9. toripopo

    toripopo

    Joined:
    Sep 15, 2017
    Posts:
    6
    Hi Andrew.
    Thanks for information.

    I read about this URL(https://tungsten.aaplimg.com/VOD/bipbop_adv_example_hevc/master.m3u8) before in pdf document.
    Unfortunately, it can’t be played on my computer.

    AVProVideo says “[AVProVideo] Error: Loading failed. Codec not supported or video resolution too high or insufficient system resources.”

    Are you really able to play this HLS on your computer? If so, is this my computer’s issue...?
     
  10. ZealUnity

    ZealUnity

    Joined:
    Apr 13, 2014
    Posts:
    56
    Does this support frame interpolation (30fps to 60fps)? Something like what SVP does...



    If not, any plans to implement it? Extra features like that would really set you apart now that Unity has built in support for video playback.
     
  11. YKG

    YKG

    Joined:
    Mar 4, 2015
    Posts:
    3
    Hello.

    I found a problem while playing a video file using AVProVideo.

    AVProVideo loads the video file well.
    However, the video is not played back.
    I can not see any error callbacks.

    How do I handle exceptions to this problem?

    Below is a detailed description of the problem video file output to GOM Player.

    *** DIRECTSHOW FILTER LIST ***
    1. DirectSound Audio Renderer
    2. Enhanced Video Renderer(CP)
    3. GOM Audio
    4. GOM Video
    5. Gom Source Filter(avi)

    *** VIDEO INFO ***
    Input Type : XVID
    Input Size : 576 x 320
    Output Type : YV12
    Output Size : 576 x 320
    Decoder Type : GVC [mpeg4]
    FrameRate(Frame/sec) : 0.00 (23.98)

    ** Filter[Gom Source Filter]
    * pin [ (Video 1) mpeg4 576x320]
    - majortype : MEDIATYPE_Video
    - subtype : {44495658-0000-0010-8000-00AA00389B71}
    - formattype : FORMAT_VideoInfo2
    - bFixedSizeSamples : FALSE
    - bTemporalCompression : TRUE
    - lSampleSize : 552960
    - cbFormat : 180
    * VIDEOINFOHEADER2
    - dwInterlaceFlags : 0
    - dwCopyProtectFlags : 0
    - dwPictAspectRatioX : 9
    - dwPictAspectRatioY : 5
    - dwControlFlags : 0
    - biSize : 40
    - biWidth : 576
    - biHeight : 320
    - biPlanes : 1
    - biBitCount : 24
    - biCompression : 1145656920
    - biSizeImage : 552960
    - biXPelsPerMeter : 0
    - biYPelsPerMeter : 0
    - biClrUsed : 0
    - biClrImportant : 0

    Thank you.
     
  12. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Maybe someone one your team commented it out? Certainly isn't commented out here...
    To see which version you're using, just check the Console output, it'll print it there when you Play the scene. Otherwise you can also look in the Inspector in the "About" panel.

    Thanks,
     
  13. 785130190

    785130190

    Joined:
    May 11, 2017
    Posts:
    21
    My version is 1.3.9,debug info : "[AVProVideo] Initialising AVPro Video (script v1.3.9 plugin v1.3.9) on NVIDIA GeForce GTX 750/Direct3D 11.0 [level 11.0] (MT True)".
    I checked the code,it is commented out,and I can not open,or can not pass the compile.
     
  14. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Try upgrading to the latest version. 1.3.9 is very old. You can upgrade for free via the Asset Store.
    Thanks,
     
  15. coldstar

    coldstar

    Joined:
    Sep 20, 2014
    Posts:
    11
    Hi, I want to know if AVPro can update decoded frame to Render Texture. Thanks.
     
  16. IikkaDevelopingThings

    IikkaDevelopingThings

    Joined:
    Sep 8, 2017
    Posts:
    7
    Hey!

    I'm having a problem with video distortion with AVPro. Could you help me with what I need to do in order to get the 360 videos showing correctly? Here's a screenshot of the issue. On the left is how the video looks on the default windows video player, on the right is a screenshot of how it looks in AVPro. How do I get AVPro to show the video undistorted like on the left?

    I'm currently using the videosphere prefab and having the player camera inside it.
     

    Attached Files:

    Last edited: Sep 29, 2017
  17. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Yes, when it decodes the videos, the frames get rendered to a standard RenderTexture which you can access just like normal.

    Thanks,
     
  18. AndrewRH

    AndrewRH

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

    Is it a stereo video? If so, you may need to strip out the stereo metadata as this confuses our decoder. There is an FFMPEG command for this in the FAQ section of our PDF documentation.

    If it is not stereo then perhaps you could send us the video so we can figure out the issue?

    Thanks,
     
  19. AndrewRH

    AndrewRH

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

    I'm not sure what the issue is.
    Could you tell us:
    1) Your Unity version
    2) Your AVPro Video version
    3) Your Windows version
    4) Whether our sample videos play or not

    Also, have you tried changing the Video API setting (in MediaPlayer > Platform Specific > Windows) to DirectShow, or even to toggle the hardware decoding option for Media Foundation?

    Failing that, you could send us a copy of the video and the above information so we can look into it further.

    Thanks,
     
  20. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Hmm, yes it's not working for me. Are you using the latest version of Windows 10 (Creators Update)?

    Thanks,
     
  21. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Thanks for the suggestion, but we don't have any plans to add this feature. We have some other feature upcoming that will help to set us apart :) Maybe we can look at this afterwards.
    Thanks,
     
  22. coldstar

    coldstar

    Joined:
    Sep 20, 2014
    Posts:
    11
    Sorry, I didn't see this feature in the Trial version. What I want to do is that I have a created Render Texture and it's a asset, then how can I make MediaPlayer render on it? I can't find related information in AVProVideo-UserManual.pdf. I've tried ApplyToMaterial.cs, but it just grayed the screen.

    Can you give me some more hints?

    Thanks.
     
  23. dooyul_park

    dooyul_park

    Joined:
    Sep 20, 2017
    Posts:
    15
    Is it possible to adjust AVPro's streaming buffer size to make the Adaptive Bitrate Streaming vidoes stay with a higher resolution for longer amount of time?

    I looked up AVPro options but the only thing I've found was the one called 'Use Low Latency' which I believe is for less buffering and even with that thing turned off, the ABS videos changed the resolution pretty quickly to continue playing the video in low bandwidth. I prefer to keep high resolution even if that means the video should stop and start buffering.
     
  24. FriedrichSchadow1

    FriedrichSchadow1

    Joined:
    Oct 2, 2017
    Posts:
    1
    Problem description:

    Hello!
    In the build version of my project the videoplayer disappears. The videoplayer works perfectly fine as long as i start my project in the unity inspector, in the build however, its gonr.

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

    Windows 10, unity 2017.1

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

    im using a testvideo in mp4, about 1 minute long in 1080x720p

    System Information:

    AVPro Video: plugin v1.6.14 scripts v1.6.14
    Target Platform: Standalone
    Unity: v2017.1.1f1 WindowsEditor
    OS: Desktop - P65_67RSRP (XMG) - Windows 10 (10.0.0) 64bit - German
    CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 8 threads - 16267KB
    GPU: NVIDIA GeForce GTX 1070 - NVIDIA - Direct3D 11.0 [level 11.1] - 8078KB - 16384
     
  25. toripopo

    toripopo

    Joined:
    Sep 15, 2017
    Posts:
    6
    Hi Andrew.
    Yes, I'm using latest version of Windows 10.
     
  26. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    We didn't include a way to copy to a RenderTexture as this is an extra performance overhead and most people just use the RenderTexture provided by the plugin. If you want to do this though, it's easy. Simply create your RenderTexture object, then make a script that takes in that RT and the MediaPlayer as inputs. The Update() method can simply copy the contents of the one texture into the other, using (pseudocode) GraphicsBlit(_myRT, _mediaPlayer.GetTextureProducer().GetTexture();

    I hope that helps.
     
  27. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Currently we don't have any way to adjust the buffer size, or control which of the ABS streams gets rendered - it is handled by the operating system automatically based on network bandwidth. We are planning to add this first to Android soon and then will have to see about support on other platforms.

    Thanks,
     
  28. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Could you check what the player_log.txt file says? It may contain some error messages which will give a clue as to what is going on.

    Thanks,
     
  29. AxisUnity

    AxisUnity

    Joined:
    May 16, 2017
    Posts:
    12
    Hi, I was wondering what could cause the playback rate to not be able to be at or below 0 (as in negative value to play the video backwards or even just as a rewind feature that doesn't go back to the first frame). Even in the demo scenes I can't seem to be able to, it simply reverts back to a positive value. Could it be because of K-Lite Codec Pack or maybe by being on Windows 7(Unity version 5.6.1f1)?

    Also, it seems like the Seek function is having a hard time with 360 videos (the images take quite a while to update).

    After testing on Window 10 with the same Unity version, I was able to have a negative playback rate and it worked fine, except for 360 videos. I'm guessing the problem is similar to the Seek function problem since the slider does go backwards, but the image doesn't update. The problem might still be related to the codec pack and not the OS since I didn't have it on the machine with Windows 10, but my money would still be on OS.
     
    Last edited: Oct 3, 2017
  30. dooyul_park

    dooyul_park

    Joined:
    Sep 20, 2017
    Posts:
    15
    Hello. I'm trying to test AVPro 4k 360 videos with Adaptive Bitrate Streaming (.m3u8 format) capability.

    From the manual, I could see fixed bitrate video streaming of 4k 360 videos is supported. But when I tested .m3u8 4k url with AVPro, the resolution of the video never went up above 1365 x 720.

    The test pc has network bandwidth of 100Mbps. The test link is http://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8 This m3u8 file supports up to 3840x2160. I am aware of that this file's server may not be very performant to stream it eventhough my pc's bandwidth is enough.

    Does AVPro support 4k .m3u8 with highest resolution(360 or not)?
    If so then what is the recommended network bandwidth to play it without dropping the resolution?
     
    Last edited: Oct 4, 2017
  31. DarkMio

    DarkMio

    Joined:
    Feb 10, 2016
    Posts:
    7
    @AndrewRH would it be possible to expose the video chunk displayed on an HLS stream? After establishing the initial stream we would like to know which .ts chunk is currently displayed on stream to make some assumptions about the presentation-time of a running livestream.

    Looking through the media controls, it seems that (in our case AppleCoreMedia and NSPlayer) don't expose any of these infos. Looking through the http access logs, it's sometimes inconsistent which chunk is accessed first.

    Thank you very much
     
  32. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Yes, it does support up to 4K using HLS streaming. We have seen in some older versions of Windows 10 that it limits the stream resolution based on your monitor resolution. If you're running 1920x1080 monitor, then this made by what is happening.. In this case you either need to use a 4K monitor, or upgrade to the latest version of Windows 10.

    If this isn't the case then please let us know:
    1) AVPro Video version
    2) Unity version
    3) Your OS version (the exact version code)

    Thanks,
     
  33. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Yes, this is something we're currently looking into and hope to add to a new version soon. Are you looking for support on iOS or macOS or another OS? Also what do you mean by "make some assumptions about the presentation-time"?

    Thanks,
     
  34. dooyul_park

    dooyul_park

    Joined:
    Sep 20, 2017
    Posts:
    15
    Thank you for the quick reply!
     
  35. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    So in Windows 7 we use the legacy Microsoft DirectShow codecs for playback, but in Windows 10 we default to using the newer Media Foundation codecs. Both have different functionality. Negative playback is something that neither profess to be able to do very well. Most codecs don't support negative playback.

    If negative playback is supported, then the performance of that playback will depent on how the video is encoded. Most H.264 compression is optimised for forward playback by using B and P frames. You can optimise for negative playback by encoding without B frames, and using as few P frames as possible. This boils down to disabling B frames and having the GOP (gap between keyframes) as small as possible - ideally 1 or 2 frames. This will make the video file size a bit larger.

    The seeking issue the same issue. We have two functions for seeking - Seek() and SeekFast() the SeekFast() just seeks to the nearest keyframe, so it is not that accurate but it is fast. Seek() can seek to any point in time, but it can be slow if the position it is seeking to is very far from a keyframe - in this case internally it must render the video from the previous keyframe until it reaches this time, and this of course is very costly.

    I hope that helps.

    Thanks,
     
  36. SagarPatel

    SagarPatel

    Joined:
    Jan 23, 2014
    Posts:
    2
    Hi! Quick question about the Playback Rate / Resample feature.
    Currently doing playback at a rate slower than 1.0f seems to display individual frames, but I was hoping for a blended result (so that you get a smooth feel).
    I was digging around the MediaPlayer.cs code a little and it looks like there's some support for this via the Resampler.
    Forcing it on (and using LINEAR instead of default POINT) caused errors: it looks like it's missing a mat/shader --> "AVProVideo/BlendFrames" (Resampler.cs, line 107)
    Is this a feature that isn't ready yet or am I just missing some files somehow?
    Thanks!
     
  37. DarkMio

    DarkMio

    Joined:
    Feb 10, 2016
    Posts:
    7
    The base issue stems from calculating the presentation time of a stream. AppleCoreMedia and Windows Media Libraries assume the presentation time by summarising the remaining parts of the playlist - while ffmpeg reads the actual presentation time in the ts chunk.

    We're currently working on iOS and MacOS, but do use occasionally WinRT (Hololens), where a similar problem occurs.

    Assumptions about presentation time boils down that we have a service identifying objects in a stream and stream this data into a client. So we have to resync that data with the running stream which is currently impossible without writing a huge, long M3U8 playlist.
     
  38. nwxp

    nwxp

    Joined:
    Apr 4, 2017
    Posts:
    19
    Hello, I would be happy to have access to this Beta.
    I bought Windows edition, not sure about Android, but I would be happy to pay for Android too if I need to in order to access beta.

    Again, thanks for your wonderful work.
     
  39. AxisUnity

    AxisUnity

    Joined:
    May 16, 2017
    Posts:
    12
    It certainly has helped alot, thank you! I will be able to simulate a negative playback even if the user's codec doesn't allow it if the video is encoded with only 'I' frames and using Seek() or SeekFast(). On a side note, you might want to add a warning when someone tries to set a negative playback rate when it just gets reverted back to the old positive value.
     
  40. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    The resampler feature is in beta and not currently part of the exposed API so you shouldn't try to enable it :)
    It *may* help with what you're trying to do, but it wasn't written for that. Currently to support what you want to do, you would have to implement it yourself. So you would have to cache the texture for the previous frame, and display it using your own blend shader with the current frame...
     
  41. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    I'm afraid I still don't understand :) In any case, we don't expose any of the HLS streaming time data currently, so I'm not sure what else I can add to this. Let me know how else we can help.
     
  42. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Thanks :) We don't have any beta system currently so I'm afraid you'll have to wait for the release. Hopefully not too much longer now...
     
  43. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,652
    Yes good idea.. have added to the list. Thanks,
     
  44. AndrewRH

    AndrewRH

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

    AVPro Video version 1.6.15 has just been released!

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

    Changes include:

    Windows
    • Fixed an issue mainly affecting Windows mixed reality and VR headsets using “hybrid-gpu” mode where more than one GPU is available to the system
    • Fixed the WSA 8.1 x86 DLL that didn’t get recompiled since 1.6.12
    Thanks,
     
  45. DarkMio

    DarkMio

    Joined:
    Feb 10, 2016
    Posts:
    7
    I can elaborate further on it.
    We have a combined system that takes video frames and splits them to two services:
    - one recognises objects per frame
    - one recodes the stream to HLS

    The signal is only temporarily used, so both systems start occasionally at presentation-time 0. As I figured out, AppleCoreMedia calculates the presentation time based on the amount of chunks written into the M3U8 file. So, if you have 50 x 10s chunks in your M3U8 and AppleCoreMedia decides to play the 48. as entry point, it will report the presentation time of that 48th chunk as 48 x 10s = 8min. This might be incorrect, since it's possible to have a circular m3u8-list in which the oldest chunks get deleted and more recent appended, leading to a situation where AppleCoreMedia assumes the wrong presentation time, because it doesn't bother to read the presentation-time embedded in the .ts-chunk.

    One of our solutions, besides making long, long HLS lists is to read the currently displayed chunk, download it manually and parse the header ourselves. From there out on we can determine the offset between the reported time of AppleCoreMedia and the actual embedded presentation time.
     
  46. xpansivevr

    xpansivevr

    Joined:
    Jun 22, 2016
    Posts:
    27
    Hi there seems to be an issue with the 180 implementation where its stretching the projection vertically. I've tried my own footage and third party with the same result.

    I've tested 3840x1920 SBS and 1920x1920 mono both show the same issue.

    I've created my mono footage by taking a 180 degree 1920x1920 crop from an existing 360 equirectangular 3840x1920 comp.

    Cheers - Nick
     
    Last edited: Oct 6, 2017
  47. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    367
    I have a stupid request or a question.

    can AV Pro play ... images? :D

    I know this sounds retarded but I'm currently prototyping something and I'm using still images to test stuff. I had to convert the still imagest to mp4 files and ... I'm working currently like this.

    2nd Question:

    Is there a way to cross fade between videos?
    I have 1 sphere & multiple Media Players. I know which Media Player will be next & it's already loaded.
     
  48. PhilippeGe

    PhilippeGe

    Joined:
    Sep 17, 2017
    Posts:
    6
    Hi,
    I have used the trial version and find out that my video stereo file (2048x2048 top-down) is not playing really fluid especially when i turn my head. what could i improve that please? is there any buffer to modify? would it help to desable logging or debug GUI options? in order to improve the performance? thanks for your help. I watch the output on cardboard mode stereo 360
    thanks
     
  49. andwoo1

    andwoo1

    Joined:
    Feb 27, 2017
    Posts:
    6
    Hey AndrewRH,

    Do you have an ETA when the new HLS Android settings will be available? Will these new controls also be available for iOS?
     
  50. Tom-Goethals

    Tom-Goethals

    Joined:
    Mar 6, 2015
    Posts:
    96
    Setting VR... InputTracking.disablePositionalTracking = true; makes the stereo hit and miss, left and right eye seem to flip back and forth. (tested only on Oculus Windows Desktop)
     
unityunity