[Alsa-user] mplayer, dmix and various bitrates
Brought to you by:
perex
From: Ciprian P. <ci...@zu...> - 2004-09-04 22:03:07
|
Hello, I'm new to this so please have patience with me. I have a FM801 based soundcard (Genius SoundMaker 5.1). I wanted to enable software mixing so I don't have mplayer and xmms blocking each other and such stuff. I accomplished it with the ~/.asoundrc at the end of this message. The trouble I'm having: various movie clips I watch with mplayer have various bitrates ie. not all are 44100. Problem is that dmix transforms it to whatever rate I specify with the "rate" config, but it actually causes mplayer to go slower or faster, depending on whether the original rate was more or less than 44100. For instance, if I have a less than 44100 bitrate on a movie, mplayer plays it faster than normal and the sound is sqweaky. It's only mplayer that does this, xmms plays low bitrates at normal speed. Any idea how I can make mplayer+dmix work well together at any combination of movie rate/dmix rate? I tried using -af resample=value with mplayer to try and match the rate that dmix enforces, but it only works for mplayer 0.95. With Mplayer 1.0 it for certain combinations of the original rate and the target rate (ie. 24k to 48k), but other combinations (44.1k to 48k) will produce horrible sound. ------------------------------------ pcm.!default { type plug slave.pcm "ossmix" } pcm.dsp0 { type plug slave.pcm "ossmix" } ctl.mixer0 { type hw card 0 } pcm.ossmix { type dmix ipc_key 1024 # must be unique! slave { pcm "hw:0,0" # you cannot use a "plug" device here, darn. period_time 0 period_size 1024 # must be power of 2 buffer_size 8192 # dito. It #format "S32_LE" #periods 128 # dito. rate 44100 # with rate 8000 you *will* hear, # if ossmix is used :) } bindings { 0 0 # from 0 => to 0 1 1 # from 1 => to 1 } } -- Ciprian Popovici |