Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Well, everyone knows (I mean a lot of superpower users) that all kinds of multimedia applications need to read a part of the media files into the memory, and after processing, play that part for the user.For example, when you want to play an mp3 file using WMP, first it reads a chunk of data from the hard disk, and then plays that section, and if you check WMP's disk I/O activity during play time (using Process Hacker, or Process Explorer, or simply Task Manager), you would notice that based on the bitrate of the file, WMP keeps reading from the hard drive.

Now my question is this: Does anyone here know any media player, or music player application which would instead of keeping reading from the mp3 files directly from the hard drive, would just load the whole file into the memory and play it from there (Something like what my old portable CD-Player does to save energy. I have tested it this way: I insert a disk, then make it think (stupid little machine:) that the door is closed so it could play the disk (I have been careful about the laser thingy), then I hit the play button and I could watch what is going on inside: It starts spinning my CD till it finds the first track, then it again keeps spinning for about 45 seconds until it has loaded the whole mp3 song into its memory (it is made in japan, and I paid a good load of money to buy it about 13 years ago, so it has a huge memory, I sometimes wanted to find the memory chipset and use it in my electronic projects, but I simply couldn't hurt it), and when the whole song is in the memory, the engine's electricity is cut, but the CD is still spinning and this way it charges the batteries a little bit(according to the manual), when the song is about to finish (about 10 seconds to end) it starts the engine again, and based on the program (if any) goes for the next track, and this keeps going on till the disk or the program or the batter are ended or ran out.

I know this would not be practical for really huge video files on PCs with low RAM, like trying to play an 8GB movie using this technique, but I am sure this would not be a problem for mp3 files of less than 50MB or even 200MB. Also we shouldn't forget that we could split the files, like the application reads 5MB of the file into the memory, plays it, then goes for the next 5MB.

So is there any applications out there for windows that would load the whole song(media file) into the memory? Or is there even a way to write such a program?

Thank you so much for your time and answer. You can not imagine how much I would be thankful to you if you help me.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The Nullsoft MPEG audio decoder for Winamp allows user controllable file buffering, I have it set at 16MiB which will load almost every file I have directly to RAM before playing.

In fact, most media players have a certain amount of prebuffering and a certain read rate, the read rate may be hard coded (say 128KiB at a time) or variable based on the average bitrate of the file.

Some media players may use their 'network buffering' setting for local content buffering as well, the best way to tell for sure is to increase the buffer and load the file, and see if the read behavior changes.

share|improve this answer
    
It is working great. In fact it is very close to perfect. I am having Winamp playing a high quality mp3 file for me, and unlike WMP, VLC, XMPlay, it is only reading 2.8kB/s (which I am somehow sure that is not related to reading the audio file. This used to be around 48kB/s and even more), any chance that could be eliminated as well? –  Jacob Rabinsun Aug 31 '13 at 11:01
    
I also want to know if something similar could be done for video files. That way the hard drive, doesn't need to work all the time, so it would have a bit longer life time, and I think some energy would be saved as well. Could I load almost all of a video file, or at least a huge part of it into memory, and play it from there? –  Jacob Rabinsun Aug 31 '13 at 11:10
1  
A change for video files could easily be done to an open source program like MPC-HC, although you would want to have some kind of free physical memory detection, to be sure the operating system will not send some of the buffer to the pagefile. I am not sure about the low bitrate thing, it may be reading from a named pipe and showing up as disk IO. Mine read 2KB/s average from ntdll.dll for about 2 mins then stopped. –  Richie Frame Sep 4 '13 at 8:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.