Re: installing a web cam

View: New views
6 Messages — Rating Filter:   Alert me  

Re: installing a web cam

by jyothi naga :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello 

can you please tell me how to use webcam in ubutnu, i mean which drivers to install ?My laptop(HP) is having inbuilt webcam.

Jyothi.


Re: installing a web cam

by Jagadeesh N. Malakannavar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jyothi,

Sit in front of you laptop and run following command

ffmpeg -f oss -i /dev/dsp -f video4linux2 -s 320x240 -i /dev/video0
jyothi.mpg

Then smile for couple of minutes and then hit 'q' [without '']

Thats it. Your smile is captured in jyothi.mpg

Thanks
Jagadeesh


On Wed, Jul 1, 2009 at 5:57 PM, jyothi naga <nagajyothi_1988@...>wrote:

>
>
>
> Hello
>
> can you please tell me how to use webcam in ubutnu, i mean which drivers to
> install ?My laptop(HP) is having inbuilt webcam.
>
> Jyothi.
>
>  
>



--
Many Thanks
Jagadeesh N.Malakannavar
GSM: +91 9901001180


[Non-text portions of this message have been removed]


Re: installing a web cam

by Parag Shah-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jagadeesh,

I tried the command you mentioned, but get an error message (shown below):

[video4linux2 @ 0x7fabdf7e3040]Missing/Wrong width, height or framerate
/dev/video0: Error while opening file

There are some lines preceding the error message as well: Here's the entire dump from the screen:

FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3.1, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --enable-shared --disable-static
  libavutil version: 49.6.0
  libavcodec version: 51.50.0
  libavformat version: 52.7.0
  libavdevice version: 52.0.0
  built on Mar 13 2009 17:52:45, gcc: 4.3.2
Input #0, oss, from '/dev/dsp':
  Duration: N/A, start: 1247031899.394249, bitrate: N/A
    Stream #0.0: Audio: pcm_s16le, 44100 Hz, mono, 705 kb/s
[video4linux2 @ 0x7f9101a12040]Missing/Wrong width, height or framerate
/dev/video0: Error while opening file



Am I missing something?
 
Regards
Parag Shah

________________________________
From: Jagadeesh N. Malakannavar <mnjagadeesh@...>
To: twincling@...
Sent: Thursday, 2 July, 2009 10:30:57 AM
Subject: Re: [twincling] installing a web cam

Hi Jyothi,

Sit in front of you laptop and run following command

ffmpeg -f oss -i /dev/dsp -f video4linux2 -s 320x240 -i /dev/video0
jyothi.mpg

Then smile for couple of minutes and then hit 'q' [without '']

Thats it. Your smile is captured in jyothi.mpg

Thanks
Jagadeesh


Re: installing a web cam

by Saifi Khan-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 8 Jul 2009, Parag Shah wrote:

> Hi Jagadeesh,
>
> I tried the command you mentioned, but get an error message (shown below):
>
> [video4linux2 @ 0x7fabdf7e3040]Missing/Wrong width, height or framerate
> /dev/video0: Error while opening file
>

Dear Parag:

The device entry (/dev/video0) is missing and it is expected to
"dynamically" appear when a webcam is attached.

can you please attach the webcam that you have and wait for 5
sec ?

next,

ls -l  /dev/video0

if you get no such file or directory, please paste the 'dmesg'
command output at http://twincling.pastebin.com/ and post the
URL here.

Additionally, please post the output of the following commands
as well:

1. uname -r

2. lsusb

The info you provide will help in troubleshooting your scenario.


thanks
Saifi.

Re: installing a web cam

by Parag Shah-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Saifi,

Thanks for your reply. I think I missed one point in the original mail. I was trying to get my integrated webcam to work, whereas perhaps the original mail was intended for an external webcam.

Can I try the command on an integrated webcam as well?

ffmpeg -f oss -i /dev/dsp -f video4linux2 -s 320x240 -i /dev/video0 parag.mpg

Do I still need to refer to /dev/video0 or is another file associated with the integrated webcam? Is there any way to find out which file is associated with my integrated webcam?

BTW, my Webcam works with Skype. I am just trying to get it work on the command line.

Thaks & Regards
Parag Shah

Re: installing a web cam

by Saifi Khan-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 10 Jul 2009, Parag Shah wrote:

> Dear Saifi,
>
> Thanks for your reply. I think I missed one point in the
> original mail. I was trying to get my integrated webcam to
> work, whereas perhaps the original mail was intended for an
> external webcam.
>
> Can I try the command on an integrated webcam as well?
>
> ffmpeg -f oss -i /dev/dsp -f video4linux2 -s 320x240 -i
> /dev/video0 parag.mpg
>
> Do I still need to refer to /dev/video0 or is another file
> associated with the integrated webcam? Is there any way to
> find out which file is associated with my integrated webcam?
>
> BTW, my Webcam works with Skype. I am just trying to get it
> work on the command line.
>
> Thaks & Regards Parag Shah
>

Hi Parag:

The device entry '/dev/video*' is a virtual device node entry.

You can do a visual inspection of the /dev directory to check
for this entry.

Another approach would be to 'strace' the application that you
run to access the webcam. You'd see a 'open' sys call for the
device node, what is used to read the video frames.

As you mention, webcam works Skype, take a look at the /dev
entry. Next startup skype and try to use webcam. Now, just
run the command 'ls -ltr /dev' should show the entry at the
bottom of the listing.

Hope this helps.


thanks
Saifi.