Cov txheej txheem:
- Kauj Ruam 1: Sau cov Cheebtsam
- Kauj Ruam 2: Thauj Cov Txheej Txheem Ua Haujlwm
- Kauj Ruam 3: SSH Nkag Rau & Npaj Ua Haujlwm
- Kauj Ruam 4: Tsim & Xeem Tsab Ntawv
- Kauj ruam 5: Automate Kwj
Video: IP Lub Koob Yees Duab Siv Raspberry Pi Zero (Kev Tshawb Xyuas Hauv Tsev Ntu 1): 5 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Nov yog thawj qhov kev tshaj tawm hauv cov yeeb yaj kiab tshiab, uas peb tsim lub tsev saib xyuas lub tsev, feem ntau yog siv Raspberry Pis. Hauv kab ntawv no, peb siv Raspberry PI xoom thiab tsim lub koob yees duab IP uas tso cov vis dis aus hla RTSP. Cov vis dis aus tso tawm yog qhov ua tau zoo dua qub piv rau qhov piv txwv yav dhau los thiab txawm tias yog esp32-cam pawg thawj coj. Los ntawm lub neej ntawd, nws tau teeb tsa tso tawm 1080 video ntawm 30fps nrog tus nqi me ntsis ntawm 2Mbps, tab sis txhua qhov no tuaj yeem hloov kho kom haum rau koj cov kev xav tau.
Cov vis dis aus saum toj no coj koj mus rau tag nrho cov txheej txheem thiab kuv yuav pom zoo saib ua ntej, kom tau txais cov ntsiab lus ntawm yuav ua li cas nws txhua tus tuaj ua ke.
Kauj Ruam 1: Sau cov Cheebtsam
Peb yuav siv Raspberry Pi xoom ntawm no, feem ntau yog vim nws yog qhov me me thiab pheej yig dua piv rau lwm qhov sib txawv. Txawm li cas los xij, qhov no tseem yuav ua haujlwm nrog lwm yam Raspberry Pi hloov pauv.
Nov yog cov khoom tseem ceeb uas peb xav tau:
- Raspberry Pi pawg thawj coj saib
- daim npav microSD
- Lub koob yees duab module
- Haum lub koob yees duab cable
- Lub hwj chim tsim nyog
- USB daim npav nyeem ntawv kom nkag mus rau daim npav thiab nws muaj cov ntsiab lus
Kauj Ruam 2: Thauj Cov Txheej Txheem Ua Haujlwm
Thawj qhov peb yuav tsum tau ua yog thauj lub kaw lus ua haujlwm ntawm daim npav microSD. Txhawm rau ua qhov no, mus rau nplooj ntawv rub tawm ntawm Raspberry Pi lub vev xaib thiab rub tawm Raspbian Lite OS.
www.raspberrypi.org/downloads/raspbian/
Tom qab ntawd, rub tawm thiab teeb tsa Etcher, yog tias koj tsis muaj qhov no. Xaiv cov duab koj rub tawm, xyuas kom tseeb tias koj tau xaiv daim npav microSD thiab tom qab ntawd nyem lub pob nyem. Tos kom nws ua tiav.
Tom qab ntawd peb yuav tsum ua kom muaj kev sib txuas WiFi los ntawm kev tsim cov ntaub ntawv wpa_supplicant.conf hauv khau raj. Koj tseem tuaj yeem rub tawm cov qauv hauv qab no thiab hloov kho nws nrog koj cov ntsiab lus - lub teb chaws tus lej, lub npe network thiab tus password. Nws raug nquahu kom siv cov ntawv sau zoo li notepad ++ lossis zoo li ua qhov no.
www.bitsnblobs.com/wp-content/uploads/2020/05/wpa_supplicant.txt
Qhov kawg uas yuav tsum tau ua yog ua kom SSH. Qhov no tso cai rau peb kom nkag mus tau deb thiab tswj hwm Raspberry Pi, hla lub network. Ua qhov no yooj yim. Cias siv ib qho ntawm cov ntawv kho kab lus hais los saum no los tsim cov ntawv tshiab, thiab tom qab ntawd khaws nws rau hauv bootdrive nrog lub npe "ssh". Koj tsis tas yuav ntxiv ib qho txuas ntxiv rau hauv cov ntawv.
Tam sim no peb tau npaj ua lub zog rau ntawm lub rooj tsavxwm, yog li ntxig daim npav microSD rau hauv lub rooj tsavxwm thiab txuas lub koob yees duab siv lub xov tooj. Ua siab mos siab muag nrog cov kab ntawv txuas vim tias lawv me ntsis muag. Thaum ua tiav, ntxig rau microUSB cable thiab lub zog rau ntawm lub rooj tsavxwm. Nws yuav siv sijhawm li ib feeb los khau raj tag, yog li muab sijhawm rau nws.
Txhawm rau sib txuas lus nrog pawg thawj coj siv ssh, peb xav tau IP chaw nyob ntawm pawg thawj coj. Rub tawm thiab teeb tsa AngryIP scanner raws li qhov no yuav pab peb tau txais nws. Koj tseem tuaj yeem rub tawm qhov qub version ntawm lub qhov rais, uas tsis xav tau kev teeb tsa. Thaum ua tiav, nkag mus rau IP ntau yam raws li qhia hauv daim duab thiab ntaus lub pob pib. Tos rau nws txhawm rau txheeb xyuas lub rooj tsavxwm thiab tom qab ntawv nws yog IP chaw nyob. Tus IP chaw nyob ntawm kuv pawg thawj coj yog 192.168.1.35
Kauj Ruam 3: SSH Nkag Rau & Npaj Ua Haujlwm
Qhib qhov hais kom ua qhov rai los ntawm kev ntaus "cmd" hauv cov ntawv qhia zaub mov Pib. Koj tuaj yeem siv lub davhlau ya nyob twg yog tias koj nyob ntawm Mac OS. Tom qab ntawv, ntaus "ssh [email protected]" thiab ntaus nkag. Nco ntsoov siv IP Nws yuav nug koj yog tias koj xav kom txheeb xyuas qhov tseeb/khaws tus yuam sij. Ntaus hauv yog thiab ntaus tus yuam sij nkag mus. Nws mam li nug koj tus password, yog li nkag mus "raspberry" uas yog tus password tsis raug, thiab tom qab ntawd ntaus nkag dua. Qhov no yuav teev koj rau hauv pawg thawj coj saib.
Ua ntej peb tuaj yeem ua haujlwm ntawm tsab ntawv tseeb, peb yuav tsum ua kom lub koob yees duab hloov pauv. Qhov no tuaj yeem ua tiav los ntawm kev khiav "sudo raspi-config" hais kom ua. Nkag mus rau "Cov Kev Xaiv cuam tshuam", tom qab ntawd "Lub Koob Yees Duab" thiab ntaus nkag. Xaiv "yog" thaum nws nug koj yog tias koj xav pab lub koob yees duab thiab tom qab ntawv mus rau qhov "Ua tiav" kev xaiv. Nws yuav nug koj yog tias koj xav rov pib dua. Xaiv "yog" thiab tom qab ntawd tos rau lub rooj tsavxwm kom rov pib dua. Muab lub rooj tsavxwm ib feeb thiab tom qab ntawd ssh rov qab rau nws zoo li ua ntej.
Tom ntej no, nws yog lub tswv yim zoo los hloov kho OS yog li ntaus hauv "sudo apt hloov tshiab" thiab ntaus nkag. Tom qab ntawv ntaus sudo apt hloov kho tshiab "thiab ntaus nkag.
Thaum kawg, peb yuav tsum teeb tsa vlc thiab qhov no tuaj yeem ua tiav los ntawm kev khiav "sudo apt-get install vlc" hais kom ua. Ua raws li cov lus qhia thiab tos kom nws ua tiav. Tam sim no koj tuaj yeem txav mus rau qhov tsim tsab ntawv.
Kauj Ruam 4: Tsim & Xeem Tsab Ntawv
Txhawm rau tsim tsab ntawv, khiav cov lus txib hauv qab no "sudo nano rtsp-stream.sh". Qhov no yuav qhib cov ntawv nyeem thiab tom qab ntawd koj tuaj yeem ntaus cov ntsiab lus ntawm tsab ntawv uas tau qhia hauv qab no:
#!/bin/tsoo
raspivid -o --t 0 -rot 180 -w 1920 -h 1080 -fps 30 -b 2000000 | cvlc -vvv kwj: /// dev/stdin --sout '#rtp {sdp = rtsp: //: 8554/stream}': demux = h264
Peb tsuas yog tsim cov vis dis aus siv cov lus txib raspivid thiab peb tom qab ntawd ua qhov no muaj nyob hauv lub network siv VLC. Koj tuaj yeem hloov kho qhov kev daws teeb meem, tus lej tus nqi thiab tus lej kom haum rau koj cov kev xav tau. Qhov txuas hauv qab no yuav coj koj mus rau nplooj ntawv uas cuam tshuam nrog qee cov ntaub ntawv.
www.raspberrypi.org/documentation/usage/camera/raspicam/raspivid.md
Thaum qhov no ua tiav, nias "CTRL+X" cov yuam sij thiab nws yuav qhia koj kom khaws Cov Ntaub Ntawv. Ntaus "y" thiab ntaus nkag mus txuag. Tom qab ntawd peb yuav tsum ua tsab ntawv no kom ua tiav thiab tuaj yeem ua tiav los ntawm kev ua haujlwm "chmod +x rtsp-stream.sh" hais kom ua. Txhawm rau ua tsab ntawv, tsuas yog ntaus "./rtsp-stream.sh" thiab ntaus nkag. Qhov no yuav pab kom kwj.
Txhawm rau saib cov kwj deg, koj yuav tsum rub tawm thiab siv VLC. Thaum ua tiav, xaiv qhov "Qhib Network" xaiv los ntawm Cov Ntawv Qhia zaub mov thiab nkag mus rau URL hauv qab no:
"rtsp: //192.168.1.35: 8554/ntws"
Ib zaug ntxiv, nco ntsoov siv tus IP chaw nyob ntawm koj lub rooj tsavxwm. Tom qab ntawd, ntaus lub pob qhib thiab koj yuav tsum tuaj yeem pom cov kwj deg.
Yog tias koj xav tshuaj xyuas cov peev txheej siv, tom qab ntawd koj tuaj yeem qhib lub qhov rai hais kom ua tshiab, SSH rau hauv lub rooj tsavxwm thiab tom qab ntawv ua haujlwm "saum toj" hais kom ua. Thov saib cov vis dis aus kom paub meej ntxiv.
Kauj ruam 5: Automate Kwj
Tam sim no peb paub tias cov kwj dej ua haujlwm, peb tsuas xav tau siv nws zoo li nws tau khiav ntawm kev pib. Ua qhov no yog qhov yooj yim, tsuas yog ua raws cov lus txib hauv qab no "sudo nano /etc/systemd/system/rtsp-stream.service". Qhov no yuav qhib cov ntawv kho kom raug thiab koj yuav tsum ntaus hauv cov hauv qab no:
[Chav]
Nqe lus piav qhia = pib pib kwj
Tom qab = ntau-user.target
[Kev pabcuam]
Hom = yooj yim
ExecStart =/tsev/pi/rtsp-stream.sh
User = pib
WorkingDirectory =/tsev/pi
Rov pib dua = ntawm-ua tsis tiav
[Nruab]
WantedBy = ntau-user.target
Thaum ua tiav, txuag cov ntawv los ntawm nias "CTRL+X" cov yuam sij, tom qab ntawd Y, tom qab ntawd Enter. Peb tom qab ntawd yuav tsum ua kom muaj kev pabcuam los ntawm kev ua cov lus txib hauv qab no "sudo systemctl pab rtsp-stream.service". Qhov ntawd yog txhua yam peb yuav tsum tau ua. Lub sijhawm tom ntej ntawm lub rooj tsavxwm, nws yuav ua tiav qhov kev pabcuam uas yuav hu rau tsab ntawv. Koj tseem tuaj yeem tswj hwm kev pabcuam tus kheej siv cov lus txib hauv qab no:
Txhawm rau pib: "sudo systemctl pib rtsp-stream.service"
Txhawm rau Nres: "sudo systemctl nres rtsp-stream.service"
Saib Cov xwm txheej: "sudo systemctl xwm txheej rtsp-stream.service"
Rov pib dua lub rooj tsavxwm los ntawm kev ua "sudo reboot" hais kom ua. Muab nws ib pliag rau khau raj thiab tom qab ntawd qhib VLC los saib cov kwj deg.
Thiab yog li cas koj tuaj yeem tsim lub koob yees duab IP siv Raspberry Pi xoom. Txhua lub sijhawm lub rooj tsav nkoj, nws yuav cia li tsim cov kwj deg thiab koj tuaj yeem saib qhov no nyob deb. Hauv qhov tshaj tawm tom ntej no, peb yuav kawm paub tsim NVR uas yuav tso cai rau peb saib ntau lub kwj deg thiab khaws cia rau qee qhov chaw cia. Yog tias koj nyiam cov phiaj xwm no, tom qab ntawv thov txiav txim siab tso npe rau hauv peb YouTube channel vim nws pab peb txuas ntxiv tsim cov phiaj xwm zoo li no.
YouTube:
Ua tsaug rau koj nyeem!
Pom zoo:
Siv Kev Cia Siab Lub Hauv Paus txuas ntxiv txhawm rau Nrhiav Lub Tuam Tsev Tsis Ua Haujlwm Txoj Cai Ua Haujlwm Hauv Koj Tsev Neeg Tsob Ntoo ntawm Kev Tshawb Nrhiav Tsev Neeg: 11 Kauj Ruam
Siv Kev Cia Siab Lub Hauv Paus Txuas Ntxiv kom Nrhiav Lub Tuam Tsev Tsis Ua Haujlwm Ua Haujlwm Hauv Koj Tsev Neeg Tsob Ntoo ntawm Kev Tshawb Nrhiav Tsev Neeg: Lub hom phiaj ntawm cov lus qhia no yog los qhia seb yuav tshawb nrhiav koj tsev neeg tsob ntoo li cas hauv Tsev Neeg Nrhiav rau cov poj koob yawm txwv nrog kev ua haujlwm hauv lub tuam tsev tsis tiav siv Kev Cia Siab lub hauv siab txuas ntxiv. Siv Kev Cia Siab Lub Hauv Paus tuaj yeem ua rau koj qhov kev tshawb nrhiav tsis tiav
$ 5 Lub Koob Yees Duab Lub Koob Yees Duab rau Lub Rooj Sib Tham Video: 4 Cov Kauj Ruam (nrog Duab)
$ 5 Laptop Document Camera for Conferencing Video: Luam tawm 20200811 los ntawm John E. Nelson [email protected] tsis ntev los no tau tshaj tawm qhia qhia kev siv lub khoos phis tawj khoos phis tawj khoos phis tawj ua lub koob yees duab rau kev sib tham video. www.instructables.com/id/A-Sub-10-MetaPrax-Documen
Lub taub hau Nrhiav Nrog Wii Lub Koob Yees Duab Lub Koob Yees Duab (Tsov Rog Thunder): 6 Cov Kauj Ruam (nrog Duab)
Txheeb Xyuas Lub Taub Hau Nrog Wii Lub Koob Yees Duab Lub Koob Yees Duab (Tsov Rog Thunder): Nyob zoo txhua tus! Kuv xav qhia rau koj nrog kuv thawj qhov haujlwm tiav Arduino tiav. Kuv tau sim ua ib hom kev ua hauv tsev ntxiv rau kev muaj tiag. Cia kuv piav qhia nws rau koj: Nws yog qhov txheej txheem uas siv lub koob yees duab txhawm rau taug qab koj lub taub hau txav los hloov nws raws li
Tus Saib Xyuas V1.0 --- Txhim Kho Qhov Rooj Peephole Lub Koob Yees Duab Nrog Arduino (Kev Tshawb Fawb Kev Tshawb Fawb & Hluav Taws Xob Nta): 5 Kauj Ruam
Tus Saib Xyuas V1.0 ||| Txhim Kho Qhov Rooj Peephole Lub Koob Yees Duab Nrog Arduino (Kev Tshawb Fawb Tsab Ntawv Teev Tseg & Nta Hluav Taws Xob Nta): Kuv tau xaj lub koob yees duab peephole tab sis thaum kuv siv nws, pom tau tias tsis muaj qhov pib ua haujlwm (qhib los ntawm kev ntsuas pom). Tom qab ntawd kuv pib tshawb xyuas nws ua haujlwm li cas. Txhawm rau kaw cov vis dis aus, koj yuav tsum 1- khaws lub zog khawm yuav luag 2 vib nas this
Hmo Hmo Pom Lub Zeem Muag Digital Lub Koob Yees Duab/lub koob yees duab: 17 Cov Kauj Ruam (nrog Duab)
Infrared Hmo Hmo Pom Lub Koob Yees Duab/Lub Koob Yees Duab: Cov lus qhia no piav qhia yuav hloov pauv li cas Kev Pom Kev Pom Kev Pom Hmo Hmo Hmo Hmo Hmo Hmo Hmo Hmo Hmo Tsis Pom Kev (uas yog tshaj tawm tsis raug los siv "" lub ntsej muag pom kev hmo ntuj tiag tiag thev naus laus zis ") mus rau qhov tseeb pom pom hmo ntuj pom lub koob yees duab. Qhov no zoo ib yam li IR webca