Home Made Video Security System

  Рет қаралды 12,232

Tall Paul Tech

Tall Paul Tech

3 жыл бұрын

This video shows how to use vlc to get video from a camera, and re-stream it as multicast. Also, using ffmpeg we can save the video to file in timed segments.
vlc command:
su - pi -c "/usr/bin/cvlc --rtsp-tcp rtsp://user:password@192.168.0.11:554/ch01/0 --sout '#transcode{acodec=mp4a,ab=32,channels=1,samplerate=8000,scodec=none
}:rtp{dst=239.1.1.81,port=20000,mux=ts,sap,name=frontdoor,ttl=10}' --play-and-exit"
ffmpeg command:
ffmpeg -nostdin -i rtp://239.1.1.81:20000 -map 0 -c:a copy -c:v copy -y -f segment -segment_time 60 -reset_timestamps 1 -strftime 1 ./today/%Y%m%d
_%H%M%S_frontdoor.mp4 -loglevel quiet

Пікірлер: 71
@Alenmalm
@Alenmalm 3 жыл бұрын
1'st of all.... -I've learned so much from your older videos.. and often we seem to be i sync, most of the things you master and thinker around with, are things that interesst me 😂 at that time, also i have to say: Your format is PERFECT, fast, precis and accurat, I MUCH rather go back ten times (because i'm sort of slow🤣) then getting cramp in my tumb from skipping forward because of makers "mumbeling" !!! In short: -GREAT to have you back again, and thanks for sharing !!
@oresteszoupanos
@oresteszoupanos 3 жыл бұрын
I keep getting mesmerised by the video lag. . . Nice video!
@Average_Geo
@Average_Geo 3 жыл бұрын
Thanks for the tutorial. I look forward to other tweaks you make as you continue to build and enhance your system.
@g.s.3389
@g.s.3389 3 жыл бұрын
very very interesting, please allow me to add some tips: - some video cameras use a strange codec which often it is not part of ffmpeg package (not enabled during compilation) so to solve it just use mkv instead of mp4, at the same time it is enough to put -c copy to avoid problems with audio - with ffmpeg it is possible to record directly rtsp and if you want you can force tcp using: -rtsp_transport tcp Again compliments for the video, very interesting.
@jwaddin
@jwaddin Жыл бұрын
really appreciate these videos! nice to hear someone who knows what they're talking about
@clonetrooper5674
@clonetrooper5674 3 жыл бұрын
Thanks for this. I couldn't quite work out how you did it in the older videos so I ended up running shinobi.
@phillkelley7700
@phillkelley7700 3 жыл бұрын
Great video. I was yelling "don't forget the ampersand." Just one hint about using /etc/rc.local for launching a non-root job at boot time. crontab supports "@reboot COMMAND". No ampersand needed to chuck things into the background because cron does that automatically.
@farhanyousaf5616
@farhanyousaf5616 3 жыл бұрын
Love your vids mate. No BS, straight to business!
@pquodling
@pquodling 3 жыл бұрын
Welcome back. Of course, the next step is to run some ML code on the pi that recognizes various things - pick out the neighbours cat - let you know when the Courier left a parcel on the door and so on.
@TallPaulTech
@TallPaulTech 3 жыл бұрын
Don't get me started on those damn cats
@nexxostube
@nexxostube 3 жыл бұрын
Great content and very well explained... as always! Cheers from Portugal
@ninline2000
@ninline2000 3 жыл бұрын
He makes it look so easy.
@PileofKyle
@PileofKyle 3 жыл бұрын
Excellent video, thanks for sharing!
@seba123321
@seba123321 3 жыл бұрын
Thank you! And I was buying camera recorder license every time when I added new camera. Thanks!
@TallPaulTech
@TallPaulTech 3 жыл бұрын
I didn't realise these cameras were't supposed to be used without the Swann control box, but I was never going to just buy some product pre-made. I just needed the camera to make my own my way.
@MrDukeLeto
@MrDukeLeto 3 жыл бұрын
Very useful video. Thanks. Stay well!
@Forbidden303
@Forbidden303 3 жыл бұрын
They really should teach this stuff in school early on. With a little knowledge you can realise the simplicity of functional software/hardware solutions.
@TallPaulTech
@TallPaulTech 3 жыл бұрын
Yep... people shouldn't be afraid to try their own stuff
@louchitchat
@louchitchat 3 жыл бұрын
Great content and well explained... as always!, thanks
@01zoso
@01zoso 3 жыл бұрын
Great video 👍 Thanks for that
@AntonisAsc
@AntonisAsc 3 жыл бұрын
Great video and thank you for your time! I run some raspberry pi zerows with old laptop webcams around the house, and at the moment I use the motioneyeos, but I really like the more bare metal approach and is a learning process
@TallPaulTech
@TallPaulTech 3 жыл бұрын
I used to run that sort of thing too. I don't regret finally buying actual purpose built security cameras though.
@AntonisAsc
@AntonisAsc 3 жыл бұрын
@@TallPaulTech Yes you are right and I will eventually get security cameras. I just had some cameras from old laptops and I was testing around with raspberries to learn. I am still very new and I really appreciate your videos. Thank you for your reply, have a nice day!
@kalexbox
@kalexbox 3 жыл бұрын
Another great no stone left unturned video! Thanks for this. What do you use as visualization endpoint especially with multiple cameras for combining and easy switching? Multiple instances of VLC? Would converting to NDI instead of rtp open more possibilities for output?
@BlackberryBoy
@BlackberryBoy 2 жыл бұрын
This is great. Thanks for sharing.
@mavrik3682
@mavrik3682 3 жыл бұрын
Very cool video!
@NoHandleToSpeakOf
@NoHandleToSpeakOf 3 жыл бұрын
RTSP sometimes fail without closing connection and your VLC will never quit and get restarted. I'd do it all with ffmpeg instead.
@anarekist
@anarekist 3 жыл бұрын
Not even finished but great so far
@DanielSMatthews
@DanielSMatthews 3 жыл бұрын
Rather than delete last week's video, have a cron job run that concatenates and compresses (and or downscales) that week's video to a lower quality, then have one for each month that does the same to the last 4 weekly videos. This way rather than having the video record just truncate it fades off in size and quality but you still have something there. That archiving FFMPEG job can also be run with a very low processor priority using _nice_ Also you can sometimes reduce the "lag" on the camera by tweaking the camera and cvlc settings too but it is very specific to the set up yo have so you'll need to look at that yourself. One general word of caution with IP cams, they all seem to run a version of linux and most are old and full of security holes so firewall the things very well and watch their traffic as I has one chinese made one that was using a ntp server in mainland china associated with the PLA and the camera was running a version of ntp client with a known vulnerability so they could have remotely owned it any time they wanted, then staged an attack on the rest of the network from there. And yeah the appropriate people in Canberra were notified.
@DanielSMatthews
@DanielSMatthews 3 жыл бұрын
@@spacewolfjr Try it and see, potato version is the end step before deletion, the number of iterations before that, the total history length, is your choice.
@CZRaS
@CZRaS 3 жыл бұрын
@@spacewolfjr well if the Pi is there anyway, why would CPU cycles bother you right?
@krsd646
@krsd646 3 жыл бұрын
Nice video, but cleanup script will be better and safer with find command, for example "find /home/pi/videos -type f -mtime +70 -exec rm -f {} \; "
@PaulSlootman
@PaulSlootman 3 жыл бұрын
You'll also have to clean up empty directories if you're storing files per day
@danieldutoit8391
@danieldutoit8391 3 жыл бұрын
I use SvenVD's rpisurv (just Google for Github repo) to display the feeds of two Hikvision DVRs.
@wwShadow7
@wwShadow7 3 жыл бұрын
I tried to do something similar with crtmpserver, but by the time I tried to do that, that summer of code thing vanished from repos and other sources. I've tried with vlc, but using mpv on the playback side has issues. And various other would rather not do it with vlc things. As you've shown vlc to vlc works just fine. But I like having options.
@PatrickLangendoen
@PatrickLangendoen 3 жыл бұрын
You could also have the camera script email you or whatever as a notification if it loses the stream.
@catalinalb1722
@catalinalb1722 2 жыл бұрын
Brilliant! Will it work with any camera? I did mess around with hik-vision cameras. Will definitely give it a try. Can you stream that over internet? On mobile phone for example?
@daniel.bartonicek
@daniel.bartonicek 3 жыл бұрын
Any particular reason why use vlc for the multicast broadcasting instead of ffmpeg?
@BenChilds
@BenChilds 3 жыл бұрын
It's my understanding that SSL credentials are the same on base raspberry pi install and should be regenerated as a first-use standard practice similar to changing the pi user password.
@garylovesbeer
@garylovesbeer 3 жыл бұрын
Thanks for the very instructive video. Great food for thought. Any recommendations on value POE IP cameras? There seem to be an endless list when you go looking. Don't need pan/tilt/zoom just fairly wide angle and short range - small front deck size - IR illumination. PS what happened to the server relocation video? Only had time to watch half and when I went back to watch it was no longer available.
@TallPaulTech
@TallPaulTech 3 жыл бұрын
I can only speak for the ones I've got which are Swann something. They're supposedly 4k, but you know the sensor is shit so I just run them at HD
@garylovesbeer
@garylovesbeer 3 жыл бұрын
@@TallPaulTech thanks for the review 😄. Succinct and informative.
@PaulSlootman
@PaulSlootman 3 жыл бұрын
I would love to see the vlc part replaced by something with ffmpeg, as I can't view my Reolink cameras with vlc, only with ffplay. With vlc all I get are lines with "rc buffer undeflow", multiple times per second. Even with the low-bandwidth 640x360 stream vlc doesn't work.
@ravkhangurra7522
@ravkhangurra7522 Жыл бұрын
Great video, what device did you plug the camera into which also connects to the raspberry pi?
@TallPaulTech
@TallPaulTech Жыл бұрын
A switch
@kurtwerbrouck5439
@kurtwerbrouck5439 3 жыл бұрын
Have you any video / info of how to create an rtp audio server of a raspberry?
@jaredcarmouche4046
@jaredcarmouche4046 3 жыл бұрын
Can anyone recommend a cheap camera to try this wtih? Most I have looked at on Amazon have their own proprietary apps that go along with them.
@nickswebtsv
@nickswebtsv 3 жыл бұрын
Hey, I've been trying to look for that video where you join your recordings together with concat or similar? Any pointers on which video it is in? I think you had a script you had setup for it.
@TallPaulTech
@TallPaulTech 3 жыл бұрын
I can't remember, but you use ffmpeg to do it. Here's the command: ffmpeg -f concat -i filelist -c copy output.mp4
@tld8102
@tld8102 3 жыл бұрын
wait! so IP streaming 1080p @ 60fps to a custom webpage dashboard ? is that possible... all hosted on the Pi
@2008spoonman
@2008spoonman 3 жыл бұрын
- use motioneyeos - get a Synology nas. It has a free license for 2 cameras - I can view/play the video when it is live recording it. No problem
@itsmestevieg81
@itsmestevieg81 3 жыл бұрын
This is awesome mate! You are in Brisbane too right? I'd love to come check your setup sometime
@thehomelawnaficionado
@thehomelawnaficionado 3 жыл бұрын
Do you have any motion alerts, or more specifically AI motion so you only get alerts when its a human or vehicle rather than a tree waving in the wind. Or do you just purely record the videos and that's it?
@TallPaulTech
@TallPaulTech 3 жыл бұрын
Are you looking to break into my place or something?
@thehomelawnaficionado
@thehomelawnaficionado 3 жыл бұрын
@@TallPaulTech haha no looking for ideas for my place! I’ve got a couple of cameras but not 100% happy with my record/motion alert system.
@DiyintheGhetto
@DiyintheGhetto 3 жыл бұрын
Hello what if you would like to do 4 cameras How is it possible to do all 4 cameras like this and Record all 4 cameras at one time to there own files? Sorry I'm not a programmer at all but I'm trying.
@jonshouse1
@jonshouse1 3 жыл бұрын
I'm finding if I use vlc in TCP with my cameras it seems to stop working after a few mins. No errors, vlc just goes to a black window? If I omit the --rtsp-tcp then it keeps working, anyone any ideas ?
@metfan
@metfan 3 жыл бұрын
What distro do you use on your main computer?
@paulmaydaynight9925
@paulmaydaynight9925 3 жыл бұрын
the sap error bugs me all the time, any idea why its doing it and how to fix ,thanks for all the multicast content
@zenmaster24
@zenmaster24 3 жыл бұрын
do the camera's have motion detection? ie come online when they detect something? or are they always recording?
@rogo7330
@rogo7330 Жыл бұрын
You can try to implement it yourself, but on already saved footage.
@aihysp
@aihysp 3 жыл бұрын
why are we doing this? i am trying to understand why pass it by the PI ,and not use the onboard RTSP stream?
@pepeshopping
@pepeshopping 3 жыл бұрын
Hmm no passwords or security? What about remote viewing, alarms etc. (It’s cool for specific needs, but not as a security system).
@Forbidden303
@Forbidden303 3 жыл бұрын
It's a hardwired system behind a firewall, no need to complicate things. unless you are kinky that way. XD
@TallPaulTech
@TallPaulTech 3 жыл бұрын
Exactly. It's internal on my LAN. To access it from the WAN I have a VPN to home installed on my phone as I showed in a previous video. Bottom line, I control the network traffic flow.
@SmithyScotland
@SmithyScotland 3 жыл бұрын
Have you looked at motioneyes and motioneyesos? Open source project supporting multiple cameras.
@cjlowe1650
@cjlowe1650 3 жыл бұрын
Motioneyos is a resource hog and so laggy
@sivakumaranbalasubramaniam3442
@sivakumaranbalasubramaniam3442 3 жыл бұрын
Camera make please
@rogo7330
@rogo7330 Жыл бұрын
Don't save to mp4. This format is the reason why you can't open video that half-written. Use mkv or something else.
Raspberry Pi Router And Firewall Using nftables
34:37
Tall Paul Tech
Рет қаралды 20 М.
Video Mosaic With VLC
6:56
Tall Paul Tech
Рет қаралды 27 М.
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 124 МЛН
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 10 МЛН
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 84 МЛН
OpenAI's New SearchGPT Shakes Up the Industry, Google Stock CRASHES!
10:10
Raspberry Pi Home Alarm System With Android Client
12:20
Tall Paul Tech
Рет қаралды 89 М.
Your ISP is lying! Monitor your Internet with a Pi
8:05
Jeff Geerling
Рет қаралды 299 М.
the Raspberry Pi PHONE SYSTEM! (3CX PBX at home)
14:49
NetworkChuck
Рет қаралды 732 М.
Raspberry Pi Servers
11:25
Tall Paul Tech
Рет қаралды 31 М.
Mac Fanboy Tries ARM Windows Laptops
31:40
Snazzy Labs
Рет қаралды 185 М.
Making a Digital Dashboard! (w/ Google Calendar integration)
19:26
Made with Layers (Thomas Sanladerer)
Рет қаралды 1,9 МЛН
Raspberry Pi Surveillance Monitor v2
31:09
Crosstalk Solutions
Рет қаралды 334 М.
Самые крутые школьные гаджеты
0:49
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 9 МЛН
iPhone 15 Pro Max vs IPhone Xs Max  troll face speed test
0:33
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 2,7 МЛН
НЕ БЕРУ APPLE VISION PRO!
0:37
ТЕСЛЕР
Рет қаралды 320 М.