How to use Raspberry Pi Cameras with the New 'Bullseye' OS Update - LibCamera

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey gang tim here at crow electronics and today we'll get you right into taking pictures and videos with the new bullseye raspberry pi os [Music] with the newest raspberry pi os release debian version 11 code name bullseye there have been some changes to the terminal commands which control cameras this has occurred as the old less open source camera package has been replaced with the new more open source lib camera package as a user basically what this means is that the old camera commands raspy still and raspy cam have been replaced with lib camera dash still and lib camera dash vid there have also been some additional changes to the run-on settings as well so this guide is going to solely focus on these new commands available to you with this new release these camera commands will work with any camera module for any raspberry pi the setup on the table with me now is a high quality camera module with a six millimeter wide angle camera lens attached to a raspberry pi 4 model b what you need connecting the camera hardware the initial configuration and focusing the lens has all been well covered in a previous video link to that down below in the description to confirm everything is set up correctly the lib camera package has a great test command to specifically do just this open up a new terminal window just like so and type lib camera dash hello then as soon as you press enter on your keyboard it opens up a preview window for five seconds showing exactly what the camera is seeing next to manually adjust camera lenses it is very useful to have the camera preview stay open permanently to do this type and enter the following into the terminal lib camera dash hello dash t space zero doing this will give you all the time you need to fix up your aperture and focus also take a second here to notice the top of the preview window current exposure values digital gain frames per second and analog gain are all values that it displays live the preview can be halted by either clicking the preview windows close button or holding control and pressing c with the terminal selected so with this setup confirmed working let's start taking our first photos in this case we're going to take a simple jpeg photo type the following into the terminal lib camera jpeg dash o we're going to name it first photo.jpg the dasho run on setting decides what the file is going to be named as so as soon as you press enter you're going to see the preview window open up just for a little bit showing live what the camera is seeing and demonstrating the internal adjustments it's making then it's going to take a photo this photo is saved in the home pi directory as you can see right here now keep in mind each time you run this exact line it's going to overwrite the old image and replace this currently saved image with a new one and this is what the first image looks like using the high quality module like this produces a jpeg file with the max pixel size which is 4056 by 3040. the best part of this new photo system is how much more direct control you have over camera factors like sitting exposure times in coding settings focusing on regions of interest sharpness contrast gain and much more to see an exhaustive list of everything you can do with this new lib camera package check out the official raspberry pi documentation which i've linked down in the description or type and enter lib camera jpeg-h into the terminal and then you'll be able to see an overview of some of these settings as a sample of some of the settings that you can do type and enter the following into your terminal lib camera jpeg dasho secondphoto.jpg dash t 6000 dash dash v-flip dash dash h-flip dash dash width 1920 height 1080. press enter right now this command has done a couple of things differently than before the dash t6000 will make the photo be taken 6 000 milliseconds after the preview window is opened the dash dash v flip will mirror the image along the vertical axis and the dash dash h flip will mirror the image along the horizontal axis the dash dash width 1920 and the dash dash height 1080 will make the outputted image be a full hd resolution these are the two settings that define the resolution of the outputted image and you can see all this in the resulting photo here those features were prevalent in the previous package but now there's a whole bunch more control when it comes to encoding for instance let's make png image by typing and entering the following line limp camera dash still dash epng dash o test dot png finally before we move on to video capturing i will demonstrate how to create a time lapse and have each of the images captured have the date time format stamped to it as the file name type and enter the following into your terminal lib camera dash still dash t sixty thousand dash dash time lapse ten thousand dash dash date time as soon as we press enter you'll see the preview window open up and it's going to take five jpeg images over one minute at full resolution the dash t 60 000 means the time lapse period is going to be that one minute the dash dash time lapse determines the millisecond time between each image as we set it at 10 000 that means it will take 10 seconds between each image and the dash dash date time makes the system label each of the time-lapse images with a current date time format and here are all the images taken from this time lapse each of them labeled correctly with taking photos covered it is now time to look at video capturing same as before the lib camera package has a whole bunch of settings available to it starting off let's take our first 10 second video type out the following lib camera dash vid dash t 1000 dash o first video dot h264 as you can see this then shows a preview window and creates a 10 second video it's saved in the same home pi directory as first video the raspberry pi camera does not have a microphone so the videos you're capturing like this are not going to have sound you can simply control the captured resolution of your video along with heaps of other settings type and enter lib camera video dash h into the terminal to see all of those settings and all the encodings available for instance by adding dash dash width 640 and dash dash height 480 to the previous video you're gonna get a much lower pixel density to your video this new camera package has also provided a whole bunch of streaming capabilities allowing you to stream video over your internet connection via vlc depending on how good your internet connection is results can vary stuff like this is a very exciting addition to the default camera capabilities of raspberry pi single board computers hopefully this will get you on track with this new camera package i have found the default settings have produced even clearer images than the old package by default which is really nice to see so with that until next time stay cozy
Info
Channel: Core Electronics
Views: 46,066
Rating: undefined out of 5
Keywords: how to take photos with new Raspberry pi os, photos no longer working with raspberry pi, RASPI camera broken, how to take videos with raspberry pi and bullseye OS, New RASPI OS camera module update, libcamera package, terminal commands for camera, debian version 11, buster vs bullseye, color space, timelaspe and raspberry pi, raspberry pi, take Raw photo with RASPI, can I take timelaspe with camera module, Raspberry Pi 4 Model B, bash: raspistill: command not found, raspivid
Id: uw4jjvufU8Q
Channel Id: undefined
Length: 7min 56sec (476 seconds)
Published: Wed Nov 24 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.