[MPlayer-users] Problem recording TV (massive sound desync)

Matija Grabnar matija.grabnar at arnes.si
Sat Dec 20 10:06:24 CET 2003


I just got a new machine with FlyTV 3000 video card, and I have problems
recording with mencoder.

Problem description: Regardless of input parameters (I tried all 
audiomodes, and I tried
forcechan=2 and forcechan=1) I get massive sound desync (so big you 
still get sound of
one person speaking when another person is opening their mouths on the 
video). The first
few seconds it seems like the sound is in sync, but it goes out of sync 
pretty fast. As you're
watching the video, it appears like the picture is going too fast, but 
the sound is OK, or maybe
a little low. The A-V indication on the playback is around 0 all the 
time, but the
actual desync becomes very massive, _very_ fast. Tens of seconds and more.

I thought it was a playback problem, but
a) the file plays the same on a different computer with known good playback
b) mplayer on this machine plays known good files OK.

I was able to record stuff OK with ffmpeg, but I prefer to use mencoder 
for all my stuff.

System info:
  Debian Unstable
Linux pika 2.4.23 #1 Thu Dec 18 07:23:40 CET 2003 i686 GNU/Linux
(Kernel patched with latest V4L2 patches from bytesex.org)
/lib/libc-2.3.2.so
XFree86 Version 4.2.1.1 (Debian 4.2.1-14 20031113215638 
root at newraff.debian.org) / X Window System
gcc version 3.3.3 20031206 (prerelease) (Debian)
GNU ld version 2.14.90.0.7 20031029 Debian GNU/Linux
GNU assembler 2.14.90.0.7 20031029 Debian GNU/Linux

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 10
model name      : AMD Athlon(tm) XP 2500+
stepping        : 0
cpu MHz         : 1830.012
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips        : 3643.80

Dec 19 23:52:58 pika kernel: Linux video capture interface: v1.00
Dec 19 23:52:58 pika kernel: saa7130/34: v4l2 driver version 0.2.9 loaded
Dec 19 23:52:58 pika kernel: saa7134[0]: found at 01:09.0, rev: 1, irq: 
11, latency: 32, mmio: 0xe6000000
Dec 19 23:52:58 pika kernel: saa7134[0]: subsystem: 5168:0138, board: 
LifeView FlyVIDEO3000 [card=2,autodetected]
Dec 19 23:52:58 pika kernel: saa7134[0]: board init: gpio is 39000
Dec 19 23:52:58 pika kernel: saa7134[0]: registered input device for IR
Dec 19 23:52:58 pika kernel: tuner: chip found @ 0xc2
Dec 19 23:52:58 pika kernel: tuner: type set to 5 (Philips PAL_BG 
(FI1216 and compatibles))
Dec 19 23:52:58 pika kernel: i2c-core.o: client [Philips PAL_BG (FI1216 
and comp] registered to adapter [saa7134[0]](pos. 0).
Dec 19 23:52:58 pika kernel: tuner: type forced to 5 (Philips PAL_BG 
(FI1216 and compatibles)) [insmod]
Dec 19 23:52:58 pika kernel: tuner: type already set (5)
Dec 19 23:52:58 pika kernel: i2c-core.o: adapter saa7134[0] registered 
as adapter 0.
Dec 19 23:52:58 pika kernel: saa7134[0]: i2c eeprom 00: 68 51 38 01 10 
28 ff ff ff ff ff ff ff ff ff ff
Dec 19 23:52:58 pika kernel: saa7134[0]: i2c eeprom 10: ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff
Dec 19 23:52:58 pika kernel: saa7134[0]: i2c eeprom 20: ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff
Dec 19 23:52:58 pika kernel: saa7134[0]: i2c eeprom 30: ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff
Dec 19 23:52:58 pika kernel: saa7134[0]: registered device video0 [v4l2]
Dec 19 23:52:58 pika kernel: saa7134[0]: registered device vbi0
Dec 19 23:52:58 pika kernel: saa7134[0]: registered device radio0
Dec 19 23:52:58 pika kernel: 0: nvidia: loading NVIDIA Linux x86 
nvidia.o Kernel Module  1.0-4496  Wed Jul 16 19:03:09 PDT 2003
D

Soundcard on motherboard:
Dec 19 23:52:58 pika kernel: i810: NVIDIA nForce Audio found at IO 
0xd800 and 0xd400, MEM 0x0000 and 0x0000, IRQ 9
Dec 19 23:52:58 pika kernel: i810_audio: Audio Controller supports 6 
channels.
Dec 19 23:52:58 pika kernel: i810_audio: Defaulting to base 2 channel mode.
Dec 19 23:52:58 pika kernel: i810_audio: Resetting connection 0
Dec 19 23:52:58 pika kernel: ac97_codec: AC97  codec, id: ALG96 (Unknown)
Dec 19 23:52:58 pika kernel: i810_audio: only 48Khz playback available.
Dec 19 23:52:58 pika kernel: i810_audio: AC'97 codec 0 Unable to map 
surround DAC's (or DAC's not present), total channels = 2

