So here is how I set up a cheap video security system,
My main goals were to have no wires, Some what good video quality, Small file size, cheap.
For camera choice I went with Aliexpress chinese special.
I got 4X of this in wifi 1080p with power adapter.
I got 2 for outdoors, 1 for in the garage and 1 for in the computer room.
Setting them up was a bit of a pain with badly translated enlish instructions and having to use the phone app.
But a basic run down was. Make account in phone app. Connect phone to your wireless network you will use the cameras on.
Hold down reset button on camera and count time frame stated in instructions since it wont beep like it says it will.
Connect phone app to the camera wifi name then it transferes over your wifi settings so camera can connect to your network.
From there on you can set up RTSP and the static IP of the camera.
Next up was finding a recording software which fit my other needs. I could of used there built in cloud or memory card options but I didnt want to pay for a account. Or have to use there app to view older videos. And using a memory card has nothing to stop some one just smashing and taking the camera.
I tried a few but free ones failed to meet the good quality to file size requirement I had.
So I settled on OBS of all things,
It had 2 major advantages which were.
It could use GPU encoding, And that it could also stream video.
It also had 1 major disadvantage tho and thats in its RTSP support is pritty poor so all it takes is 1 bad packet and it will drop the stream.
To over come this issue I made a little program that scans for what IP address are connected to the computer.
If it sees a IP address of the RTSP stream has dropped then it will use the shortcut keys for OBS to restart that media source.
I have attached a copy of that program for any one that wants to use it.
Supports up to 4 IP address since thats all Im using.
Next you want to set up OBS.
Since I had 4 camera and I wanted to trim the top slightly off the videos and use my own timer. You dont have to do that but Im OCD about having 4 timers that arnt exactly synced down to the second.
I set my output size / canvas size to 2560X1860.
Here is a screen shot, Iv disabled 3 video sources since I dont want every one seeing what iv got in my house.
Iv also overlayed weather, My UPS data and my home central heating data.
That its some what slow video I decided on 10fps since this will 1/3 the file size for near no quality loss.
Next I setup the recorder settings and turned off sound recording.
Record formatt I use is MKV since its a lot more robust against file curruption.
Encoder NVENC H.264 and CQP 28.
Files are about 2GB per 12 hours. Its clear enough to make out a cars number plate coming down the drive way.
Make sure you have setup the hot keys as it shows in my program if your going to be using that.
Also if you want to break up files use a windows task to shut down and re-open while recording OBS every 12 hours or what ever rate you want.
P.S Im running all this in a seperate VM on my PC which has 100% uptime already. If you dont run it in a VM and use my resetter software then you will get keyboard input when it uses the hotkeys which might upset a game your playing ect.
Also just as another little play thing you can do is use DVR-Scan to find motion in a selected spot on your videos.
I had a little play with it scanning movement on my driveway and saving still photos of any movement.
Then I feed that though TESSDATA to read numberplates into text and save it in a text file.
It was about 90% accurate but chewed a lot of resources.
Where I live you can feed number plates into a website to bring up info on that car and owner. So if I wanted to take it further I could of made a program that looks up every ones car info that comes into my driveway.
If your using NVENC card will drop into P2 state which has lower memory clocks.
You can use NVinspector to disable that setting.