 Okay in this series we're going to be looking at cameras and controlling the cameras with our computers and today we're looking at my Canon T3i. Canon cameras are great. I like my lot. Again it's a T3i, a slightly older model, but what I'm showing you today should work on many cameras similar to it. And basically when you hook up USB, you can take pictures, you can take the SD card out, put any computer camera off. You hook up to USB. It's not like old cameras where it showed up as a mass storage device. I guess if you're on Windows or Mac you probably have some software that came with the camera. I throw those things out when I get them because I run Linux and I don't need that sort of stuff. Linux already provides what I need. And the program I'm using today is called GPhoto. So GPhoto, sorry, GPhoto 2. GPhoto 2 is a great little tool that allows you to interact with a lot of cameras. So let's go ahead and just get started. It's using a protocol called PTP. So that's a picture transfer protocol. And I'm going to go through a lot. There will be a link in the description to some notes, but for now I'm just going to go pretty quick. I'm going to copy and paste a lot of these commands because we're going to go through a lot of them, but there's actually a lot more that we're not going to go through today. But once you have GPhoto 2 installed, use your package manager, aptitude, aptget, synaptic, whatever package manager you use, install it. You can run GPhoto 2 list ports. So there you go. It lists a bunch of ports, but I actually don't have my Canon camera hooked up. So what I'm going to do is I'm going to plug it in now and run that command again. And give it a, oh, also the camera has to be on and not in standby mode. If your camera goes into standby mode after 10, 15, 30 seconds, GPhoto 2 won't see it. So you have to make sure that it's not in standby mode. So now that I've done that, there we go, took a picture to make sure, I'll list out. And now you can see compared to before, there is another port listed here. But how do I know that's the camera, especially if I have more than one cameras hooked up that support PTP. So I'm going to paste in here GPhoto 2 auto detect and here I'll list the port and the camera name. So we have that. We can also do a summary by doing GPhoto 2 dash dash summary, which will just give us some information here on the camera. So you can see it's a Canon EOS Rebel T3i. And there's some other camera information there. There are camera, there are images on the camera already. If I do GPhoto 2 list files, I'll list all the files on the camera. And actually, there's just the one that I just took because I cleared out before starting up the tutorial. But we'll run that command again after we take some photos. And actually, right now, if I want, I can run GPhoto 2 get all files. And it just downloaded the one file that I just basically just pictured me sitting here doing this tutorial. You can see it right there. So that's me. It's kind of dark out because there's a storm here. So lighting isn't that great. We can also use GPhoto 2 to list all configuration options. So I can do GPhoto 2 list dash list config, hit enter. And from the camera, it grabs options that it has available. Now some options, for example, if I want to change the shutter speed, I can first list out. So let's say, okay, does this camera have a shutter speed? I can look through the list here until I see where it says shutter speed, shutter count. And of course, you can always grep. There we go. So there is a shutter speed option. And grep is just a command to search through outputs of another programmer file. So now that I know that I can adjust the shutter speed, I can use photo to GPhoto 2. I'm going to mess up the name of this program so many times in this tutorial. And it's so simple GPhoto 2. I can say set configuration last command was get config. This is set config shutter speed. So I can hit enter here. Or I'm sorry, let me back up a little bit. We listed all the configurations. So now instead of set, I can say get. And I can get the configuration options for shutter speed. And I get this error. And if you get this error, no camera found. It's because my camera went in standby because I'm talking too much. So again, I'll just go ahead and make sure I'm not in standby mode anymore. And I'll run that command again. And it's not really giving me options here. And the reason for that is because the camera is set to automatic mode, the physical switch on the camera. And that's why I started to say some options you can't change depending on what setting you're on the camera. Okay, so I set the camera to manual mode. So now I can adjust a lot of the settings that I couldn't adjust when it was in automatic mode. So I'm going to go ahead and run again, GPhoto 2, get config shutter speed. And it gives me a list of all these options from bold to all the way down to one four thousandths. So the number is what we want. So choice zero or choice one. So here we go. I can say now let's clear the screen again. This time last time we said get config. This time we're saying set config of the shutter speed to one. Okay, I just read I didn't take a picture. I just adjusted the shutter speed. So that is how you can adjust the speed. I'm going to set the camera back to automatic mode. Okay, so it's set back to automatic mode. Let's go ahead and take some pictures. So there's two commands to take pictures with the camera. There is GPhoto 2 capture image. And I just took a picture, downloaded to the computer, and then I can also do GPhoto 2 trigger capture. Okay, so and forget what I just said. I said that we downloaded it to the computer. We didn't do that with that command. Those two commands both take the picture and save it to the SD card on the camera. Now, if I wanted to save it to the computer, what I can do is I can run GPhoto 2 capture image and download. It's kind of long, but GPhoto 2 dash dash capture dash image and download. And you can see that it took a picture, put it on the camera. It saved the file to the local computer. And then it deleted the picture off the camera. So it's now on my computer. It's not on the camera anymore. I can list it out here. You can see it called a cap one. And we can even display that out like so. Oh, other screen here. Oh, there we go. So that's me doing this tutorial. Okay, so now if I run that command again, not the display command, but the capture command, you can see it's going to ask if I want to override the picture because by default, unless you're doing a series of picture in one command, in which case it will number them, it's always going to want to name it the first picture kept 000.jpg. And it's going to ask if you want to override. I'm going to say yes, sure, or no, whichever. So what you could do is you could say gphoto to capture image and download dash dash file name. And I can say my photo.jpg and hit enter. And now it downloaded it and it saved it to the computer, erased it off the camera. And if we list out our files here, you can see that it create a file called my photo. Now if I run that same command again, it's going to ask if I want to override that because that file exists. So let's say you want to take a bunch of pictures in a row, or over a period of time, and you don't want it, especially if you're scripting it out for it to ask each time, if you want to override it. Well, gphoto to does no date stamps. So I can say gphoto to capture image and download file. And I can give this which is year, month, day, hour, minutes and seconds. So as long as I don't take more than one picture a second, it's going to timestamp it each time. So it just took one picture, I'll take another picture, and we can list out these files. And you can see that we have this file here and this file here. And so yeah, you can name files that way. Other options, just so you know for the set config is supposedly if you do gphoto to set config capture target set to zero, I can do that. Now when I take pictures, it's only going to use the RAM on the camera. And then download into my computer where right now every time I take a picture, it's saving it to the camera, it's the SD card, copying it to the computer, and then erasing it from the SD card. And that's not good for the SD card. That's a lot of writing to the SD card. So this will copy it to the RAM of the camera. And then before it removes it from there copies it to the computer. And then we can always set it back to one if we want to start using the SD card again. Our next options, just so you can see, okay, so far we've been using the computer to take the photos and store the photos, I can do gphoto to dash dash capture dash tethered. And now this command is going to be running. And now I can use the button on the camera like to take pictures like I normally would, but it's going to store them to the computer. So if you're taking a lot of photos, maybe you're doing a prom gig or something like that, you can take the picture with the camera just like you normally would, but it's going to capture them and save them to a computer, in which case you could script it to upload those photos and edit them or do whatever you want to do. So I was just taking pictures by pressing buttons on the camera. Let me take one more of myself. And I can take a lot really quick too. So it might take a moment for them all to copy over to the computer, but I took them quickly. So that's another option because when I'm capturing them with the computer, I kind of have to wait for the command to finish writing before I can capture again, which is a couple of seconds. Now I can also, well I can use control C to kill that. I can do now the same command that I can do dash equals, we'll say 10 seconds or however many seconds you want. Now it's tethered to the camera and I can be taking pictures. But after 10 seconds, the computer is going to stop. I'll be able to still be taking pictures, but they'll just be saved on the camera and no longer, well actually no, it's not let me take pictures anymore. So I was wrong about that last little part, but it times out after 10 seconds or however many seconds you set it to. Like I said, there's a lot of other options, but the only other thing I want to go over now is what if you have more than one camera that supports P2P or PTP. So for example, I am going to do this and hopefully this example works. So now I have the camera hooked up and just like before I'm going to try to capture and download an image, but I'm getting an error. And the problem here is I actually have two devices that support PTP and it doesn't know which one I want to use. I actually came across this by accident. I was like, why is this not working? Because I have my cell phone hooked up and cell phones apparently when hooked up through USB have the option to transfer PTP, which makes sense. So now I have to tell it which camera I want to use. So just like before I can do G-Photo 2 auto detect, right there it's seeing my cell phone because my camera's got into standby. Let me take it out of standby and run it again. So now it sees both cameras. So what I can do is I can do something like this. So the camera here we can see the name is Canon EOS 600D. So let me clear the screen here. You can see I'm running G-Photo 2 dash dash the trigger capture just like we did before to trigger a capture. This will save the image to the camera. Again you can use the capture image and download option as well. But here we're saying inside quotations dash dash camera equals and it's the output that I got from running the other commands, the auto detect command, which again my camera's going to stand by. So again I can auto detect. If I try to run this command I get an error because I didn't tell it what camera and I have two cameras. I can run that same command again and add in this telling it which camera to use and now it takes a picture. So be aware of that. If you're trying to capture from your camera and it's giving you errors and you don't know why the camera's on, the camera's hooked up, it's not in standby, you might have your cell phone hooked up and it is showing up as a PTP because you can transfer pictures over that way as well. So just like before we were talking about how we can do G-Photo 2 get all images. Well here it's pulling all the images off my cell phone because my camera's gone into standby. So that's pretty much it. Again if you're trying to do something with your camera and it's giving you an error that it can't access the camera for some reason, it may be that you have your cell phone hooked up or some other camera or device that uses PTP and it does know which one to use so you have to tell it which one to use. So I hope you found this tutorial useful. Again we're going to go over more of this type of thing in this series. I hope you enjoyed it and as always please visit FilmsByChris.com. That's Chris the K. There's a link in the description as always. I hope that you have a great day. As well as by night we work long hours. But that's not why you're here. You're here about the videos I put up on YouTube. These videos are mainly about computers and programming which means most of my videos look something like this. And if that's what you're interested in, great. If not, that's all right. I do videos on other topics too such as video editing, special effects, photo editing, 3D design, and music creation. If you are one of my viewers and you enjoy my videos, my Patreon page is a place where you can go to help support my videos. So I ask that you take the time to go to my Patreon page and look at different levels of rewards you can receive for different levels of backing. There should be a link in the description of this video if you were watching it on YouTube. Otherwise you can visit patreon.com forward slash metalx1000. And I thank you for your time and your support. Have a great day.