[MPlayer-users] Using mencoder to record from pwc webcam

Nicholas Piper nick-mplayer at nickpiper.co.uk
Sun Apr 20 01:33:04 CEST 2003


Hi everyone,

I can get both a picture or audio from my PWC webcam, but not both at
the same time.

Using a command such as :

 mencoder
       -tv on:driver=v4l:width=640:height=480:adevice=/dev/dsp3:device=/dev/video0
       -o /tmp/output.avi
       -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900
       -oac mp3lame -lameopts cbr:br=32

I get sound taken from my webcam, and a picture from my TV card (on
/dev/video0).

If I put device=/dev/video1 instead, I get a picture from the webcam,
but no sound.

It seems that it needs some response that the TV card gives it, before
it will enable sound recording.

I've tried with :forceaudio: and :forcechan=1:, with no
chance. forcechan=2 gives "Unable to set stereo: 1"

Below are some snippets from stdout, for both using video0 and video1.

Thanks for any help,

 Nick



With device=/dev/video0

mencoder -tv on:driver=v4l:width=640:height=480:adevice=/dev/dsp3:device=/dev/video0 -o /tmp/output.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 -oac mp3lame -lameopts cbr:br=32

Selected driver: v4l
 name: Video 4 Linux input
 author: Alex Beregszaszi <alex at naxine.org>
 comment: under development
Selected device: BT878(Hauppauge (bt878))
 Capabilites: capture tuner overlay clipping frameram scales 
 Device type: 235
 Supported sizes: 48x32 => 924x576
 Inputs: 4
  0: Television: tuner audio tv camera  (tuner:1, norm:pal)
  1: Composite1: audio camera  (tuner:0, norm:pal)
  2: S-Video: audio camera  (tuner:0, norm:pal)
  3: Composite3: audio camera  (tuner:0, norm:pal)
audio block size too low, setting to 8192!
Using input 'Television'
[V] filefmt:9  fourcc:0x32315659  size:640x480  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 1 ch, 16 bit (0x10), ratio: 88200->88200 (705.6 kbit)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand=-1:-1:-1:-1:1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (640x480 fourcc=58564944 [DIVX])
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
MP3 audio selected
Building audio filter chain for 44100Hz/1ch/16bit -> 44100Hz/1ch/16bit...
Writing AVI header...
Forcing audio preload to 0, max pts correction to 0
Pos:  45.2s   1129f ( 0%)  25fps Trem:   0min   0mb  A-V:0.000 [920:31]]

------------------------------------------------------------------------------------

With device=/dev/video1 

mencoder -tv on:driver=v4l:width=640:height=480:adevice=/dev/dsp3:device=/dev/video1 -o /tmp/output.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 -oac mp3lame -lameopts cbr:br=32

Selected driver: v4l
 name: Video 4 Linux input
 author: Alex Beregszaszi <alex at naxine.org>
 comment: under development
Selected device: Philips 740 webcam
 Capabilites: capture 
 Device type: 1
 Supported sizes: 160x120 => 640x480
 Inputs: 1
  0: Webcam:  (tuner:0, norm:pal)
audio block size too low, setting to 8192!
Using input 'Webcam'
Selected input hasn't got a tuner!
[V] filefmt:9  fourcc:0x32315659  size:640x480  fps:25.00  ftime:=0.0400
Opening video filter: [expand=-1:-1:-1:-1:1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (640x480 fourcc=58564944 [DIVX])
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
Writing AVI header...
Forcing audio preload to 0, max pts correction to 0
Pos:  11.4s    103f ( 0%)   9fps Trem:   0min   0mb  A-V:0.000 [377:0]


-- 
Part 3 MEng Cybernetics; Reading, UK       http://www.nickpiper.co.uk/
GPG Encrypted mail welcome!                             1024D/3ED8B27F
Choose life. Be Vegan :-) Please reduce needless cruelty + suffering !



More information about the MPlayer-users mailing list