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. hectorCharter

    hectorCharter

    Joined:
    Aug 10, 2020
    Posts:
    2
    I am using The trial version of AVPro, and using wowza streaming server. Initially, I had everything working with a stream of 2k @ 30fps. When I switched to 4k @ 30fps, i receive the following error:

    [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources.
    UnityEngine.Debug:LogError(Object)
    RenderHeads.Media.AVProVideo.MediaPlayer:UpdateErrors() (at Assets/Libs/AVProVideo/Scripts/Components/MediaPlayer.cs:2111)
    RenderHeads.Media.AVProVideo.MediaPlayer:Update() (at Assets/Libs/AVProVideo/Scripts/Components/MediaPlayer.cs:1412)


    If I play the video as a direct reference, it works. any idea?

    My graphics card is a RTX Quadro 6000.
     
  2. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Hi,

    I don't know..Could you give more information about the file format and codec information of the 4K stream that's failing? It is using H.264 or HEVC?

    Thanks,
     
  3. hectorCharter

    hectorCharter

    Joined:
    Aug 10, 2020
    Posts:
    2
    @NathanRH The video I am streaming can be found here: http://bbb3d.renderfarming.net/download.html

    Right, now i am using the Standard 2D 4k @30fps, which should be using h.264. The stream currently supports:
    • MPEG-DASH
    • RTSP/RTP
    • Microsoft Smooth Streaming
    • Adobe HDS
    • Adobe RTMP
    • Apple HLS

    This is what I get back from VLC: Annotation 2020-08-13 100426.png
     
  4. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Hi,

    I'm afraid I don't have any ideas about why it's not working. I guess if the 2K version is working then you should try to see whether there are any differences between how they're set up. Your GPU is certainly capable of decoding both, so I can't see any fundamental reason for it to fail.. Without a stream to test I don't have any more suggestions. MPEG-DASH is supported on Windows, but different versions of Windows support different feature sets. Here is a able of those:

    https://docs.microsoft.com/en-us/windows/uwp/audio-video-camera/dash-profile-support

    Thanks,
     
  5. jsleek

    jsleek

    Joined:
    Oct 3, 2014
    Posts:
    60
    I used the exact command as you, and it does not play back fine. When the Unity Logo appears, I can still look around "360 Cardboard" style, (iPhone 8), but when the video actually starts, I can't look around anymore (the 360 functionality ceases to function). Any ideas why?

    I'm using OpenGLES 3 for the Graphics API (to get that Google Cardboard) support.

    Here's the full output logs from XCode:

    https://hatebin.com/wswuyshqbe
     
    Last edited: Aug 13, 2020
  6. blevok

    blevok

    Joined:
    Feb 16, 2017
    Posts:
    39
    Okay thanks, i submitted an issue about it.
    https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/443
     
  7. MorrisRH

    MorrisRH

    Joined:
    Nov 28, 2016
    Posts:
    4
    Not sure what's going on there. Just threw your video into our 360 sphere demo scene (modified slightly to work with cardboard) and playback was fine using both the OpenGLES2 and 3 APIs.

    Although I see you're serving it over http, you should add the following to the ffmpeg command so the movie can open more quickly:
    -movflags +faststart
     
    Last edited: Aug 14, 2020
  8. qq294716498

    qq294716498

    Joined:
    Jun 20, 2017
    Posts:
    4
    want The streaming video from the URL is saved locally after playing
     
  9. P3ndragonLLC

    P3ndragonLLC

    Joined:
    Sep 19, 2019
    Posts:
    33
    Hello again,

    I got the audio source to work using your guide, thanks (I have a perf issue that I need to solve that's causing some stutters, but I plan to address that and use the unity output in the future)

    Is it possible to play an ogg file from a resources folder or asset bundle?

    Thanks!
     
  10. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    I'm afraid we don't support this. If you want to cache the file locally you would have to manually download it and then play it from the local location.

    Thanks,
     
  11. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Glad you got it working :)
    OGG is not a file format we generally support - MP3 and AAC are much better supported.
    We also don't support playing content from AssetBundle - you could however extract the file yourself to a location on disk and then play it from there. Playing from resources folder again would only be supported if you saved the file to another location on disk after loading it from Resources as we don't support playing files direcrtly from the Resources API.

    Thanks,
     
  12. P3ndragonLLC

    P3ndragonLLC

    Joined:
    Sep 19, 2019
    Posts:
    33
    Gotcha, that makes sense, thanks!
     
  13. GilbertLau

    GilbertLau

    Joined:
    Dec 3, 2017
    Posts:
    26
    Hi, before I buy this. Would like to ask how AVPro compare with Unity Video Player on Android. I am developing a video app for some low end Android Machine (RK3399). In fact, I have a very bad frame rate using Unity Video player even the video is in 480p. I wonder if the AVPro can help improving the framerate in this case. Thanks.
     
  14. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Yes, I believe it can help on Android. You can try the free trial version which you can download here (1.11.4 is the latest non-trial version):
    https://github.com/RenderHeads/UnityPlugin-AVProVideo/releases/tag/1.11.4

    The plugin's Android playback is pretty fast, but there is also an OES mode (setting in the MediaPlayer component under the Platform Specific > Android section) which is even faster. Sadly the OES mode is not available in the trial, but the trial should give you a fair idea of performance even without it.

    Thanks,
     
  15. GilbertLau

    GilbertLau

    Joined:
    Dec 3, 2017
    Posts:
    26
    Thanks Nathan. I have bought the assets. It run perfectly on my windows Unity with watermark....
    However, when I built the 02_demo_imgui and run on android. I got the following errors. Nothing shown on the screen.

    SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 6, Memory = 1958mb
    08-28 12:04:11.153 26194 26210 I Unity : SystemInfo ARM big.LITTLE configuration: 2 big (mask: 0x30), 4 little (mask: 0xf)
    08-28 12:04:11.154 26194 26210 I Unity : Built from '2019.4/staging' branch, Version '2019.4.4f1 (1f1dac67805b)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
    08-28 12:04:11.452 26194 26210 D Unity : GL_EXT_debug_marker GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_texture_compression_astc_sliced_3d GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_
    08-28 12:04:11.452 26194 26210 D Unity : to_texture GL_OES_surfaceless_context GL_OES_texture_stencil8 GL_EXT_shader_pixel_local_storage GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_sRGB_R8 GL_EXT_texture_sRGB_RG8 GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_OES_texture_storage_multisample_2d_array GL_OES_shader_image_atomic GL_EXT_robustness GL_EXT_draw_buffers_indexed GL_OES_draw_buffers_indexed GL_EXT_texture_border_clamp GL_OES_texture_border_clamp GL_EXT_texture_cube_map_array GL_OES_texture_cube_map_array GL_OES_sample_variables GL_OES_sample_shading GL_OES_shader_multisample_interpolation GL_EXT_shader_io_blocks GL_OES_shader_io_blocks GL_EXT_tessellation_shader GL_OES_tessellation_shader GL_EXT_primitive_bounding_box GL_OES_primitive_bounding_box GL_EXT_geometry_shader GL_OES_geometry_shader GL_ANDROID_extension_pack_es31a GL_EXT_gpu_shader5 GL_OES_gpu_shader5 GL_EXT_texture
    08-28 12:04:11.453 26194 26210 D Unity : _buffer GL_OES_texture_buffer GL_EXT_copy_image GL_OES_copy_image GL_EXT_color_buffer_half_float GL_EXT_color_buffer_float GL_EXT_YUV_target GL_OVR_multiview GL_OVR_multiview2 GL_OVR_multiview_multisampled_render_to_texture GL_KHR_robustness GL_KHR_robust_buffer_access_behavior GL_EXT_draw_elements_base_vertex GL_OES_draw_elements_base_vertex GL_EXT_protected_textures
    08-28 12:04:11.574 26194 26210 I Unity : Script error: OnTriggerEnter
    08-28 12:04:11.574 26194 26210 I Unity : This message parameter has to be of type: [UNREGISTERED]
    08-28 12:04:11.574 26194 26210 I Unity : The message will be ignored.
    08-28 12:04:11.574 26194 26210 I Unity : (Filename: ./Runtime/Mono/MonoScriptCache.cpp Line: 265)
    08-28 12:04:11.574 26194 26210 I Unity :
    08-28 12:04:11.575 26194 26210 I Unity : Script error: OnTriggerExit
    08-28 12:04:11.575 26194 26210 I Unity : This message parameter has to be of type: [UNREGISTERED]
    08-28 12:04:11.575 26194 26210 I Unity : The message will be ignored.
    08-28 12:04:11.575 26194 26210 I Unity : (Filename: ./Runtime/Mono/MonoScriptCache.cpp Line: 265)
    08-28 12:04:11.575 26194 26210 I Unity :
    08-28 12:04:13.749 26194 26210 E Unity : AndroidJavaException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.XXX.TestTool-1/base.apk"],nativeLibraryDirectories=[/data/app/com.XXX.TestTool-1/lib/arm64, /data/app/com.XXX.TestTool-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]] couldn't find "libAVProLocal.so"
    08-28 12:04:13.749 26194 26210 E Unity : java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.XXX.TestTool-1/base.apk"],nativeLibraryDirectories=[/data/app/com.TeamBravo.TestTool-1/lib/arm64, /data/app/com.XXX.TestTool-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]] couldn't find "libAVProLocal.so"
    08-28 12:04:13.749 26194 26210 E Unity : at java.lang.Runtime.loadLibrary0(Runtime.java:984)
    08-28 12:04:13.749 26194 26210 E Unity : at java.lang.System.loadLibrary(System.java:1562)
    08-28 12:04:13.749 26194 26210 E Unity : at com.RenderHeads.AVProVideo.AVProMobileVideo.<clinit>(AVProMobileVideo.java:507)
    08-28 12:04:13.749 26194 26210 E Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    08-28 12:04:13.749 26194 26210 E Unity : at com.unity3d.player.UnityPlayer.access$300(Unknown Source)
    08-28 12:04:13.749 26194 26210 E Unity : at com.unity3d.player.UnityPlay
     
  16. GilbertLau

    GilbertLau

    Joined:
    Dec 3, 2017
    Posts:
    26

    I got it fixed. Got to go to plugin folder and set everything to ARM64
     
    NathanRH likes this.
  17. GilbertLau

    GilbertLau

    Joined:
    Dec 3, 2017
    Posts:
    26
    NathanRH,

    I encounter another issue. When I use this on an Android streaming video from a http server, the video looks fine. But the .Info.GetVideoFrameRate() always return -1. I have no such problem on Windows with exact the same code.

    What I am trying to do is get which frame the video is playing and do some overlay. I did use the frameIndex returned from Video player OnFrameReady event. What's the best way for me to do this in AVPro?
     
  18. mrvirtualworld

    mrvirtualworld

    Joined:
    Aug 29, 2020
    Posts:
    1
    Problem description:
    I want to play video on screen of projecter or in a wall of house but all the demos comming full skin video playing on screen
    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):
    only one video
    System Information:
    AVPro Video: plugin v1.11.4t scripts v1.11.4
    Target Platform: WebGL
    Unity: v2020.2.0a21 WindowsEditor
    OS: Desktop - Inspiron 5590 (Dell Inc.) - Windows 10 (10.0.0) 64bit - English
    CPU: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz - 8 threads - 7976KB
    GPU: NVIDIA GeForce MX250 - NVIDIA - Direct3D 11.0 [level 11.1] - 1983KB - 16384
     
  19. bramble-operations

    bramble-operations

    Joined:
    Aug 27, 2019
    Posts:
    3
    Hi, we are building something like a podcast app in Unity, where we'll need to play back and scrub audio only files.
    1. I'm wondering if this package is well suited to that purpose?
    2. This app will be cross platform (iOS and Android), would the best file format be MP3?
    Thank you!
     
  20. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Hi,
    1) Yes I believe playback and scrubbing audio files should be fine.
    2) I believe AAC is probably the best format, but MP3 would be next best.

    There is a free trial version for download so you can test it for yourself:
    https://github.com/RenderHeads/UnityPlugin-AVProVideo/releases/tag/1.11.4

    Thanks,
     
  21. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Yes, getting the video frame rate isn't supported on all platforms and for all media types.

    Yeah for knowing which frame is displaying you really need to know the frame rate. We have a helper function to convert the current time into the frame:

    Code (CSharp):
    1. int Helper.ConvertTimeSecondsToFrame(float seconds, float frameRate);
    So you can do:

    Code (CSharp):
    1. float seconds = mediaPlayer.Control.GetCurrentTimeMs() / 1000f;
    2. float frameRate = GetVideoFrameRate();
    3. if (frameRate < 0f) { frameRate = 30f; } // If frameRate is not known, then default to 30 or replace in another way
    4. int frame = ConvertTimeSecondsToFrame(seconds, frameRate);
    I hope that helps!
     
  22. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    There are some demos that map the video to meshes and materials via the ApplyToMaterial and ApplyToMesh components, so you should be able to use those.

    I hope that helps,
     
  23. WideWebVR

    WideWebVR

    Joined:
    Feb 1, 2019
    Posts:
    9
    Hello NathanRH,

    I've been using AVPro on Android VR devices for over a year now and it's been perfect so far.
    However now I'm trying to build an app on mobile that contains 360 videos (I'm using the same system as my VR applications with the 360 prefab from the asset).
    But it seems that it isn't running smoothly. I can still play 360 videos but sometimes it's either the video stops or it cannot load the video and all I can see is the unity skybox. I was wondering if there is a specific set up for mobile perfomances or I can just use the same as in VR.
    It is probably worth mentionning that all the videos are downloaded at runtime and my app is a succession of 360 videos in good quality.

    Here's a log of my error :
    Code (CSharp):
    1. 09-02 17:14:02.036: E/Unity(23769): [AVProVideo] Error: Loading failed.  File not found, codec not supported, video resolution too high or insufficient system resources.
    2. 09-02 17:14:02.036: E/Unity(23769): (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    3.  
    Thank you for your time,
    Cheers



    EDIT : That was actually my bad, I just forgot to Close the video once they've been ended.
     
    Last edited: Sep 2, 2020
    NathanRH likes this.
  24. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Okay glad you managed to solve it :)
    On Android for best performance try to use the OES mode where possible.

    Thanks,
     
  25. sbeachld

    sbeachld

    Joined:
    Jul 20, 2020
    Posts:
    2
    Hi All!

    Experienced developer here, but completely new to unity/c# and still learning some of the frameworks; currently looking for some assistance with AVPro (currently auditioning the trial).

    This seems to be the unofficial support thread, but let me know if I'm hijacking inappropriately.

    We're trying to extract a roughly 368px square from a 4K HLS stream, and read it as binary data for further processing.

    ExtractFrame() seemed really expensive, and the ExtractFrameAsync() call seems to hang my project and throw an error in the demo scene after the first frame so I've abandoned trying to get that to work.

    I've tried casting MyMediaPlayer.TextureProducer.GetTexture() as both a Texture2D and RenderTexture and if assigned to a public variable they appear in the inspector... But GetPixels() and GetPixels32() either returns all Black or all Grey.
    Our currently (working) code is along these lines:

    Code (CSharp):
    1.  
    2. Texture InputTexture = MediaSource.TextureProducer.GetTexture();
    3. if (InputTexture != null) {
    4.     int SquareSize = 368; //changes per resolution, tbd after optimizations
    5.     RenderTexture ToRenderTexture = new RenderTexture(InputTexture.width, InputTexture.height, 32);
    6.     Graphics.Blit(InputTexture, ToRenderTexture);
    7.     RenderTexture.active = ToRenderTexture;
    8.     Texture2D ToTexture2D = new Texture2D(SquareSize, SquareSize, TextureFormat.RGBA32, false);
    9.     ToTexture2D.ReadPixels(new Rect(0, InputTexture.height - SquareSize, SquareSize, SquareSize), 0, 0);
    10.     ToTexture2D.Apply();
    11.     if (ToTexture2D != null) {
    12.         var pix = ToTexture2D.GetPixels32();
    13.         //... use the data ...
    14.     }
    15. }
    16.  
    In basically all instances we can't seem to get this to run at more than 8fps without spinning it off into a coroutine and yielding tons of frames back (and that only gets us about 20 on my machines). This is the case with both ExtractFrame() or the above. But when I simply cast the texture it runs fast as hell (albeit with nothing coming out in GetPixels).

    Is this just the nature of the beast? Is there a way to use the texture pointer to get at the raw byte data of the texture inside the plugin and just grab the ranges I need?

    Currently developing on both Mac Catalina and Windows 10 with version 2020.1.3f1.
     
  26. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Hi,

    Yes we do handle support here, but the best place is on our GitHub as it's only me here, but on GitHub the whole mean monitors it:
    https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues

    Basically grabbing memory from GPU to CPU is a huge bottleneck as the entire GPU pipeline is stalled as it must be flushed. The ExtractFrame methods aren't meant to be used in real-time - they're designed more for people that want to extract a frame for a thumbnail.

    If you call ReadPixels() in Unity it will cause a stall - this is a very slow function.

    Unity address this by adding AsyncGPUReadback:
    https://docs.unity3d.com/ScriptReference/Rendering.AsyncGPUReadback.html

    There is a good example of it's use here:
    https://github.com/keijiro/AsyncCaptureTest/blob/master/Assets/AsyncCapture.cs

    I'm not sure why your code is returning black/grey - but it looks very similiar to our Helper.
    GetReadableTexture() function as a reference (in Interfaces.cs)

    I'm afraid we don't have any methods for that - we always upload directly to GPU texture, so you would need to extract from that. There is a demo scene "06_Demo_FrameExtract" that you could also look at to make sure our basic FrameExtract() methods are working.

    For performance though you would need to modify these to use the async readback methods though.

    I hope that helps you.

    Thanks,
     
  27. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    84
    I was hoping to use avpro to capture some test footage at 3084x1920 or at least get the demo 360 project to work.

    The other demo project 12 was a bit more hopeful but still did not work. How do i get past the directdraw limitation of 1920 by 1080?

    Problem description:
    i am trying to test how high a resolution I can go with 360 skyboxes in unity,
    i load up the 13 demo 360 and all i see is a blank screan.
    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):
    3084x1920 is my target resolution from a samsung gear 360 2016.
    System Information:
    AVPro Video: plugin v1.11.4 scripts v1.11.4
    Target Platform: Metro
    Unity: v2019.4.8f1 WindowsEditor
    OS: Desktop - All Series (ASUS) - Windows 7 (6.1.0) 64bit - English
    CPU: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz - 8 threads - 16319KB
    GPU: NVIDIA GeForce GTX 960 - NVIDIA - Direct3D 11.0 [level 11.0] - 1960KB - 16384
     
  28. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Hi,

    Yes since you are on Windows 7 you are limited to the DirectShow video API. This has a limitation of 1920x1080 for the H264 decoder in AVPro Video 1.x. AVPro Video 2.x (upcoming currently in beta) has a way to overcome this limitation. A workaround is to install a 3rd party decoder - we recommend LAV Filters or to use Windows 8 or newer. You could also try the beta version of AVPro Video 2.x which is downloadable from here:
    https://github.com/RenderHeads/UnityPlugin-AVProVideo/releases

    Thanks,
     
    Feartheway likes this.
  29. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    366
    Hi there! Can i download 360 video from youtube and play it like 360 in your asset?
     
  30. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    AVPro Video doesn't have any support for downloading from YouTube, but apparently there are ways to do this that creates a HLS stream which can be played. This isn't something we have tried, but there is a free trial version you can download if you wish to test this:
    https://github.com/RenderHeads/UnityPlugin-AVProVideo/releases/tag/1.11.4

    Thanks,
     
  31. viniciolindo

    viniciolindo

    Joined:
    Feb 12, 2015
    Posts:
    1
    Problem description:
    hi,
    i'm looking to listen audio of my hap video file in windows but i cannot understand why
    i can't why h264 video and media foundation i have no issue.
    i understand that i have to insert string in force audio output device name but i cannot understand where take this string
    thanks
    Device (which devices are you having the issue with - model, OS version number):
    windows 10
    Media (tell us about your videos - number of videos, resolution, codec, frame-rate, example URLs):
    4k resolution 30 frame
    System Information:
    AVPro Video: plugin v1.11.1 scripts v1.11.3
    Target Platform: Standalone
    Unity: v2018.4.26f1 WindowsEditor
    OS: Desktop - XPS 17 9700 (Dell Inc.) - Windows 10 (10.0.0) 64bit - Italian
    CPU: Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz - 16 threads - 16096KB
    GPU: NVIDIA GeForce RTX 2060 with Max-Q Design - NVIDIA - Direct3D 11.0 [level 11.1] - 5980KB - 16384
     
  32. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
  33. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    So your question is, you want to play back Hap videos, so you're using the DirectShow video API, but the audio isn't playing?

    Well you shouldn't need to specify the audio output device name - it will just use the default audio device. What encoding codec is your audio using? DirectShow is quite an old API so it doesn't support codecs like AAC for example. So if you're using this you would either need to transcode your video to use MP3 or PCM (uncompressed) audio format, or add a 3rd party codec such as LAV Filters.

    Thanks,
     
  34. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    366
    I mean can i play downloaded (by myself) 360 video from youtube?
     
  35. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    I believe so, but this isn't something we have tested. Our player supports HLS and MPD streams, and supports mono and stereo 360 content, in equirect and cubemap 3x2 formats.

    Best to try the trial version if you want to make sure it suits your purposes.

    Thanks,
     
    justtime likes this.
  36. olemidt1

    olemidt1

    Joined:
    Mar 22, 2018
    Posts:
    4
    Hello,

    We are looking at using AVPro Video for a multiplatform project we are working on. We are using Dissonance Voice for voice communication, and as someone has already brought up this seems to cause a conflict when building for UWP. I'm currently looking into it still, but have you got any more info about this issue? I saw that unfortunately there was no follow-up from the person with the previous issue.

    Ole
     
  37. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Hi Ole,

    I see this was mentioned before here:
    https://forum.unity.com/threads/rel...playback-solution.385611/page-65#post-4431211

    Some questions:

    1) Which version of Dissonance and AVPro Video are you using?

    2) What exactly happens? Is there an error message?

    3) Which version of Unity are you using?

    4) Does it make any difference if you build in a different configuration (eg Development build, Mono vs IL2CPP etc)?

    5) Which version of UWP are you building for? I guess it's UWP 10...

    6) Are you able to ask the Dissonance guys if they know?

    7) If you have a simple reproducable case could you email it to our product support address (listed at www.renderheads.com/contact/) with a reference to this thread so someone on our team can replicate it and begin investigating?

    8) Have you tried with the AVPro Video Beta 2.0? It's the next version we're working on, and I wonder if perhaps it will behave better - this may give us a clue as to the problem.
    https://github.com/RenderHeads/UnityPlugin-AVProVideo/releases/tag/2.0.0beta4

    Thanks,
     
    olemidt1 likes this.
  38. BjoUnity3d

    BjoUnity3d

    Joined:
    Jul 24, 2012
    Posts:
    42
    I just upgraded AVPro to the latest version. Now I get this error: EntryPointNotFoundException: AVPPlayerGetNaturalSize and my MediaPlayerEvent.EventType.FinishedPlaying event is not firing.

    I have found this issue marked closed 3 days ago - but it's still happening and I just upgraded the plugin yesterday: https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/221

    This is part of a project that has been running ads for the past 2 years with perfect consistency and always we used the finished event to close out the ad and continue the game. Now the first try with the updated version and the event doesn't fire and the video is just sitting on the last frame. We only upgraded the plugin version because we were getting a massive number of crash reports on Android devices from expoplayer2 - now I'm at a loss as to what to do. We're supposed to publish a fix for the exoplayer2 crashes today but the new plugin seems to introduce an even worse problem (no FinishedPlaying event)

    [Additional issue: In the editor the video is black until I Pause and Unpause Unity - this is also new since updating to the latest version]
     
    Last edited: Sep 15, 2020
  39. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Hi,

    In order for us to investigate we need more information:

    1) Which version of Unity are you using?
    2) Which version of AVPro Video did you upgrade to (it will print it to the Console Window)?
    3) Do you know which version of AVPro Video you upgraded from?
    4) AVPPlayerGetNaturalSize() is a function on the Apple platforms - are you on macOS?
    5) Are you not getting the FinishedPlaying event in the editor (macOS)?

    For the best chance of a fix it's always best to send the issue to our Github issues as that is where our support team look for issues.
    https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues

    Thanks,
     
  40. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    It sounds as though the upgrade didn't complete correctly. This can happen sometimes if the files become locked by the OS. You should try closing Unity, opening Unity and then immediately try importing the upgrade AVPro Video package again. Hopefully it should then upgrade correctly. If that still fails, then try removing AVPro Video manually and then reimporting it.

    The latest version is 1.11.4, and there is also a beta of 2.0 which you shouldn't be using.

    Thanks,
     
    BjoUnity3d likes this.
  41. BjoUnity3d

    BjoUnity3d

    Joined:
    Jul 24, 2012
    Posts:
    42
    Thanks for your reply.
    1) 2019.4.7 LTS
    2)[AVProVideo] Initialising AVPro Video (script v1.11.4 plugin v1.11.4) on AMD Radeon Pro 575 OpenGL Engine/OpenGL 4.1 ATI-3.10.16 (MT True) on OSXEditor Mac OS X 10.15.6
    3) It was something like 1.9 (Jan 2019 I think)
    4) Yes macOS
    5) I've only tested in editor so far.

    UPDATE: I restarted Unity and all 3 problems seem to be resolved *whew*. No more exception being thrown, video isn't black screen, and Finished event is firing. I guess after updating the plugin you need to restart Unity.

    UPDATE 2: Next step, fix the ARM64 problem with missing libraries in Plugins/Android/libs/arm64-v8a not being set to Android and ARM64 in the plugin inspector! :)
     
    Last edited: Sep 15, 2020
    NathanRH likes this.
  42. blevok

    blevok

    Joined:
    Feb 16, 2017
    Posts:
    39
    Indeed. I've noticed that for the last few months, i have to set the platform for all those files in the plugins folder after every update. This is probably pretty annoying for new users to figure out, and i would guess that it's hurting sales.
     
  43. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    Yes thanks, it's because we have to keep compatibility with older versions of Unity.

    We have AVPro Video 2.0 now which drops support for older Unity's and it no longer has this issue on ARM64. It's currently in beta though but should be out soon.
     
  44. SomaRealityGmbH

    SomaRealityGmbH

    Joined:
    Feb 20, 2019
    Posts:
    3
    Is it possible to use the "Display uGUI" component without a canvas? or any other method to use a media player without canvas? i would like to project a video on a 3D element, but i'm having troubles with the canvas dependency.
     
  45. Arkonis_Khobalt

    Arkonis_Khobalt

    Joined:
    May 11, 2017
    Posts:
    8
    Hello guys, sorry to bother you with (probably) such a basic problem, but whatever I tried I'm unable to play videos on Hololens 2.
    My app is very basic : it only has a set of buttons that will pop up a screen and play a video on click (the button calls a method that defines the m_VideoPath, OpenVideoFromFile, and calls Control.Play).
    The media path is set on "relative to streaming assets" in the MediaPlayer instance, and is once again set to this value in the Start() method of my button manager just to be double sure.
    All the different videos play as intended in Editor. But when I play the built app on Hololens 2, every button now only plays the first video in the folder.

    I think it might be a problem with StreamingAssets usage on Hololens 2 because some of these buttons open pdf files which also are in the StreamingAssets folder with Paroxe's pdf renderer and none of the files are detected either.
    I used Directory.GetFiles to ensure that the files really were copied to the headset, and after checking everything is in place.
    If anyone ever encountered a similar problem, help would be greatly appreciated :)
    I'm latest windows 10, unity 2019.3.15, visual studio community 2019, AVPro Video 1.11.2, and a brand new hololens 2.
     
    Last edited: Sep 17, 2020 at 2:09 PM
  46. SIV

    SIV

    Joined:
    May 7, 2014
    Posts:
    189
    Hello,

    Is this plugin only to stream videos from external folders ? cant we bundle it with the export/build ?
     
  47. frangagn

    frangagn

    Joined:
    Sep 20, 2018
    Posts:
    25
    I'm trying to extract thumbnails for the users to see the videos in his/her collection. However, the process of extracting thumbnail, async or not, freezes the game. Attached is my code for the thumbnail extractor, very similar to your code in the demos. This code is called like this:

    if (!ThumbnailExtractor.Instance.isBusy)
    {
    Debug.Log("Getting Thumb for " + fullpath);
    ThumbnailExtractor.Instance.ExtractThumbnail(fullpath, AssignImage);
    requested = true;
    }


    and AssignImage is:

    public void AssignImage()
    {
    Thumbnail.texture = ThumbnailExtractor.Instance.ReturnedTexture;
    ThumbnailExtractor.Instance.thumbnailPickedUp = true ;
    }


    Relatively straightforward.

    So why is it freezing the game? Any way of doing this in another thread?
     

    Attached Files:

  48. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    the "Display uGUI" component is specially for the canvas.

    We have other components that you can use:

    Display IMGUI - displays an overlay on the screen (no canvas required)
    ApplyToMesh - applies the video to the materials on a mesh
    ApplyToMaterial - applyies the video to a global material

    If you want to project the video in 3D then you probably want to use ApplyToMaterial

    I hope that helps,
     
  49. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    First thing to check - are you able to play back any of our demo scenes on the device? Try the 08_Demo_360SphereVideo.

    If you aren't, then try to check the error log for any clue to the problem. One reason might be that it can't find the ARM64 plugin files - so you can go to /Assets/Plugins/UWP/ARM64 folder in Unity and click on each of the files in there and make sure it is assigned to the UWP platform and the correct CPU architecture.

    Thanks,
     
  50. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    283
    It can play bundled videos, but they must be included in the StreamingAssets folder. Playing from assetbundle files is not supported. On Android however we have a feature to load a file from within a file (using an offset), which can help hide media files.

    Otherwise it can also play files from external folders or URLs.

    Thanks,
     
unityunity