Description
I'm using AVPro to visualize a video streaming coming from a locally hosted RTMP server. I got it working using the Direct Show API and LAV Filters, I just have to open rtmp://localhost in a MediaPlayer and it instantly starts, smooth as butter. The problem is that if I try to open a RTMP url when the server is running BUT the streaming is not ready yet (i.e. a device (I'm using a GoPro) is not pushing its stream to the server yet) then AVPro will hang for ~20 seconds, because it waits for an internal call (WindowsMediaPlayer.Native.OpenSource) while running on the main thread. Is it possible to open the media in a secondary thread or to have a timeout? The issue looks similar to this one but I don't think I can enable the "fast start" in this case.
My setup
Unity version: Unity 2021.1.0f1
AVPro Video version: 2.0
Operating system version: Windows 10
Video specs (resolution, frame-rate, codec, file size): RTMP streaming
To Reproduce
Setup a MediaPlayer with Direct Show and LAV Filters
Run Monaserver.exe to start the RTMP server without pushing any stream
Open rtmp://localhost in the MediaPlayer. It will throw an error after 20 seconds of freeze
Description I'm using AVPro to visualize a video streaming coming from a locally hosted RTMP server. I got it working using the Direct Show API and LAV Filters, I just have to open rtmp://localhost in a MediaPlayer and it instantly starts, smooth as butter. The problem is that if I try to open a RTMP url when the server is running BUT the streaming is not ready yet (i.e. a device (I'm using a GoPro) is not pushing its stream to the server yet) then AVPro will hang for ~20 seconds, because it waits for an internal call (
WindowsMediaPlayer.Native.OpenSource
) while running on the main thread. Is it possible to open the media in a secondary thread or to have a timeout? The issue looks similar to this one but I don't think I can enable the "fast start" in this case.My setup
To Reproduce