- Integrate "FFmpeg for Unity" with "OpenCV for Unity".
- Replace WebCamTextureToMatHelper with FfmpegToMatHelper.
- FFmpeg receives video from various supported input sources (such as RTSP, HTTP, HLS, or local files), converts it to OpenCV’s Mat class, and performs image processing.
- (Optional) ATOM Cam Swing + atomcam_tools
(can be replaced with any RTSP-compatible camera) - Windows / macOS / Linux / Android / iOS
- Unity 2021.3.35f1+
- Scripting Backend: Mono / IL2CPP
- OpenCV for Unity 3.0.0+
- FFmpeg for Unity 2.11.1+
- Runtime Inspector & Hierarchy 1.7.0+
- In-game Debug Console 1.5.9+
- Download the latest release unitypackage. FfmpegWithOpenCVForUnityExample.unitypackage
- Create a new project. (FfmpegWithOpenCVForUnityExample)
- Import and Setup OpenCV for Unity.
- Import and Setup FFmpeg for Unity.
- Import Runtime Inspector & Hierarchy.
- Import In-game Debug Console.
- Import FfmpegWithOpenCVForUnityExample.unitypackage.
- Set the URL of RTSPServer you wish to receive.
- Add the "Assets/FfmpegWithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
- Build and Deploy.