Тёмный

How to Stream Video from Raspberry Pi Camera to Any PC - Using Python Sockets 

Tech With Tim
Подписаться 1,6 млн
Просмотров 80 тыс.
50% 1

This raspberry pi tutorial will show you how to live stream video from your raspberry pi to any pc. This will work on your local network or over the internet! This method of streaming uses python sockets which means everything can be done strictly from python code.
Code Download: techwithtim.ne...
Playlist: • Raspberry Pi Tutorial ...
◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python
tech-with-tim.....
📸 Instagram: / tech_with_tim
🌎 Website techwithtim.net
📱 Twitter: / techwithtimm
⭐ Discord: / discord
📝 LinkedIn: / tim-rusci. .
📂 GitHub: github.com/tec...
🔊 Podcast: anchor.fm/tech...
💵 One-Time Donations: www.paypal.com....
💰 Patreon: / techwithtim
◾◾◾◾◾◾
⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
Tags:
- Tech With Tim
- Python Tutorials
- Raspberry Pi live streaming video
- Streaming video from raspberry pi to pc
#raspberrypi #sockets #cameramodule

Опубликовано:

 

8 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 103   
@patrickeschenfelder2166
@patrickeschenfelder2166 4 года назад
Hi Tim, nice Tutorial but awful latency even on that low resolution. Would be cool to see more solutions with better performance. Maybe with named Pipes, ffmpeg or gstreamer.
@mihaelarinja7227
@mihaelarinja7227 3 года назад
This video really helped me a lot. I like how you explain every single line of code. Thank you
@DaKLang
@DaKLang 4 года назад
Nice work on the video! Most people just show the canned code. I like how you showed the whole setup.
@sainath66666
@sainath66666 5 лет назад
'wb' means write binary at 8:03
@TJ4046
@TJ4046 3 года назад
Thanks Tim, this works great. I like your approach to showing how to set things up. Very clear.
@AbdulRahman-tk9mb
@AbdulRahman-tk9mb Год назад
Really solved my problem. Best video on RU-vid for this.
@tysonmulaudzi797
@tysonmulaudzi797 5 лет назад
Hey Tim, can you make more tutorials on Raspberry pi when you get the time.
@brianm.4368
@brianm.4368 2 года назад
I second this.
@cjlowe1650
@cjlowe1650 3 года назад
from CJ Lowe. Also how about getting audio from the PiZeros? I have USB Mics I can use. Thanks again.
@ritamchakrabarty5325
@ritamchakrabarty5325 3 года назад
I want to stream a video from an RPi to a PC. But both are on different public IP addresses. When I put my public IP, I am getting: OSError: [WinError 10049] The requested address is not valid in its context How to solve this?
@zorawarsinghgrewal893
@zorawarsinghgrewal893 3 года назад
any way to add multiple cameras, increase the speed and quality and record the video on the receivers end
@nissimhadar
@nissimhadar 2 года назад
Worked first time! Thanks!!
@bridiro
@bridiro 10 месяцев назад
just by removing the 2 print in the code it will result much faster
@max72122
@max72122 4 года назад
Thanks man really appreciate it, not many people share this type of tutorials.
@topset7298
@topset7298 4 года назад
Does this have to be under the same WiFi network? If so is it possible to set this up from another WiFi network?
@bendemetrius2658
@bendemetrius2658 3 года назад
Thank you very much for the video, I want to know if it works with USB webcam too instead of Rpi camera.
@JustSomeAussie1
@JustSomeAussie1 4 года назад
You know you can install multiple python packages in one command like "pip install pillow matplotlib" instead of 2 separate commands.
@dabocaster
@dabocaster 9 месяцев назад
I didn't know that, thanks!
@arbazkhan8320
@arbazkhan8320 5 лет назад
Thanks very helpful video 👍
@vardhanshah
@vardhanshah 3 года назад
THANK YOU SO MUCH. very well explained, worked well for me.
@cyraxabir3961
@cyraxabir3961 5 лет назад
how to get the streaming video without lagging?
@shaiksonu8374
@shaiksonu8374 4 года назад
Hi tim,i want to live stream video with audio in raspberrypi using python code on a http server ,wil you please show the process and help me.Thanks
@t1mytun
@t1mytun 3 года назад
I've been trying for about two weeks to get this to work, with various connection errors - the latest one is the server shell displaying a message saying "ModuleNotFoundError: No module named 'PIL" . So any clues or help on how I can fix this ? Many thanks
@rituhankare9930
@rituhankare9930 3 года назад
Same here any suggestions on this
@cjlowe1650
@cjlowe1650 3 года назад
from CJ Lowe. Sorry one last note. I tried Webrtc on the Pizeros and did not on connecting on Shinobi
@webslinger2011
@webslinger2011 3 года назад
Hi! Any tutorial to have the Rpi 3 server save the recorded video to a file? Can it be done simultaneously during streaming? Since the pi 3 has four cores it possible to do this in multiprocessing mode (one core for receiving the stream and another for recording the video)? Thanks!
@N8R_Quizzie
@N8R_Quizzie 4 года назад
I'm new to programming, and I have an idea related to this. Is there any way that we can compress, then decompress the image to get a higher image quality quicker?
@zorawarsinghgrewal893
@zorawarsinghgrewal893 3 года назад
please can I know your idea I am in a bit problem and can use your idea
@N8R_Quizzie
@N8R_Quizzie 3 года назад
@@zorawarsinghgrewal893 well, I've been out of practice for some time now. If you've seen the ads for the Genki Shadow Cast, my idea was essentially that, to stream video feed to a local network from an HDMI output.
@user-pt9js2rq7x
@user-pt9js2rq7x 4 года назад
Very informative video, thank you very much
@gabrieljulioarmandosiagian1921
@gabrieljulioarmandosiagian1921 3 года назад
How to increase the video frame rate?
@phillip4833
@phillip4833 4 года назад
Thank you for sharing it really helped
@chiral4055
@chiral4055 5 лет назад
can you do something like self driving vehicle with raspberry pi? great video btw
@samharrison4456
@samharrison4456 4 года назад
Anything is possible if you put your mind to it.
@crypticlucifer9524
@crypticlucifer9524 4 года назад
i need to record whole video while streaming ..can you help me with this
@SelMANKe
@SelMANKe Год назад
Hi ı have a question right now ı am trying to make a model satelitte. I have a mission to do that is live video streaming from model satelitte to pc that is located nearly 1 or 2 km away from model satelitte. Right now ı have a rasberry pi and camera module for it. My first question is if ı follow the path you showed ı can do my mission but do ı need any other additional element for it or all thing is related with software
@blitzardigitalmanufacturin1241
@blitzardigitalmanufacturin1241 2 года назад
Thanks for the video, could you please tell me if I can get this image and put it in a interface using PySimpleGUI?
@cjlowe1650
@cjlowe1650 2 года назад
You seem like a smart son. Yet again, no audio with the video. There are so many of these on RU-vid and they are all the same. Video but no synced audio! I'm sure you can do that.
@maliksantos9566
@maliksantos9566 3 года назад
can this be paired with TensorFlow? I am running object detection via a python code on an RPi 4 and am trying to transmit it to another platform
@Dhananjayyelwande
@Dhananjayyelwande 2 года назад
Thanks man!
@cjlowe1650
@cjlowe1650 3 года назад
Great videos. Questions? I'm using Shinobi as my NVR on a Pi4 (4GB). I have 4 Pizeros running Pi OS lite and a script that lets me stream it as RTSP. It's very laggy and the connections drops a lot. No real help on the internet. Can I use the Server code and setup on the Shinobi server (pi4) and use the Pizerow's (pi os lite) and replace the RTSP script with the python script you supplied? As I said I have 4 PiZerow with the Pi camera v1 (5MP). How would I go ahead setting up the connection to run the server to the clients? have 4 scripts that connect to the clients (static IP addresses) ? Once the connection is made can the Shinobi just allow me to put in the i.p. addresses and record that way? (I also have SSD for videos storage USB3 connected to the Pi4). Do you think I should have any issues? Or would you suggest another way to record? Another NVR? I want to keep the entire setup on Pi units. Or should I just try it my way? Any help would be greatly appreciated.
@hoangquyla4516
@hoangquyla4516 4 года назад
Hi Tim can you make a video on how to use raspberry pi in order to detect the temperature and humidity
@ollieq
@ollieq 4 года назад
La Quy just get a thermometer sensor and a humidity sensor and look at the data sheets for the sensors
@aksidhu8121
@aksidhu8121 3 года назад
which protocol is being used for the video transmission?
@FacePalmProduxtnsFPP
@FacePalmProduxtnsFPP 4 года назад
3:38 "...You're gonna go to the internet..." 🤔👌😂
@sidb6471
@sidb6471 5 лет назад
helpful video. Thanks
@jorisbaranauskas9326
@jorisbaranauskas9326 4 года назад
But this is not video stream... All this does is sending images in x seconds interval.. If i am not mistaken..
@YourArmsGone
@YourArmsGone 4 года назад
Is there any prebuilt software for the pi cam? I just want to see previews and take pictures and record video. I need to be able to do this without needing to use the command line.
@jumi4562
@jumi4562 2 года назад
does it work for anybody on Linux? i dont get a connection error but also no image (no comand line output at all)
@kevinpaulhelo5658
@kevinpaulhelo5658 4 года назад
Tim, can you make RFID Attendance System using RPi4
@arletpaz7685
@arletpaz7685 3 года назад
i thought we can just turn the raspberry pi into a hotspot to broadcast signals in which any other raspberry pi or computer can just go to it's ip address to see this live feed from the raspberry pi running the usb cam on board ?
@doganguler3629
@doganguler3629 3 года назад
Sir, Can I do that without rasperry-pi? I want to use Amazon EC2 Instance(Ubuntu 20.04LTS), 1 built-in camera laptop(Ubuntu 20.04LTS), OpenCV & Python3. I need your answer. Btw, over network not in the same Wi-Fi.
@plantzilla4884
@plantzilla4884 3 месяца назад
It is showing a 404 error; the page doesn't exist. Can you give those codes in the description if possible? That will be greatly helpful to me.
@RivenbladeS
@RivenbladeS 4 года назад
What module to use for my camera if i am on a pc and not on a ras pi? Can you write the client for the pc version? pc send stream to another pc?
@thianannshen3298
@thianannshen3298 3 года назад
hai, i used the same code and change my Rpi's ip into it but it shows '[Errno 111] connection refused'. How to solve this problem yea? Really need to some help as I would like to apply it into my assignment.
@sowmyabhatt3374
@sowmyabhatt3374 4 года назад
this means we can live stream video to devices which are of not same network?
@eriorellana89
@eriorellana89 3 года назад
image does not verify. when i run code in sublime just more text comes up
@ElectroCoderEC
@ElectroCoderEC 3 года назад
it works only in local server, what about over the internet?
@sainco3036
@sainco3036 5 лет назад
thanks.
@actionman-el3ww
@actionman-el3ww 4 года назад
I get this error: server.py", line 18, in image_len = struct.unpack('
@johnmorris-best8860
@johnmorris-best8860 4 года назад
I'm getting this as well. Do you have a fix?
@huzailmunir3097
@huzailmunir3097 4 года назад
@@johnmorris-best8860 has any solved this issue, if so can you tell us how. Thx
@huzailmunir3097
@huzailmunir3097 4 года назад
@@johnmorris-best8860 check if your ribon cable is installed the right way
@johnmwansa4180
@johnmwansa4180 5 лет назад
nice men thats why i like you my bro.if i did know you i can sport you.nice video
@AlanaPrabhoo
@AlanaPrabhoo Год назад
Anyone has the code by chance?, I am not getting through with the link
@Lets_Get_Creating
@Lets_Get_Creating Год назад
I cant get either of the codes either, does to say "The page you're looking for doesn't exist or has been moved" for you?
@Origamiztec
@Origamiztec 4 года назад
This is all local though, right? Have you tried streaming that camera feed to another computer?
@mitanshugoel725
@mitanshugoel725 3 года назад
I have 3 mobile cameras Is there a way to use them like this
@goinglt3
@goinglt3 4 года назад
will this work with random usb cameras
@layanmalhees6231
@layanmalhees6231 3 года назад
How can we do it from raspberry pi to an android app we are building please help
@sibujacob977
@sibujacob977 3 года назад
Does it work on Rasperry pi Zero W
@alvynabranches1214
@alvynabranches1214 4 года назад
Sir, can you change this code to PC to PC instead of Raspberry Pi to PC?
@AstroGodie
@AstroGodie Год назад
No code at the url... :(
@majdaomer7141
@majdaomer7141 4 года назад
hi tm, how we can send the audio of the video
@arbazkhan8320
@arbazkhan8320 5 лет назад
Bro what's coming up related to raspberry pi???
@TechWithTim
@TechWithTim 5 лет назад
Security camera
@arbazkhan8320
@arbazkhan8320 5 лет назад
@@TechWithTim great also include email notification with it When someone is in front of the camera then we should get a email notification with the picture of the person
@razmigtanashian
@razmigtanashian 3 года назад
What protocol is this code using? UDP, TCP, HTTP?
@rituhankare9930
@rituhankare9930 3 года назад
It depends on the port you are using
@parjanyadalal3014
@parjanyadalal3014 10 месяцев назад
Can't download the code. Shows error 404
@eriorellana89
@eriorellana89 3 года назад
so do i put python on the raspberry?? this video is not easy to follow
@20basty
@20basty 10 месяцев назад
code link is dead
@t1mytun
@t1mytun 3 года назад
Hello Tim - Thanks for your video. I can get the connection working on my LAN connected to my local router, but when I try to get the connection working from a remote RPi trying to use a WAN IP address via an internet connection - I keep getting the "Winerror 10049 - IP address is not valid in this context". Can you confirm which IP address I'm suppose to enter in the Server Socket Bind address line on my home computer? is it the External IP address of my home computer, or is it the External WAN IP address of my remote RPI ? I've tried both and neither works. And Also please can you confirm that the server script sits on my home computer and the client script goes to the remote Rpi ? Many thanks in advance.
@guillaumegodin1579
@guillaumegodin1579 3 года назад
Ya locally this worked pretty nicely. The only way I got it working remotely was connecting to my network with pivpn and ovpn. Then it works pretty much the same way as locally.
@benjamindreyer9884
@benjamindreyer9884 3 года назад
you need to open and forward the ports in your routers config (port forwarding)
@rehanperera9870
@rehanperera9870 Год назад
Code is not available. please reupload the code
@musawarbinali
@musawarbinali 4 года назад
#tim Please make project on self drive car Thanks
@ahmedthegreat3973
@ahmedthegreat3973 4 года назад
How To Get More FPS??
@MiguelArturoMonclus
@MiguelArturoMonclus 3 года назад
cannot import __imaging
@cjlowe1650
@cjlowe1650 3 года назад
No audio with streaming ? Seriously there are so many projects showing pi cameras streaming video but no audio. This is basically a no brainer in Windows! Is it an issue with Linux based systems????? Please! Any one have pi camera stream with audio?
@lukaspfitscher8737
@lukaspfitscher8737 4 года назад
What if my ip changes
@thegamer-xv4we
@thegamer-xv4we 5 лет назад
BrokenPipe error 32. How to Fix?
@cjlowe1650
@cjlowe1650 2 года назад
No one can help with recording sound on the Raspberry pi on the video!!!!???????????????????
@ghinabaassiri4155
@ghinabaassiri4155 4 года назад
Hello, great video but I'm having an error when running the code on raspberry pi the error is Network is unreachable
@sainco3036
@sainco3036 5 лет назад
let's make fpv hd link with minimum delay))
@lukaspfitscher8737
@lukaspfitscher8737 4 года назад
wanna doing a fpv plane
@zacharyjuhlke6541
@zacharyjuhlke6541 5 лет назад
first
@NatteKrentenbol
@NatteKrentenbol 5 лет назад
I recently made a similar project that supports multiple camera's, doesn't need 'picamera' and allows you to view the stream on a Django web-page. Check it out if you are interested. github.com/Ruud14/SecurityCamera Feel free to improve it :D. It is still a work in progress.
@communist_demon4177
@communist_demon4177 5 лет назад
6 th
@hghlndr2
@hghlndr2 3 года назад
these frame rates are a joke
Далее
Use Raspberry Pi Camera from Python
12:21
Просмотров 43 тыс.
Python Socket Programming Tutorial
49:43
Просмотров 1 млн
Raspberry Pi MotionEyeOS Network Camera
16:46
Просмотров 402 тыс.