Skip to content

Lab Setup

Miiden edited this page Jan 9, 2026 · 8 revisions

Pre-Requisites

Windows 10/11 Eval Virtual Machine At least 2 MP4 file to test the streams (Try for a minimum length of 30mins)

Required Software

ffmpeg

Install this to the default directory:

C:\ffmpeg\bin\ffmpeg.exe

IPCameraEmulatorSTD.exe

This simple tool allows us to run a RTSP stream on a specified port (Default: 554) with no authentication. I Installed this to the users desktop

C:\Users\cctv\Desktop\CamEmu

VLC Media Player

If following along with the readme from the IpCameraEmulator GitHub page, you will need the following to run the executable, as such you might as well install VLC.

Note you will need to make a copy of the following files from the (32-bit) VLC application folder and place them in the same folder as the IpCameraEmulatorStd binaries,

  • libvlc.dll
  • libvlccore.dll
  • the entire "plugins" folder
  • The ones from VLC version 2.2.6 and 1.1.9 seem to work well.

MediaMTX

This is a highly customizable tool that allows us to set up a server and use fmmpeg to stream an MP4 file via RTSP. This tool is used as it allows another stream on another port (We will use: 8554) with either Basic or Digest authentication types, along with allowing us to use custom credentials.

Again, this went on the desktop

C:\Users\cctv\Desktop\MediaMTX

Wireshark

In this instance we will only be using the rstp filter to see all of the packets if required. Install using the default settings.

Setup

Camera 1

The first RTSP stream on this lab will be on the default port of 554, with no authentication.

Run the IpCameraEmulatorStd.exe binary and press Add to start creating the first stream.

CamEmuSettings

  1. Name the Channel (Whatever you want)
  2. Select your first MP4 video file
  3. Use RTSP Port 554
  4. Ensure Stream is set to Enabled
  5. Add

Once this is added, select the stream and press start This will start streaming the MP4 file on port 554 with no authentication, you can test the stream from your host machine in VLC. From VLC on your host machine open the media menu and connect to a network stream using the following:

rtsp://<ip>:554/

Ensure the trailing / is included.

Camera 2

Download the latest release of MediaMTX from the GitHub Releases page, ensuring to select the windows zip file. Extract the contents into a new folder on the Virtual machine, i used the desktop.

Ensure ffmpeg is intalled as previously directed, and that the exe is located in:

C:\ffmpeg\bin\ffmpeg.exe

Copy MiiStream.ps1 to the same folder and open it in your chosen editor, I used notepad++ for this. On line 26, ensure that it points to the location of your mediamtx.exe binary, mine is as follows:

C:\Users\cctv\Desktop\MediaMTX\mediamtx.exe

On lines 30 and 32 we will find the connection settings these are the lines that need to match the mediamtx.yml

			start-process powershell -ArgumentList "-noexit -command ""C:\ffmpeg\bin\ffmpeg.exe -re -stream_loop -1 -i ""C:\CCTV-Stream\videostream.mp4"" -c copy -f rtsp ""rtsp://${Creds}@localhost:8554/$Path"""""	
		} else {
			start-process powershell -ArgumentList "-noexit -command ""C:\ffmpeg\bin\ffmpeg.exe -re -stream_loop -1 -i ""C:\CCTV-Stream\videostream.mp4"" -c copy -f rtsp ""rtsp://${Creds}@localhost:8554/"""""	
			}

Ensure that the ffmpeg binary location is correct on these lines, and that a MP4 file that is different from the first camera is targeted. The port here can also be changed but it will need to be reflected in the mediamtx.yml also. for now we are leaving it at 8554

There is a copy of the mediamtx.yml file i used in Lab/mediamtx.yml

Open your local copy of mediamtx.yml and check the following lines for the main configuration:

  • Line 64: "user: service"
  • Line 66: "pass: service"
  • Line 167: "rtspAddress: :8554"
  • Line 189: "rtspAuthMethods: [digest]"

Line numbers here reflect the lines found in Lab/mediamtx.yml yours may differ.

Clone this wiki locally