View Single Post
rm_you's Avatar
Posts: 98 | Thanked: 189 times | Joined on Jul 2007 @ San Antonio, TX
#42
Well, I did get mplayer building, so now I will start hacking on it a bit more... Increasing the alsa buffer size seems to have helped a lot with the skipping issues... IE, it no longer skips mplaying mp3s for me, as long as I be nice to it (no using the device, but that was the same in 2007). I am able to run top in another terminal without impacting playback, and it reports mplayer is using an average of about 55-60% CPU. Also, the output is a lot cleaner (much less resetting the audio device). Originally I was planning on increasing the buffer size manually in the code, but switching from CUNKSIZE based buffer size to BUFFERTIME based size, it took care of itself. Just a simple #define! The buffer size seems to cap at 25600, just slighting above the default value for a PC, so this is about the best gain we can get from this method. I guess I'll start investigating other options for further improvements...

-------

Here is the deb I'm using currently, with that fix. Tell me if you hear better performance as well!

http://cs.trinity.edu/~aharwell/mpla...l_bufftime.deb

Copy/paste-able instructions:
Code:
wget http://cs.trinity.edu/~aharwell/mplayer_1.0rc1-maemo.24.n8x0_armel_bufftime.deb
apt-get remove mplayer
apt-get install libmad0 libogg0 libtheora0
dpkg -i mplayer_1.0rc1-maemo.24.n8x0_armel_bufftime.deb
Also, they seem to play fine with libmad, so no real need to use ffmp3 AFAIK... which makes playing stuff as simple as
Code:
mplayer -ao alsa:device=bluetooth my.mp3
That also means that with some slight modification of the mplayer config file, it should be possible to switch between normal audio and a2dp in Kagu by switching between osso and mplayer! I will test that shortly...

Edit 2: WOW. So, with the following ~/.mplayer/config
Code:
ao=alsa:device=bluetooth
I can run Kagu and play a song, switch to mplayer output, and it *works* beautifully. I can even scroll through my albums and edit the playlist while it plays via a2dp, with no skipping (though it scrolls fairly slowly). I get one or two small "pops" per song, which don't appear to be related to CPU lag or alsa anything... I think it did the same thing in 2007, and it was just wireless interference.

Edit 3: I just tried playing video, because I was curious how badly it worked. They play perfectly even with a2dp audio! Please test this as well, if you can.
Note: For video playback, I have found it necessary to add
Code:
delay=0.2
to my ~/.mplayer/config for correct A/V sync. That value will probably vary somewhere between 0-0.4 depending on other factors, like the video being played and possibly your specific hardware. Meaning, it may not be necessary at all for low quality video, but very high quality videos require something around 0.3. Setting the delay for each video individually is less than ideal, but considering this works at all, I am *not* about to complain! :P

Last edited by rm_you; 2008-01-02 at 16:38.
 

The Following 6 Users Say Thank You to rm_you For This Useful Post: