Welcome to Universal CCTV, an open-source project that empowers you to effortlessly transform any PC, laptop, or Raspberry Pi with a camera into a sophisticated CCTV IP device, offering seamless streaming and recording capabilities.
- Record high-quality videos with ease.
- Stream your camera feed effortlessly over the network.
- Effortlessly view and manage snapshots and recordings within the client interface.
Compatible with: Windows, Linux, and Raspberry Pi (Pi camera)
Tailoring your preferences is a breeze with Universal CCTV. Just follow these steps:
- Create a new file named
config_custom.json
in the project directory. - Mimic the structure of
config_main.readonly.json
and include only the fields/items you wish to customize.
- Recording:
h264
- Streaming:
h264
- Thumbnails:
jpeg
- Snapshots:
jpeg
Setting up on non-Windows machines may present some challenges due to licensing issues. Dive deeper into this topic here.
To navigate these challenges:
- Install the H264 decoder by following these instructions: Install H264 Decoder on Ubuntu
- Install Anaconda on Linux with this guide: Install Anaconda on Ubuntu
- Create a dedicated environment:
conda create --name UniversalCamera python=3
- Activate the environment:
conda activate UniversalCamera
- Install essential pip packages:
pip install -r requirements.txt
- Secure your setup with necessary Conda packages:
conda install --file condapackage.txt
Optional: - Elevate your experience with VLC for on-device viewing:
sudo apt-get install vlc
- Codec:
avc1
- Recording:
mp4
- Streaming:
jpeg
- Thumbnails:
jpeg
- Snapshots:
jpeg
- Codec:
avc1
- Recording:
mp4
- Streaming:
jpeg
- Thumbnails:
jpeg
- Snapshots:
jpeg
Not tested / no support
Initiating the Universal CCTV application is a breeze. Simply execute python main.py
and witness the transformation of your device into a surveillance powerhouse.
In your terminal, execute npm run build
to refine the client interface. This step is crucial after any client modifications to ensure a seamlessly integrated and visually appealing user experience.
Immerse yourself in the development process with a simple command: python main.py
in your terminal.
Embark on your client development journey with the following initial setup:
- Navigate to the Client directory.
- Execute
npm install -d
.
For an immersive development experience:
- Open a terminal.
- Navigate to the Client directory.
- Execute
npm run start
. - Access in web
localhost:3000
Note: Be sure to use port3000
as that is the development site if you wish to see live changes.
Note: Before committing any client changes, ensure you run npm run build
to incorporate the changes into the source control.
Remember to choose a camera resolution compatible with your webcam. I learned the hard way that silent failures in writing to a file can often be traced back to a resolution mismatch. In my case, my camera was only compatible with 1440x1080 and not 1920x1080.