OpenCVForUnity
OpenCVForUnity copied to clipboard
VideoCapture fails on Android for HLS-URL
Hi,
I am trying to process individual frames of a HLS video stream, similar to your VideoCapture Example.
Using VideoCapture(...) to open the HLS URL works in Play Mode on my Windows 10 machine but after
building and running on my Android Tablet, it does not work anymore, videoCapture.isOpened() returns false there.
Is it generally possible to play HLS Stream on Android Tablet using your Asset? Do you have an idea why it might fail with my setup?:
Device: Samsung Galaxy Tab Active Pro (Modell: SM-T545) Android: 11 Unity: 2021.3.9f1 LTS (tried with 2020 LTS same issue) OpenCVForUnity version = opencvforunity 2.4.8 (4.6.0-dev)
I tried solutions from
-
https://forum.unity.com/threads/released-opencv-for-unity.277080/page-55#post-7427405 I copied opencv_videoio_ffmpeg460_64.dll to my project root directory
-
https://github.com/EnoxSoftware/OpenCVForUnity/issues/99 and https://github.com/EnoxSoftware/OpenCVForUnity/issues/43 My relevant build settings are
and

-
In your Example it says 'Please move from “OpenCVForUnity/StreamingAssets/” to “Assets/StreamingAssets/” folder' I did that, my Assets/Streamingassets looks like this:

Is this feature supported? The Stream URL comes from AWS Kinesis Video GetHLSStreamingSessionURL function, if that is relevant. Thanks in advance!
Unfortunately, HLS video stream is not supported on the OpenCVForUnity Android platform. Perhaps you need to get the video frames in another asset and then convert them to OpenCVForUnity's Mat. https://github.com/EnoxSoftware/VideoPlayerWithOpenCVForUnityExample https://forum.unity.com/threads/unity-video-player-hls-support.581719/