Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Help about MediaWiki
FUTO
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Introduction to a Self Managed Life: a 13 hour & 28 minute presentation by FUTO software
(section)
Main Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Step 2: Setting up the Hikvision Camera from Scratch == <span id="introduction-to-hikvision-ip-issues"></span> ==== 2.1 Introduction to Hikvision IP issues ==== When you get a good camera, it usually uses DHCP to connect to your network. This means when you hook it up, you’ll be able to see it in the ARP table on your '''pfSense''' router. It’ll grab an IP address that your router provides, and boom, it’s on the network. …I said a GOOD camera. These are (likely grey market) Hikvisions set up into god knows what configuration being sold by a business liquidator. Cheaper cameras might not do this. They often come with some weird static IP like <code>192.0.0.64</code>, and you have no idea what it’s trying to connect to. Hikvision cameras can be like this sometimes. <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdtp_tmp_99f3299b.png File:lu55028jxdtp_tmp_3bd9e222.png File:lu55028jxdtp_tmp_65220560.png </gallery> <span id="download-the-sadp-tool"></span> ==== 2.2 Download the SADP Tool ==== To fix this IP issue, Hikvision offers a tool called SADP. Unfortunately, this tool requires Windows. So, I’m booting up a sandboxed Windows computer here. It’s a burner computer I use for college math classes because, apparently, you can’t learn math on GNU/Linux, so I keep it around for the cancer that is Pearson Vue. '''Download and Install SADP''': Grab it from [https://www.hikvision.com/us-en/support/tools/hitools/clea8b3e4ea7da90a9/ Hikvision’s website]. Sometimes, these cameras come with passwords that even the seller doesn’t know. You might have to reset it by hitting a button inside the camera to get it back to default settings. '''Preparing the camera for login''' Once SADP finds your camera, you can log in and configure it. Often, you’ll need to look up the default password online or in the manual. <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdtp_tmp_5fb1fcd0.png File:lu55028jxdtp_tmp_5748d3c3.png File:lu55028jxdtp_tmp_4f3a2ffe.png File:lu55028jxdtp_tmp_9ac7122.png </gallery> <span id="running-sadp-to-prepare-camera-for-login"></span> ==== 2.3 Running SADP to prepare camera for login ==== Once installed, run SADP and have it find your camera. Once it finds your camera, click on that camera, set it to DHCP, and apply the configuration. You have to enter the password to do this. The reason we are using DHCP at first rather than static IP is because this is insanely janky & I want to confirm that it even works & lets you log in at all before going further. If you know the password, you’re done with 99% of the setup. If it doesn’t work, google the default password for that specific model of hikvision camera. If that doesn’t work, you can either: * Message the seller and ask them, but 99% of the time they know less than you about whatever they’re liquidating * Open the camera physically & find a button you can hit to reset it. At that point, the default user/pass you find on google should now work. <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdtp_tmp_a01aaa48.png File:lu55028jxdtp_tmp_1803a7a2.png File:lu55028jxdtp_tmp_56b379c8.png </gallery> <span id="logging-into-your-newfound-camera"></span> ==== 2.4 Logging into your newfound camera ==== After this, sign into your '''pfSense''' router and go to '''Status —> DHCP Leases''' to find your camera. I used '''Diagnostics —> ARP Table''' since I’m used to it. Once you know its IP, put it into your web browser and log right in. :) <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdtp_tmp_8bd543f6.png File:lu55028jxdtp_tmp_8a8974a8.png </gallery> <span id="configuring-a-static-ip"></span> ==== 2.5 Configuring a Static IP ==== First things first, you want to give your camera a static IP address. For instance, if you choose 192.168.5.19, you set it so you always know where to find it. This is necessary; imagine your system goes offline for a few minutes and something steals your camera’s IP address, and now your security camera recorder is trying to get a video feed from your refrigerator? Sadly, by the time this is published, your fridge might actually have a video feed… * Configure network settings with a static IP: ** Click '''Configuration''' ** Click '''Network''' on the left side ** Uncheck '''DHCP''' ** Set an '''IPv4 Address''' on your subnet, anything from 192.168.5.5-192.168.5.254 will do here. ** Set the '''IPv4 Default Gateway''' to be your '''pfSense''' router. ** Click '''Test''' to make sure you didn’t screw something up before you save this configuration & can no longer log into your camera. * Set '''Preferred DNS server''' and '''Alternate DNS server''' to the IP address of your '''pfSense''' router, which in our case is 192.168.5.1. * '''User management''': Set a username and password for security. <span id="configure-a-static-mapping-in-pfsense"></span> ==== 2.6 Configure a Static Mapping in pfSense ==== Follow the same instructions from our prior static mappings to set up a static mapping for our camera so that other devices do not steal its IP address. <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdtp_tmp_f9b49c88.png File:lu55028jxdtp_tmp_94640b52.png File:lu55028jxdtp_tmp_8384a94b.png </gallery> <span id="create-a-real-password-for-the-camera"></span> ==== 2.7 Create a REAL Password for the camera ==== No, we’re not keeping the username and password to “admin/password” # Once inside the camera’s configuration interface, go to '''Configuration''' at the top. # Go to '''System''' on the left side. # Go to '''User Management'''. # Click '''Modify''' on the admin user. # Don’t use the word “password” or “12345” as your password. # Put this in a password manager when you’re done. Not a post-it on your monitor. # Don’t write the password on the camera. I will come through this screen like Samara from The Ring and drag you so deep down a well you’ll end up on a ''[https://www.youtube.com/@fatal_breakdown cave diving YouTube channel]''. <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdtp_tmp_a1c6507a.png </gallery> <span id="change-video-codec-to-h.264"></span> ==== 2.8 Change Video Codec to H.264 ==== When it comes to video encoding, I’d use H.264 over H.265. '''Frigate''' & web browsers can be fussy playing back H.265, and the quality bump is not something I notice enough to be worth the aggravation. Given this is a beginner’s guide, the safe choice is to use the codec that is less likely to cause aggravation. '''Frigate''' is going to have two streams – one that detects when something is going on (a dog, a cat, a car, a human, etc.), and another that does the recording. If we have a high-quality stream doing all of the detection work, our system is going to be killing itself all the time unnecessarily. We don’t need 12k Blackmagic Ursa quality video to tell whether we’re looking at a car’s license plate or a plastic bag in the wind. We do need good quality to record, though. We’re going to set up one high-quality stream for recording, and another lower-quality stream for monitoring what’s going on. This way, we get high-quality video for playback, without unnecessarily blowing up the resource consumption on our computer. * While logged into the camera interface, click '''Configuration'''. * Click '''Video/Audio''' on the left side, and select '''Stream Type''' as '''Main Stream (Normal)'''. This is the feed we will be recording. ** For '''Main Stream (Normal)''', set '''Video Encoding''' to '''H.264'''. ** Set '''Video Quality''' to '''Highest'''. ** '''Resolution''' and '''Frame Rate''' are up to you – I like the highest resolution that gets me at least 20 frames per second. Lower than this and it starts to turn into a slideshow. * Now, select '''Stream Type''' and click onto the 2nd stream listed. * Set a very low '''Resolution''', something in the 600x300-ish range. * Set the '''Video Quality''' to medium. <span id="finding-the-url-where-we-access-the-cameras-stream"></span> ==== 2.9 Finding the URL where we access the camera’s stream ==== Before setting up your NVR software, make sure you can view the stream using a program like VLC. Here’s how you do it: <ol style="list-style-type: decimal;"> <li><p>'''Find the stream address''': Use <code>NMap</code> to discover all streams on port 554 (RTSP port).</p> <pre>nmap -d --script rtsp-url-brute -p 554 192.168.5.19</pre></li> <li><p>'''Identify streams''': Look for streams ending in <code>.sdp</code>, typically <code>stream1</code> for high quality and <code>stream2</code> for lower quality.</p></li> <li><p>'''Modify the URL''': Adjust the RTSP URL with your username and password.</p> <pre>rtsp://username:password@<camera_ip>/stream1.sdp</pre></li></ol> <blockquote>'''Hint''': You will see the high quality & the low quality stream in this list. You’ll have to mess around a bit to figure out which one is which; it should be obvious when you are viewing the high quality stream & when you are viewing the low quality stream, based on the video quality. </blockquote> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdtp_tmp_bf8f3071.png </gallery> <span id="testing-streams-in-vlc"></span> ==== 2.99 Testing Streams in VLC ==== Once you’ve got the URLs, test them in '''VLC''' to ensure they work. You can click '''Media—> Open Network Stream''' and then enter the URL. If you don’t have VLC… Get VLC. It is the best multi-format video player there is. Once you have a working & properly set up camera, let’s install our NVR – that stands for '''Network Video Recorder.''' This is what will monitor the video feeds coming from our cameras & record it to disk for us. <span id="step-3-installing-docker-and-setting-up-frigate-with-specific-version-0.13.2"></span>
Summary:
Please note that all contributions to FUTO may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
FUTO:Copyrights
for details).
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:
Cancel
Editing help
(opens in new window)