[MPlayer-users] can not record audio from tuner card

LeVA leva at az.isten.hu
Sat Nov 25 15:09:37 CET 2006


Hi!

I have an AVerMedia TVPhone98 card. I'm using linux kernel 2.6.18.3, 
alsa with the emu10k1 module and the bttv module. I can watch tv (with 
sound) with xdtv or tvtime etc...
When I want to watch tv with mplayer I'm using this command:

$ mplayer -tv driver=v4l2:input=0:forceaudio:alsa:channel=31 tv://
MPlayer dev-SVN-r21050-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.66GHz (Family: 15, Model: 2, Stepping: 
9)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski at zpr.uni-koeln.de>
 comment: first try, more to come ;-)
Selected device: BT878 video (AVerMedia TVPhone
 Tuner cap:
 Tuner rxs: STEREO
 Capabilites:  video capture  video overlay  VBI capture device  tuner  
read/write  streaming
 supported norms: 0 = PAL; 1 = NTSC; 2 = SECAM; 3 = PAL-Nc; 4 = PAL-M; 5 
= PAL-N; 6 = NTSC-JP; 7 = PAL-60;
 inputs: 0 = Television; 1 = Composite1; 2 = S-Video;
 Current input: 0
 Current format: YVU420
v4l2: current audio mode is : STEREO
Selected channel: 31 (freq: 551.250)
Opening video filter: [pp=hb/vb/dr/al/lb/tmpnoise:1:2:3]
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Planar YV12)
[PP] Using external postprocessing filter, max q = 6.
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 => 640x480 Planar YV12  [zoom]
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
==========================================================================
Audio: no sound
Starting playback...
Selected channel: 33 (freq: 567.250)
Selected channel: 32 (freq: 559.250)
v4l2: 98 frames successfully processed, 12 frames dropped.

Exiting... (Quit)



With that I can not hear sound until I change channels with key 'h' 
or 'k'.

And there is a problem with the recording too.

$ mencoder -tv driver=v4l2:input=0:normid=0 -vf [..] -ovc [..] \
  -oac [..] tv:// -o test.avi
MEncoder dev-SVN-r21050-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.66GHz (Family: 15, Model: 2, Stepping: 
9)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 9  data: 0x0 - 0x0
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski at zpr.uni-koeln.de>
 comment: first try, more to come ;-)
Selected device: BT878 video (AVerMedia TVPhone
 Tuner cap:
 Tuner rxs: STEREO
 Capabilites:  video capture  video overlay  VBI capture device  tuner  
read/write  streaming
 supported norms: 0 = PAL; 1 = NTSC; 2 = SECAM; 3 = PAL-Nc; 4 = PAL-M; 5 
= PAL-N; 6 = NTSC-JP; 7 = PAL-60;
 inputs: 0 = Television; 1 = Composite1; 2 = S-Video;
 Current input: 0
 Current format: YVU420
v4l2: current audio mode is : MONO
Audio block size too low, setting to 8192!
[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, s16le, 705.6 kbit/100.00% (ratio: 88200->88200)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [pp=hb/vb:a/dr/al/lb/tmpnoise:1:2:3]
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Planar YV12)
[PP] Using external postprocessing filter, max q = 6.
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (640x480 fourcc=34504d46 [FMP4])
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
==========================================================================
MP3 audio selected.
Forcing audio preload to 0, max pts correction to 0.
Writing header...1f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
ODML: vprp aspect is 4:3.
Writing header...
ODML: vprp aspect is 4:3.
Pos:   4.4s    109f ( 0%) 23.84fps Trem:   0min   0mb  A-V:0.000 
[4095:191]
Flushing video frames


CBR audio: 24000 bytes/sec, 627 bytes/block
Writing index...
Writing header...
ODML: vprp aspect is 4:3.

Video stream: 4095.996 kbit/s  (511999 B/s)  size: 2232318 bytes  4.360 
secs  109 frames

Audio stream:  191.998 kbit/s  (23999 B/s)  size: 104071 bytes  4.336 
secs
v4l2: 113 frames successfully processed, 0 frames dropped.



Then when I playback the file ...

$ mplayer test.avi
MPlayer dev-SVN-r21050-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.66GHz (Family: 15, Model: 2, Stepping: 
9)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

Playing proba_2006-11-25_15-02-35_cbb184dd8e05c9709e5dcaedaa0495cf.avi.
AVI file format detected.
VIDEO:  [FMP4]  640x480  24bpp  25.000 fps  4096.0 kbps (500.0 kbyte/s)
Clip info:
 Software: MEncoder dev-SVN-r21050-4.1.2
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 640 x 480 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [xv] 640x480 => 640x480 Planar YV12  [zoom]
A:   1.6 V:   1.6 A-V:  0.001 ct:  0.000  40/ 40 18%  0%  0.7% 0 0
Exiting... (Quit)


... there is no sound.

Anyone could help me with this?
Thanks!

Daniel

-- 
LeVA



More information about the MPlayer-users mailing list