[MPlayer-users] About using RAM Buffer for MPlayer

alex z celeber4 at gmail.com
Wed Oct 31 16:24:25 CET 2007


Dear All,

I would like to use MPlayer on my Embedded Linux system for playing back
audio files. The audio files are storaged in hard disk. In order to reduce
power consumed & to protect HDD. I have to create a large buffer (32M
bytes), preload some audio files depend on user's playlist to the buffer and
then turn off the HDD. To mplayer, it works as a slave(with -slave -idle)
and always playback audio stream/files from the buffer.
But because:
1) load files from HDD will take some times, in order to playback audio file
ASAP. So, system just need to load 5% less or more of a file and immediately
playback it while loading it.
2) Before buffer is playing to become empty, we need to refill full the
buffer.
3) User maybe change the playlist or jump to next song frequently. So we
need to manage the buffer carefully and effectively.

So, can anybody give me some ideas & suggestions how to do that? Thanks too
much.
Have anybody done like that or seen some solutions about that?

IMHO, there are some solutions,
1) Load files to ramdisk, and then tell MPlayer to play from ramdisk. But
seem like it's not easy to manage the ramdisk effectively?
2) Build an audio stream sever on the device and then let MPlayer plays from
this server. To MPlayer, it doesnot care about playlist. And server manages
the playlist.
3) User the option -cache of MPlayer. (it can work???)

Any comments from you? Any discussion & suggestion is appreciated!

Best Regards,
Alex



More information about the MPlayer-users mailing list