Thanks oldcpu for such detailed help. It was useful
Yes, specifying audio device as ’ hw:x,y’ works in vlc. But when I specified my USB webcam Audio like that, it produces a harsh sound for a few seconds and then the sound dies in the capture. Also, inexplicable, vlc stops streaming after a few secs sometimes. Sometimes it works.
I tried wxcam which is an excellent application, small, compact. works very well, though I did not like having wxwidgets support for this application. It produces best sound, best picture.
With ffmpeg, I had no succes, however. I was disappointed for it’s failure. It complains like below.
[video4linux2 @ 0x80862e0] The V4L2 driver ioctl set standard(NTSC) failed
[video4linux2 @ 0x80862e0] Could not find codec parameters (Invalid Codec type -1)
[video4linux2 @ 0x80862e0] Estimating duration from bitrate, this may be inaccurate
/dev/video0: could not find codec parameters
The pixel format of the video from webcam is identified as YUY2 by vlc and YUYV by wxcam. Both capture it well. But this is not automatically recognised by ffmpeg. After I got the info from vlc, I changed my command line as,
ffmpeg --f rawvideo -pix_fmt uyvy422 -i /dev/video0 out.mpg
[IMGUTILS @ 0xbfc43cc4] Picture size 0x0 is invalid
[IMGUTILS @ 0xbfc43bd4] Picture size 0x0 is invalid
[rawvideo @ 0x80862e0] Could not find codec parameters (Video: rawvideo, uyvy422)
[rawvideo @ 0x80862e0] Estimating duration from bitrate, this may be inaccurate
/dev/video0: could not find codec parameters
ffmpeg -f video4linux2 -f rawvideo -pix_fmt yuyv422 -i /dev/video0 out.mpg
[IMGUTILS @ 0xbfc43cc4] Picture size 0x0 is invalid
[IMGUTILS @ 0xbfc43bd4] Picture size 0x0 is invalid
[rawvideo @ 0x80862e0] Could not find codec parameters (Video: rawvideo, yuyv422)
[rawvideo @ 0x80862e0] Estimating duration from bitrate, this may be inaccurate
/dev/video0: could not find codec parameters
But it does not stop complaining !! I do not know what I am missing. It seems to have support for this packed YUV compresssed format of raw video, but I accnot figure out what more to specify.
Thanks,