Raspberry Pi Tutorial 13 - Shoot Video with Python

preview_player
Показать описание
How to make a movie or make a video using Python on your Raspberry Pi. You must have a picamera connected to your Raspberry Pi to be able to complete this tutorial

This video is part of a series of building a practically 'useful' security system using Raspberry Pi to catch the Cookie Thief. I am not a computer scientist, software engineer, programmer or electrical engineer. Everything I cover was self taught using resources I found on the web. I thought it would be great to put together a series of videos that consolidates what I have learned to yield a single resource to cover many interesting topics about the Raspberry Pi! Having said that, due to my relatively little experience, I may have made mistakes or could have done certain things better. If you are aware of such a mistake, please let me know either in the comments or through email!

Рекомендации по теме
Комментарии
Автор

One of the most clear tutorials I've found, thanks!

oscarbaruffa
Автор

Absolutely bloody amazing, thank you so much, could you also do a tutorial on a time lapse as well.

MrACP
Автор

Hey man, got my first Pi today. Couldn't wait to get started, so watched all your videos! Before getting it in the mail. Thank your very much for giving me a head start. You've got the best tips for setting the Pi up with a mac and running it. Also I learned the difference between Python 2.7 and 3, which is nice because the starter kit I bought is written in 2.7, so I'm rewriting it in 3 for practice.
With afp:// you can edit your files locally with Sublime Text. Which I find way nicer than with that slow VNC! (I bought a model 1 B rev2 on clearance, €20, - quite nice to get started with.

GeorgeDekker
Автор

Great video! Say, I am super new into coding, how would you add a line for the output of the file? Since without it just sends it to Desktop.

saloaviles
Автор

So I'm pretty new to Python and Raspberry but I have quite extensive experience with HTML and CSS. What I'd like is to program something cool in Python, and then design a GUI using my webdesign knowledge. Is this possible? It seems more fun to press a fun CSS button to trigger something rather then using the terminal to launch stuff. Thanks in advance for your time, great video's very clear.

nsokoloff
Автор

How do you know what library's you need to import and where is the information listing what is in each? Your videos are helpful but for a beginner like me it is difficult to understand some of this coding, is there a reference lest for coding as well?

cgd
Автор

Can't we directly record as mp4? Like we do in the case of the webcam?

JKFCV
Автор

Does it record audio as well? If not do you have an idea to make it so that it will record audio and video? Great vid

DanPlaysMc
Автор

the code is:

from picamera import PiCamera
from time import sleep
#setup camera

with PiCamera() as camera:

sleep(5)
camera.stop_recording()

print("Done.")

adri
Автор

Thanks a lot, Sir, for sharing the process of image capture and video recording. You are working with MAC right.? can use the same commands for Rpi Board?
I'm working with RPi b Model board to capture the image and then send it to my mail and SMS to the specified mobile number.Could you please help me in this regard. Thank You.

fouziasulthana
Автор

How do you set up the pi and write a script to record video with audio and then save it to a external hard drive? Like a video camera you can turn on anywhere and then view on a computer later.

baileysuder
Автор

Is it okay to use different camera other than picamera?

jinno
Автор

hello, i am makeing video cluster do you have some python script that can run video on nodes?

informatikatutorial
Автор

Hi this video really helped me and I really need your help . My idea is to start recording video and the file must open the video on bootup and and this whole video must be unlimited.Please help me out with this

arnavjaiswal
Автор

Okay so I have a question for you ? I want to combine two codes to one . I have a quadcopter (Drone) flight code, and I have a picamera.Picamera code . I want to combine the two as one so when the the quadcopter takes off, and reaches a certain altitude the camera (picamera) turns on, and starts recording video, and when the target alitutude is reached, and the quadcopter starts to descend when it reaches a second altitude say two meters the camera shuts down, stops recording . Can you help me out ? import picamera from time import sleep # Setup the camera with picamera.Picamera() as camera: # Start recording camera.start_recording ("pythonVideo.h264") sleep(5) # Stop recording camera.stop_recording() # The camera is now closed. print("We are going to convert the video.") # Define the command we want to execute. command = "MP4Box -add pythonVideo.h264 convertedVideo.mp4 # Execute our command call([command], shell=True) # Video converted. print("Video converted.") The second code is here . from dronekit import connect, VehicleMode, LocationGlobalRelative from pymavlink import mavutil import time import argparse parser = argparse.ArgumentParser() parser.add_argument('--connect', args = parser.parse_args() # Connect to the Vehicle print 'Connecting to vehicle on: %s' % args.connect vehicle = connect(args.connect, baud=115200, wait_ready=True) # Function to arm and then takeoff to a user specified altitude def print "Basic pre-arm checks" # Don't let the user try to arm until autopilot is ready while not vehicle.is_armable: print " Waiting for vehicle to initialise..." time.sleep(1) print "Arming motors" # Copter should arm in GUIDED mode vehicle.mode = VehicleMode("GUIDED") vehicle.armed = True while not vehicle.armed: print " Waiting for arming..." time.sleep(1) print "Taking off!" # Take off to target altitude # Check that vehicle has reached takeoff altitude while True: print " Altitude: ", #Break and return from function just below target altitude. if print "Reached target altitude" break time.sleep(1) # Initialize the takeoff sequence to 121.92m arm_and_takeoff(121.92) print("Take off complete") # Hover for 120 seconds time.sleep(120) print("Now let's land") I'm not sure where to insert the camera file, and don't know how to run two scripts at one time with a samsung galaxy s8 ? Anything you can give me here I'm sure will help me out ... Thanks Noah Wheeler

noahorosw
Автор

what megapixel are you using? bought a 5mp and... potatoes....

codyquist
Автор

After sudo apt-get install gpac. Not all files can be authenticated but I download anyways. A lot of errors about things I cannot get. MP4Box is not a valid command. How do I convert the .h264 now? I've sudo apt-get upgrade and updated already. I don't know what to do.

aperson
Автор

hey, thanks for ths tuto can you help me to do the same thing but with a webcam ????

saidasaidi
Автор

What if I do not know how long I want to record?

MrMytubevidmaker
Автор

hey ..plz provide a
code which includes video streaming with video recording for every 24hrs in python

ayeshaafsari
welcome to shbcf.ru