View previous topic :: View next topic |
Author |
Message |
discomfitor l33t
Joined: 21 Feb 2003 Posts: 927 Location: None
|
Posted: Fri Jan 16, 2004 3:53 am Post subject: Alsa+dmix+mplayer=success |
|
|
For those of you having the periodsize error with mplayer+alsa+dmix, you need to make an adjustment to the mplayer source code. In libao2/ao_alsa9.c in the mplayer source:
Code: |
-if ((err = snd_pcm_hw_params_set_period_size(alsa_handler,alsa_hwparams, chunk_size, 0)) < 0)
+if ((err = snd_pcm_hw_params_set_period_size_near(alsa_handler,alsa_hwparams, chunk_size, 0)) < 0) |
should be around line 620 or so. Then compile it and install. Alsa+dmix will work, but sometimes it will play too fast. This is cause by the rate getting set to 22000 or somesuch. Just manually set it to 44100 in your asoundrc, and you should be good to go. Then again, YMMV. _________________ There is no substitute for experience.
Imperfection indicates a lack of effort. |
|
Back to top |
|
|
Niek Apprentice
Joined: 14 May 2002 Posts: 236 Location: Houten, The Netherlands
|
Posted: Fri Jan 16, 2004 4:12 pm Post subject: |
|
|
Thanks, this fixed my MPlayer problems Can you please file a bug on BGO, I think this patch should be included in the ebuilds. _________________ Bezoek ook eens de Nederlandstalige Gentoo IRC channel op irc.freenode.net - #gentoo-nl |
|
Back to top |
|
|
raptor Apprentice
Joined: 20 Sep 2002 Posts: 171
|
Posted: Fri Jan 16, 2004 7:38 pm Post subject: me too |
|
|
I got many times similar problems with mplayer and alsa...
yep.. if included in the .ebuilds or directly in mplayer will be good.. |
|
Back to top |
|
|
discomfitor l33t
Joined: 21 Feb 2003 Posts: 927 Location: None
|
Posted: Sat Jan 17, 2004 2:42 am Post subject: |
|
|
Filed the bug. Glad it works well. _________________ There is no substitute for experience.
Imperfection indicates a lack of effort. |
|
Back to top |
|
|
Bash[DevNull] Guru
Joined: 10 Oct 2003 Posts: 333
|
Posted: Sat Mar 13, 2004 11:00 pm Post subject: |
|
|
Hmm... i can't find this patch in ebuild.... Were is it???? _________________ Biomechanical Artificial Sabotage Humanoid |
|
Back to top |
|
|
gabor Apprentice
Joined: 12 Dec 2002 Posts: 156 Location: Slovakia
|
Posted: Wed Mar 24, 2004 8:29 pm Post subject: |
|
|
hmm... i added the .asoundrc as described in https://forums.gentoo.org/viewtopic.php?t=122076,
and it works,
but...hmmm....
i still need to do more testing, but it seems that the video is smoother when mplayer uses the raw/normal/whateverishisname alsa device.....
could anyone else check it too? maybe it's only my eyes ) |
|
Back to top |
|
|
discomfitor l33t
Joined: 21 Feb 2003 Posts: 927 Location: None
|
Posted: Thu Mar 25, 2004 2:22 am Post subject: |
|
|
Argh! I was looking for this post! Anyway, I posted another topic about mplayer and dmix which has a better fix. You might want to try that as well if you found this to be effective. _________________ There is no substitute for experience.
Imperfection indicates a lack of effort. |
|
Back to top |
|
|
gabor Apprentice
Joined: 12 Dec 2002 Posts: 156 Location: Slovakia
|
Posted: Thu Mar 25, 2004 11:04 am Post subject: |
|
|
darckness:
i already have mplayer from cvs, so that's not the problem. it WORKS with dmix, i mean i can watch 2 movies at the same time with sound.
the problem is that it's not that smooth as when used with the 'raw' alsa output.
i verified it, i created a script, which randomly started a video file with either 'raw' alsa or with 'dmix' alsa, and then when the video stopped, displayed me what mode he used.
i could guess for 99.9% when it was raw, and when dmix.
so there's a difference.
i admit it's not that big, but it's still there. |
|
Back to top |
|
|
|