This guide will get you taking pictures and videos ASAP with the New 'Bullseye' Raspberry Pi OS release. This explains all the new camera terminal commands and settings so you can get right back to snapping and filming with this new Debian Version 11 release.


Hey gang, Tim here at Core Electronics and today we'll get you right into taking pictures and videos with the new Bullseye Raspberry Pi OS.

With the newest Raspberry Pi OS release, Debian version 11, codename 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 libcamera package.

As a user, basically what this means is that the old camera commands, raspistill and raspicam have been replaced with libcamera-still and libcamera-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 6mm 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 libcamera package has a great test command to specifically do just this. Open up a new terminal window, just like so, and type libcamera-hello. Then as soon as you press enter on your keyboard, it opens up a preview window for 5 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. libcamera-hello-tbelow. It provides detailed information on all the features and capabilities of the libcamera package.

Now, let's move on to capturing a RAW photo. To do this, type the following command into the terminal: libcamera-raw-o. Just like before, we need to specify the output file name using the dash o option. Let's name it firstraw.raw. When you press enter, you'll see the preview window open up briefly, followed by the camera capturing the RAW photo. This RAW photo will also be saved in the home Pi directory.

It's important to note that RAW photos are not processed or compressed like JPEG photos. They contain all the raw sensor data, allowing for more flexibility in post-processing. However, they do take up more storage space.

With the libcamera package, you can also capture videos. To record a video, type the following command into the terminal: libcamera-vid-o. Again, specify the output file name using the dash o option. Let's name it firstvideo.mp4. When you hit enter, the preview window will open up, and the camera will start recording the video. To stop the recording, simply close the preview window or hold control and press C with the terminal selected.

The libcamera package offers a wide range of options for video recording, such as frame rate, resolution, and encoding settings. You can explore these options in the official RISERY Pi documentation.

In conclusion, the libcamera package provides a powerful and flexible solution for capturing photos and videos with your Raspberry Pi camera module. With its extensive features and direct control over camera settings, you can unleash your creativity and achieve professional-quality results. Make sure to refer to the official documentation for more information and to fully utilize the capabilities of the libcamera package.Down in the description, or type and enter libcamera-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. libcamera-jpeg-o secondphoto.jpeg-t 6000 –vflip –hflip –width 1920 –height 1080. Press enter right now.

This command has done a couple of things differently than before. The –t 6000 will make the photo be taken 6000 milliseconds after the preview window is opened. The –vflip will mirror the image along the vertical axis, and the –hflip will mirror the image along the horizontal axis. The –width 1920 and the –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 a PNG image by typing and entering the following line. libcamera-still-epng-o test.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. libcamera-still-t 60000 –timelapse 10000 –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 –t 60000 means the time lapse period is going to be that one minute. The –timelapse determines the millisecond time betweenEach image. As we set it at 10000, that means it will take 10 seconds between each image and the –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 labelled correctly.

With taking photos covered, it is now time to look at video capturing. As before, the libcamera package has a whole bunch of settings available to it.

Starting off, let's take our first 10-second video. Type out the following, libcamera-vid-t 1000-0 firstvideo.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 the 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 libcamera-video-h into the terminal to see all of those settings and all the encodings available. For instance, by adding –width 640 and –height 480 to the previous video, you're going to 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, whichIt is really nice to see. So with that, until next time, stay cozy.


Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.