Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoCapture fails on Android for HLS-URL #151

Open
hellovertex opened this issue Sep 15, 2022 · 1 comment
Open

VideoCapture fails on Android for HLS-URL #151

hellovertex opened this issue Sep 15, 2022 · 1 comment

Comments

@hellovertex
Copy link

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

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

  2. unity android arm64 failed #99 and Video feed issue on IL2CCP  #43
    My relevant build settings are
    grafik
    and
    grafik

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

Is this feature supported?
The Stream URL comes from AWS Kinesis Video GetHLSStreamingSessionURL function, if that is relevant. Thanks in advance!

@hellovertex hellovertex changed the title HLS-Stream on Android using VideoCapture VideoCapture fails on Android for HLS-URL Sep 16, 2022
@EnoxSoftware
Copy link
Owner

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants