Motion Tutorial?

Mar 02, 2022 Last reply: 4 years ago 7 Replies

My brain hurts! I want to try out using Motion with a generic webcam, but I can't seem to penetrate the documentation. Can someone point me in the direction of some sample code to help me get started?


First of all you must be sure your generic webcam will work with motion. I have a pi with pi camera - works OK. Plugged in USB generic camera - that one won't work at all even thought the original one still does. Also check your video devices /dev/video? and /dev/v4l (for usb attached)

Yes, I have a working motion.conf - works with Pi camera. Too long to post here.

I have 10 working Pi's with a mix of picams and various usb cams. I can send you a working (for me) motion.conf if you like.

lsusb can see the camera, but fswebcam times out before anything useful happens.

ffmpeg -f v4l2 -video_size 640x480 -i /dev/video0 -frames 1 test.jpg returns a picture, but the exposure is way off.

Sure, send me your motion.conf file. The email address in my From header is valid. I think I was assuming that motion.conf was just a small piece of the puzzle. Was I wrong?

Did you ever get this working?

I had to conclude that my old generic USB webcam was having very poor relations with my Pi and/or Motion, so I have surrendered for now. I did make a couple of attempts to acquire an official Pi camera, but the only ones I could find were at Amazon at extremely inflated prices.

I haven't used Motion but I have streamed USB webcams before. I was wondering what codec you used on the RasPi? I often stream using ffmpeg/RTSP on an MBP I have at home but that uses a hardware-accelerated x264 decoder. I guess at low resolution this isn't an issue?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required