/home/matija/mplayer-cvs/main/mencoder -v tv:// -tv 
driver=v4l2:width=512:height=384:volume=100 -ovc lavc -lavcopts 
vcodec=mpeg4:vbitrate=750 -oac mp3lame -lameopts preset=medium -frames 
750 -o test30s.mpeg

MEncoder dev-CVS-031219-08:54-3.3.3 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton 1830 MHz (Family: 
6, Steppi
ng: 0)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Reading /home/matija/.mplayer/codecs.conf: This codecs.conf is too old 
and incom
patible with this MPlayer release! at line 6
Reading /usr/local/etc/mplayer/codecs.conf: Can't open 
'/usr/local/etc/mplayer/c
odecs.conf': No such file or directory
Using built-in default codecs.conf.
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /home/matija/.mplayer/mencoder: No such file or 
directory
init_freetype
get_path('font/font.desc') -> '/home/matija/.mplayer/font/font.desc'
Font /home/matija/.mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
STREAM: [null] tv://
STREAM: Description: Null stream
STREAM: Author: Albeu
STREAM: Comment:
success: format: 9  data: 0x0 - 0x0
TV 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: LifeView FlyVIDEO3000
 Tuner cap: STEREO LANG1 LANG2
 Tuner rxs: MONO STEREO
 Capabilites:  video capture  video overlay  VBI capture device  tuner  
read/wri
te  streaming
 supported norms: 0 = PAL; 1 = NTSC; 2 = SECAM; 3 = PAL-M; 4 = PAL-Nc;
 inputs: 0 = Television; 1 = TV (mono only); 2 = Composite1; 3 = 
Composite2; 4 =
 S-Video;
 Current input: 0
 Format GREY   ( 8 bits, 8 bpp gray): Planar Y800
 Format RGB555 (16 bits, 15 bpp RGB, le): RGB 15-bit
 Format RGB555X (16 bits, 15 bpp RGB, be): Unknown
 Format RGB565 (16 bits, 16 bpp RGB, le): RGB 16-bit
 Format RGB565X (16 bits, 16 bpp RGB, be): Unknown
 Format BGR24  (24 bits, 24 bpp RGB, le): BGR 24-bit
 Format RGB24  (24 bits, 24 bpp RGB, be): RGB 24-bit
 Format BGR32  (32 bits, 32 bpp RGB, le): BGR 32-bit
 Format RGB32  (32 bits, 32 bpp RGB, be): RGB 32-bit
 Format YUYV   (16 bits, 4:2:2 packed, YUYV): Packed YUY2
 Format UYVY   (16 bits, 4:2:2 packed, UYVY): Packed UYVY
 Format YUV422P (16 bits, 4:2:2 planar, Y-Cb-Cr): Planar 422P
 Format YUV420 (12 bits, 4:2:0 planar, Y-Cb-Cr): Planar I420
 Format YVU420 (12 bits, 4:2:0 planar, Y-Cb-Cr): Planar YV12
 Current format: BGR24
