- Integrate FFmpeg for Unity with OpenCV for Unity.
- 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 from FfmpegWithOpenCVForUnityExample.unitypackage.
- Create a new project. (ex. 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 all of the
***.unity
files in theFfmpegWithOpenCVForUnityExample
folder toBuild Settings
→Scenes In Build
. - Build and Deploy.