Webcam / motion

Ask questions about Arch Linux ARM. Please search before making a new topic.

Webcam / motion

Postby ygator » Thu Aug 18, 2011 9:25 pm

Is anyone doing anything with a webcam?

I'd like to have a webpage I can bring up that will show the video from a webcam that is connected.
I've tried many of the webcam packages, but most don't compile due to missing linux/videodev.h.

I am able to capture snapshots with fswebcam.

Thanks
Last edited by ygator on Sat Aug 20, 2011 8:54 pm, edited 1 time in total.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: Webcam

Postby WarheadsSE » Thu Aug 18, 2011 10:05 pm

device ?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Webcam

Postby ygator » Thu Aug 18, 2011 10:26 pm

USB SmileCam
USB ID 0ac8:301b Z-Star Microelectronics Corp. ZC0301 Webcam

I plug it in and get:
$this->bbcode_second_pass_quote('', 'u')sb 1-1.3.1.4: new full speed USB device number 37 using orion-ehci
input: zc3xx as /devices/platform/orion-ehci.0/usb1/1-1/1-1.3/1-1.3.1/1-1.3.1.4/input/input21


fswebcam works getting snapshot. It says it is using v4l2.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: Webcam

Postby kmihelich » Fri Aug 19, 2011 12:29 am

Packages that don't compile because of videodev.h missing is because they haven't updated to V4L2, which has the difference of using the videodev2.h that has been in place for the last few kernels. If they haven't caught up, chances are there is something else better out there.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Webcam

Postby ygator » Fri Aug 19, 2011 7:47 pm

I am trying out motion. Looks good, except for the colors are not coming out right.
So I went to compile it myself.
I did a configure which does show:
checking for linux/videodev.h... no
But when I type make I get
$this->bbcode_second_pass_code('', 'Generating dependencies, please wait...
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
motion.h:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
make: *** [.depend] Error 1
')

So what did you guys do to make this into a package?
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: Webcam

Postby kmihelich » Fri Aug 19, 2011 7:51 pm

It was likely built pre-V4L2.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Webcam

Postby ygator » Fri Aug 19, 2011 10:40 pm

I am going to have to see if I can recompile it to do some debugging.
I tried it under Ubuntu and the colors were fine.
It looks like the colors are masked and they are not put over the right part of the image.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: Webcam

Postby ygator » Sat Aug 20, 2011 1:24 am

I downloaded the Daily Snapshot from the subversion trunk. It was unable to compile with ffmpeg support, because they have coded it specifically for the PC platform. I was able to uninstall ffmpeg and then do a configure and compile it since it now supports not having linux/videodev.h. However, I still have the problem with the colors. I've tried a second webcam and it does the same thing. However, both webcams only support the JPEG palette. So there might be a bug lurking inside.

Definately a bug. I just checked and the JPEG image from the camera is perfect.
It then makes a call to mjpegtoyuv420p and this makes a call to decode_jpeg_raw.

I have just checked the yuv image data coming out of decode_jpeg_raw.
It is wrong, so the bug is inside that function somewhere.
Last edited by ygator on Sat Aug 20, 2011 5:21 pm, edited 1 time in total.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: Webcam

Postby pepedog » Sat Aug 20, 2011 10:29 am

/etc/motion/motion.conf
try
v4l2_palette 8
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Webcam

Postby ygator » Sat Aug 20, 2011 3:53 pm

8 is the default, but looking at the output shows that it is switching to 3 JPEG, because that is the only one the cameras support.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Next

Return to User Questions

Who is online

Users browsing this forum: No registered users and 4 guests