Отправляет email-рассылки с помощью сервиса Sendsay

Re: еще раз о звуке из usb

Прошу прощения за назойливость, но все-таки хочется довести начатое до
конца. Я пытаюсь захватить видео (со звуком) из usb-ной веб-камеры.
По-отдельности все работает. А как вместе соединить? (не в смысле
отдельно записать, а потом соединить)
# arecord -v -t wav -f cd record.wav
Recording WAVE 'record.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Plug PCM: Route conversion PCM (sformat=S16_LE)
Transformation table: // хотелось бы знать
0 <- 0 // что именно это означает
1 <- 0 //
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 22050
period_size : 5512
period_time : 125000
tick_time : 10000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 5512
xfer_align : 5512
start_threshold : 1
stop_threshold : 22050
silence_threshold: 0
silence_size : 0
boundary : 1445068800
Slave: Rate conversion PCM (8000, sformat=S16_LE)
Its setup is:
stream : CAPTURE
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 22050
period_size : 5512
period_time : 125000
tick_time : 10000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 5512
xfer_align : 5512
start_threshold : 1
stop_threshold : 22050
silence_threshold: 0
silence_size : 0
boundary : 1445068800
Slave: Hardware PCM card 0 'USB Camera' device 0 subdevice 0

Its setup is:
stream : CAPTURE
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 8000
exact rate : 8000 (8000/1)
msbits : 16
buffer_size : 4000
period_size : 1000
period_time : 125000
tick_time : 10000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 1000
xfer_align : 1000
start_threshold : 0
stop_threshold : 4000
silence_threshold: 0
silence_size : 0
boundary : 262144000
Aborted by signal Interrupt...
Захват аудио с микрофона проходит нормально. Но при попытке
"прикрутить" в mencoder-е ничего нет. Только видео

mencoder -tv on:driver=v4l:width=640:height=480:norm=PAL:outfmt=i420:forceaudio:alsa:amode=1:adevice=hw.0,0:audioid=1:volume=65535
-vc rawi420 -o test.avi -ovc divx4 -v -oac copy
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale


MEncoder 0.90rc5-3.2.2 (C) 2000-2003 Arpad Gereoffy (see DOCS)

CPU: Intel Pentium 4 Xeon Foster (Family: 8, Stepping: 3)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Reading /root/.mplayer/codecs.conf: can't open '/root/.mplayer/codecs.conf':
No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: 50 audio & 136 video codecs
File not found: 'frameno.avi'
Reading config file /root/.mplayer/mencoder: No such file or directory
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
success: format: 0 data: 0x0 - 0x0
TV detected! ;-)
Selected driver: v4l
name: Video 4 Linux input
author: Alex Beregszaszi <al***@n*****.org>
comment: under development
Selected device: OV518+ USB Camera
Capabilites: capture subcapture
Device type: 513
Supported sizes: 160x120 => 640x480
Inputs: 1
0: Camera: (tuner:0, norm:pal)
mbuf: size=921616, frames=2
Channel count not available - reverting to default: 1
Hardware PCM card 0 'USB Camera' device 0 subdevice 0

Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 8000
exact rate : 8000 (8000/1)
msbits : 16
buffer_size : 8000
period_size : 2000
period_time : 250000
tick_time : 10000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 2000
xfer_align : 2000
start_threshold : 0
stop_threshold : 8000
silence_threshold: 0
silence_size : 0
boundary : 2097152000
Audio capture - buffer 256 blocks of 4000 bytes, skew average from 16 meas.
Using input 'Camera'
Selected norm: PAL
Requested width: 640
Requested height: 480
Selected input hasn't got a tuner!

Output format: Planar I420
Picture values:
Depth: 12, Palette: yuv420p (Format: Planar I420)
Brightness: 24064, Hue: 49152, Colour: 49152, Contrast: 28672
Audio capture - buffer 256 blocks of 4000 bytes, skew average from 16 meas.
Using a ring buffer for maximum 139 frames, 61 MB total size.
[V] filefmt:9 fourcc:0x30323449 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
Forced video codec: rawi420
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred csp: Planar I420)
Trying filter chain: expand divx4
VDec: using Planar I420 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (640x480->640x480,flags=0,'MPlayer',0x30323449)
REQ: flags=0x3 req=0x0
Selected video codec: [rawi420] vfm:raw (RAW I420)
Writing AVI header...
Forcing audio preload to 0, max pts correction to 0

video capture thread: frame delta ~ 0,9 fps
*** [expand] Exporting mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
*** [divx4] Allocating mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
get_path('subfont.ttf') -> '/root/.mplayer/subfont.ttf'
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Pos: 1,0s 1f ( 0%) 1fps Trem: 0min 0mb A-V:0,000 [193:0] A/Vms
0/80 D/B/S 25/0/0
video capture thread: frame delta ~ 4,6 fps
Pos: 1,2s 2f ( 0%) 1fps Trem: 0min 0mb A-V:0,000 [370:0] A/Vms
0/82 D/B/S 29/0/0
video capture thread: frame delta ~ 7,4 fps
-----------*Writing AVI index...
Fixing AVI header...

Video stream: 398,020 kbit/s (49752 bps) size: 477624 bytes 9,600 secs 79
frames
uninit video: raw
DEMUXER: freeing demuxer at 0x83a6c40
Waiting for threads to finish...
video capture thread: frame delta ~ 7,3 fps
done
DEMUXER: freeing sh_video at 0x83af470

Заранее благодарен.

Ответить   Fri, 20 Aug 2004 17:58:32 +0400 (#215522)