RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
226 stars 28 forks source link

Mac livestream has a black screen and seems to not be launching #1246

Closed Timohjh closed 1 year ago

Timohjh commented 1 year ago

Problem description:

I'm trying to play a livestream through avpro 2.2.3 and it's not loading the video on Mac (os 10.15.7). Windows (VR + third person) and Android are both working as supposed to. There are multiple other mediaplayers playing a local video in the scene, but they aren't affecting the app on other devices. I've tested both texture formats and played around with the settings and bitrate. Usually the sound starts playing and the video stays black, but after waiting ~15 min and re-entering the scene, the video sometimes starts to play too. Has this issue been tackled in newer versions or is there a way to fix it?

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

Macbook pro (os 10.15.7)

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

Video is .m3u8 video through AWS

System Information: AVPro Video: v2.2.3 (plugin v2.2.2f1-ultra) Target Platform: Standalone Unity: v2019.4.16f1 WindowsEditor OS: Desktop - All Series (ASUS) - Windows 10 (10.0.0) 64bit - German CPU: Intel(R) Core(TM) i7-5930K CPU @ 3.50GHz - 12 threads - 32668KB GPU: NVIDIA GeForce GTX 980 Ti - NVIDIA - Direct3D 11.0 [level 11.1] - 6097KB - 16384

Chris-RH commented 1 year ago

Hi @Timohjh,

What happens when you try to open just that video using the MediaPlayer demo? Could you get a log while doing this? Have you tried playing different videos from there? Smaller resolution/lower framerate perhaps and if so what is the result? Have you read our section on streaming: https://www.renderheads.com/content/docs/AVProVideo/articles/feature-streaming.html#macos--ios--tvos How are your videos encoded? There is a lot more info here (https://developer.apple.com/documentation/http_live_streaming/http_live_streaming_hls_authoring_specification_for_apple_devices). Have they perhaps been encoded incorrectly or are you lacking the correct codec to be able to view it on your Mac?

Timohjh commented 1 year ago

I tried everything from changing obs settings to trying to seek back to the first frame, but only thing that somewhat helped was to set the bitrate in obs to 400. Even then the video would start only about 70% of the time when entering the scene. The scene has 360 videos that are also streamed through aws and they still are working normally. They do take around half a second longer to start than on windows, but I think it could be because the Mac uses wifi. There's a duplicate mediaplayer of the livestream player, which is playing a local video and it's working and starting normally.

In version 2.5.3's change log, it says that on Mac "Fixed issue with FirstFrameReady event not being triggered due to delayed start of video track causing no frames to be generated". Could this be tackling the issue that I'm facing. Also I can't update avpro to the newest version to test it, but I was able to upgrade it to 2.4. The download button stays disabled, but the version number inside package manager's download page says that the version is 2.5.7. Admin of the organization can only assign me the 1.x version in the Unity dashboard. Is this a Unity issue or do you have any idea how I could upgrade the version?

Chris-RH commented 1 year ago

It could well be that update that fixes the issue. There does seem to be issues with package manager in some versions of Unity. I found this thread, in which some users offer solutions, it might be worth a read. https://forum.unity.com/threads/package-manager-not-showing-latest-version-from-asset-store.791718/

Timohjh commented 1 year ago

I got it working finally! I believe that v2.5.3 had the fix. I was able to upgrade the version using the thread you linked. Thanks for the help!

Chris-RH commented 1 year ago

Awesome, I'm so glad to hear that, thanks for letting me know :)