[MPlayer-users] mencoder vs. saa7134_alsa
Rumi Szabolcs
rumi_ml at rtfm.hu
Mon Nov 6 16:55:33 CET 2006
Hello!
I'm trying to get a Terratec Cinergy 250 PCI TV tuner card working
which is based on the SAA7131E and TDA8275A ICs.
This card doesn't have an external loop for sound but needs
the saa7134_alsa module to provide an internal sound grabber
device under ALSA. I was trying to use that with mplayer-1.0rc1
and found that somehow it does not detect or set the audio
bitrate correctly on that device.
When I try this:
$ mencoder tv:// -tv driver=v4l2:device=/dev/video0:normid=3:freq=695.250:width=720:height=576:alsa:adevice=hw.0,0:amode=1 \
-fps 25 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2048:autoaspect=1:mbd=2 -oac mp3lame -lameopts cbr:br=128 -o test.avi
mencoder reported ~17fps while encoding the video and the sound
in the resulting .avi was a lot higher pitched and faster than
the original, not in sync with the video which was at normal
speed. Mencoder reported that the audio sample rate was 48000Hz.
My bet was that the reported fps is rather 16.5 which is
exactly 0.666*25fps. When I have set "nosound" instead of the
above then it went up to 25fps. Then I've set the audiorate
explicitly to 48000 and 44100 but the sound pitch was still
higher in both cases. Then I have set audiorate=32000
(48000*0.666) and voilá, the sound pitch went normal and
the fps got 25 as it should have been. As the SAA7131
officially supports the sample rates 32000, 44100, and 48000,
any of these should be working or am I wrong?
Thanks!
Best regards,
Sab
Some background information follows:
$ lspci -vvv
04:08.0 Multimedia controller: Philips Semiconductors SAA7133 Video Broadcast Decoder (rev d0)
Subsystem: TERRATEC Electronic GmbH Unknown device 1160
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (21000ns min, 8000ns max)
Interrupt: pin A routed to IRQ 233
Region 0: Memory at faaff800 (32-bit, non-prefetchable) [size=2K]
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
$ lspci -n
04:08.0 0480: 1131:7133 (rev d0)
$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: SAA7134 [SAA7134], device 0: SAA7134 PCM [SAA7134 PCM]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ICH [Intel ICH], device 0: Intel ICH [Intel ICH]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ICH [Intel ICH], device 1: Intel ICH - MIC ADC [Intel ICH - MIC ADC]
Subdevices: 1/1
Subdevice #0: subdevice #0
$ amixer -c 0 scontents
Simple mixer control 'Line',1
Capabilities: volume cswitch
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 20
Front Left: 20 [100%] Capture [off]
Front Right: 20 [100%] Capture [off]
Simple mixer control 'Line',2
Capabilities: volume cswitch
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 20
Front Left: 20 [100%] Capture [off]
Front Right: 20 [100%] Capture [off]
Simple mixer control 'Video',0
Capabilities: volume cswitch
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 20
Front Left: 20 [100%] Capture [on]
Front Right: 20 [100%] Capture [on]
More information about the MPlayer-users
mailing list