.NET 8: Make sure to install the latest stable version of .NET 8. You can download it from the official .NET website.
-
FFmpeg: Download FFmpeg from the following link: FFmpeg Builds. Follow the instructions provided on the site to install FFmpeg on your machine.
Set FFmpeg Path: After installing FFmpeg, ensure to define the path to the FFmpeg executable in your system's environment variables so that it can be accessed globally. For example: once you get the zip folder, you need just to access the FFmpeg's bin folder and set its path to the system environment variables.
Full path Example "C:\Users\micha\Downloads\ffmpeg-2024-10-21-git-baa23e40c1-full_build\ffmpeg-2024-10-21-git-baa23e40c1-full_build\bin\ffmpeg"
There are two projects in the solution
- RemoteReps.ImageReceiver.WebApi
- RemoteReps.RTPSListener.Console
The first one is a basic Asp.Net Core web Api project that has a Hub configured on path: /hubs/image-receiver This hub contains a Method to be invoked in order to get the frame saved into the folder "received-images"
The second one is just a C# Console Application, it was crated to just receive frames from a RTSP connection, send the using websockets with SignalR.Client package and then, just wait a little to continue receiving the frames.
The RTSP source uri is configured under the configuration.json that is inside RemoteReps.RTPSListener.Console's root file system, that has Websocket source path configured as well.
{
"RtspSourceUrl": "http://pendelcam.kip.uni-heidelberg.de/mjpg/video.mjpg",
"WebSocketUri": "ws://localhost:5260/hubs/image-receiver"
}
All generated frames are going to be stored under the folder "received-images" that is based under the path: .\RemoteReps\src\RemoteReps.ImageReceiver.WebApi\received-images
After completing the prerequisites, clone this repository to your local machine.
https://github.com/mikerozendo/RemoteReps.git
cd RemoteReps
- Once the project is already on your local machine, you just need to set Multiple startup projects
- WebApi is the first one in the priority order because ConsoleApp is completely Dependent on WebApi websocket
- Start both projects at the same time and just keep it running for a while, you will notice that .\RemoteReps.ImageReceiver.WebApi\received-images will be populated continuously
Once both applications are kept alive, the received-images is going to be populated continuously