FfmpegWithOpenCVForUnityExample
FfmpegWithOpenCVForUnityExample copied to clipboard
Example of integrating "FFmpeg for Unity" with "OpenCV for Unity"
Ffmpeg With OpenCVForUnity Example

Overview
- Integrate "FFmpeg for Unity" with "OpenCV for Unity".
- Replace WebCamTextureToMatHelper with FfmpegToMatHelper.
- Video from a network camera (distributed via RTSP) is received by ffmpeg, converted to OpenCV's Mat class, and image processing is performed.
Environment
- ATOM Cam Swing + atomcam_tools
- Windows / macOS / Linux / Android / iOS
- Unity >= 2021.3.35f1+
- Scripting backend MONO / IL2CPP
- OpenCV for Unity 2.5.9+
- FFmpeg for Unity 2.11.1+
- Runtime Inspector & Hierarchy 1.7.0+
- In-game Debug Console 1.5.9+
Setup
- Download the latest release unitypackage. FfmpegWithOpenCVForUnityExample.unitypackage
- Create a new project. (FfmpegWithOpenCVForUnityExample)
- Import and Setup OpenCV for Unity.
- Download Dnn model files by ExampleAssetsDownloader.

- Move the files from the "OpenCVForUnity/StreamingAssets/" folder to the "Assets/StreamingAssets" folder.

- Download Dnn model files by ExampleAssetsDownloader.
- 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.

ScreenShot