v4l2: current audio mode is : STEREO
v4l2: set Volume: 15 [-15, 15]
ioctl dsp getfmt: 0
Supported formats: 10
ioctl dsp setfmt: 0
ioctl dsp stereo: 0 (req: 1)
ioctl dsp speed: 0
ioctl dsp trigger: 0
trigger: 1
ioctl dsp trigger: 0
ioctl dsp getblocksize: 0
blocksize: 16384
v4l2: set format: YUV420
v4l2: set input: 0
v4l2: set width: 512
v4l2: set height: 384
Selected channel list: europe-east (including 133 channels)
Current frequency: 12788 (799.250)
==> Found video stream: 0
v4l2: get format: YUV420
v4l2: get fps: 25.000000
v4l2: get width: 512
v4l2: get height: 384
v4l2: set audio samplerate: 44100
v4l2: get audio format: 16
==> Found audio stream: 0
v4l2: get audio samplerate: 44100
v4l2: get audio samplesize: 2
v4l2: get audio channels: 2
  TV audio: 2 channels, 16 bits, 44100 Hz
Audio capture - buffer 668 blocks of 16384 bytes, skew average from 16 meas.
Using a ring buffer for maximum 1570 frames, 441 MB total size.
v4l2: set Brightness: 128 [0, 255]
v4l2: set Hue: 0 [-128, 127]
v4l2: set Saturation: 64 [0, 127]
v4l2: set Contrast: 68 [0, 127]
[V] filefmt:9  fourcc:0x32315659  size:512x384  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 176400->176400 (1411.2 kbit)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 512 x 384 (preferred csp: Planar YV12)
Trying filter chain: expand lavc
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (512x384->512x384,flags=0,'MPlayer',0x32315659)
REQ: flags=0x401  req=0x0 
videocodec: libavcodec (512x384 fourcc=58564944 [DIVX])
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
MP3 audio selected
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000001 
and bps =
2
[dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000001 
and bps =
2
LAME version 3.93 MMX  (http://www.mp3dev.org/)
CPU features: i387, MMX (ASM used), 3DNow! (ASM used), SIMD
Using polyphase lowpass  filter, transition band: 17960 Hz - 18494 Hz

misc:

        scaling: 0.000000
        ch0 (left) scaling: 0.000000
        ch1 (right) scaling: 0.000000
        filter type: 0
        quantization: xr^3/4
        huffman search: best (outside loop)
        experimental X=1 Y=1 Z=1
        ...

stream format:

        MPEG-1 Layer 3
        2 channel - joint stereo
        padding: off
        variable bitrate - VBR rh (default)
        ...

psychoacoustic:

        tonality estimation limit: 8871.700195 Hz
        using short blocks: channel coupled
        adjust masking: -1.000000 dB
        psymodel: 1
        noise shaping: 2
         ^ amplification: 1
         ^ stopping: 1
        ATH: using
         ^ type: 4
         ^ adjust type: 3
         ^ adapt threshold type: 2
        experimental psy tunings by Naoki Shibata
           adjust masking bass=0 dB, alto=0 dB, treble=0 dB, sfb21=3.75 dB
        using temporal masking effect: yes
        interchannel masking ratio: 0.000000
        ...

Forcing audio preload to 0, max pts correction to 0
Writing AVI header...

preset=medium

v4l2: going to capture
*** [expand] Exporting mp_image_t, 512x384x12bpp YUV planar, 294912 bytes
*** [lavc] Allocating mp_image_t, 512x384x12bpp YUV planar, 294912 bytes
Pos:   0.0s      1f ( 0%)   0fps Trem:   0min   0mb  A-V:0.000 [0:0] 
A/Vms 0/3 D






More information about the MPlayer-users mailing list