Webcam / motion

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

Re: Webcam

Postby ygator » Sat Aug 20, 2011 7:13 pm

Okay I found the problem.
Setting dinfo.do_fancy_upsampling = FALSE in the couple places they initiailize dinfo in jpegutils.c now has the colors coming out correct.

Looking into libjpeg after jpeg_create_decompress and then jpeg_read_header the do_fancy_upsampling is set to its default of TRUE.

So either libjpeg does not handle it being set to TRUE correctly or the motion program should have set it to FALSE.

Now to move on to the ffmpeg support problem.
They actually have inline assembly in the code.

Okay that was easy. All I had to do was take out the inline assembly code. It looks to be all working now.

More features then the packaged version.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: Webcam / motion

Postby pepedog » Wed Aug 31, 2011 8:09 pm

Have you sorted out a PKGBUILD and patches yet? Thanks
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Webcam / motion

Postby ygator » Sun Sep 04, 2011 9:08 pm

I just downloaded the latest motion from http://www.lavrsen.dk/sources/motion-daily//motion-daily-last.tar.gz

In the file ffmpeg.c I just deleted the following lines so that it would compile under ARM.
$this->bbcode_second_pass_code('', '#ifndef __SSE_MATH__
__asm__ __volatile__ ( "emms");
#endif
')

In the file jpegutils.c after the line (there are two places) I set fancy to false as the colors were skewed without it from my JPEG cameras. Also I believe this is needed due to a bug in libjpeg not working under ARM as it seems to work under x86.
$this->bbcode_second_pass_code('', ' jpeg_read_header (&dinfo, TRUE);
')
I added the line
$this->bbcode_second_pass_code('', ' dinfo.do_fancy_upsampling = FALSE;
')

I you are already running motion do not start with your old config file as there are a lot of changes.
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: Webcam / motion

Postby pepedog » Sun Sep 04, 2011 10:32 pm

I already took out the emms lines, will try the others too.
But I don't hold out much hope. I don't have wrong colours at this point.
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Webcam / motion

Postby ygator » Mon Sep 05, 2011 8:39 pm

$this->bbcode_second_pass_quote('pepedog', 'B')ut I don't hold out much hope.

What does this mean? Does it not work for you?
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: Webcam / motion

Postby pepedog » Mon Sep 05, 2011 10:31 pm

Just grey captures for me.
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Webcam / motion

Postby ygator » Tue Sep 06, 2011 12:58 am

Are you able to produce an good image with fswebcam?
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: Webcam / motion

Postby pepedog » Tue Sep 06, 2011 6:13 am

Exactly the same.
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Webcam / motion

Postby ygator » Tue Sep 06, 2011 5:26 pm

I would guess problem with the camera driver then.

Here is what my camera uses.
$this->bbcode_second_pass_code('', 'gspca_zc3xx 33162 0
gspca_main 16921 1 gspca_zc3xx
videodev 63679 1 gspca_main
i2c_core 15432 1 videodev
')
ygator
 
Posts: 97
Joined: Tue Aug 10, 2010 9:37 pm

Re: Webcam / motion

Postby ucol » Mon Feb 13, 2012 3:58 am

hi, would you please share me how to use fswebcam? thanks very much :)

$this->bbcode_second_pass_quote('ygator', 'I')s 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
ucol
 
Posts: 2
Joined: Mon Feb 13, 2012 3:55 am

Previous

Return to User Questions

Who is online

Users browsing this forum: No registered users and 6 guests