https://github.com/enoxsoftware/ffmpegwithopencvforunityexample
Example of integrating "FFmpeg for Unity" with "OpenCV for Unity"
https://github.com/enoxsoftware/ffmpegwithopencvforunityexample
atomcam ffmpeg opencv rtsp unity
Last synced: about 1 year ago
JSON representation
Example of integrating "FFmpeg for Unity" with "OpenCV for Unity"
- Host: GitHub
- URL: https://github.com/enoxsoftware/ffmpegwithopencvforunityexample
- Owner: EnoxSoftware
- Created: 2023-02-28T19:03:31.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-06T15:22:05.000Z (over 2 years ago)
- Last Synced: 2025-05-05T15:09:44.289Z (about 1 year ago)
- Topics: atomcam, ffmpeg, opencv, rtsp, unity
- Language: C#
- Homepage:
- Size: 1.51 MB
- Stars: 30
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://www.atomtech.co.jp/products/atomcamswing) + [atomcam_tools](https://github.com/mnakada/atomcam_tools)
- Windows / macOS / Linux / Android / iOS
- Unity >= 2021.3.35f1+
- Scripting backend MONO / IL2CPP
- [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088?aid=1011l4ehR) 2.5.9+
- [FFmpeg for Unity](https://github.com/MUMEI-NON906/FfmpegUnityDocs) 2.11.1+
- [Runtime Inspector & Hierarchy](https://assetstore.unity.com/packages/tools/gui/runtime-inspector-hierarchy-111349) 1.7.0+
- [In-game Debug Console](https://assetstore.unity.com/packages/tools/gui/in-game-debug-console-68068#releases) 1.5.9+
## Setup
1. Download the latest release unitypackage. [FfmpegWithOpenCVForUnityExample.unitypackage](https://github.com/EnoxSoftware/FfmpegWithOpenCVForUnityExample/releases)
1. Create a new project. (FfmpegWithOpenCVForUnityExample)
1. Import and Setup [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088?aid=1011l4ehR).
* Download Dnn model files by ExampleAssetsDownloader.

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

1. Import and Setup [FFmpeg for Unity](https://github.com/MUMEI-NON906/FfmpegUnityDocs).
1. Import [Runtime Inspector & Hierarchy](https://assetstore.unity.com/packages/tools/gui/runtime-inspector-hierarchy-111349).
1. Import [In-game Debug Console](https://assetstore.unity.com/packages/tools/gui/in-game-debug-console-68068#releases).
1. Import [FfmpegWithOpenCVForUnityExample.unitypackage](https://github.com/EnoxSoftware/FfmpegWithOpenCVForUnityExample/releases).
1. Set the URL of RTSPServer you wish to receive.

1. Add the "Assets/FfmpegWithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
1. Build and Deploy.

## ScreenShot

