[MPlayer-users] option to save cache in temporary directory instead of memory

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Jan 28 08:52:28 CET 2013


On 26 Jan 2013, at 11:03, Sezaru <sezdocs at gmail.com> wrote:
> Hello guys,
> 
> I've using mplayer with the cache option to an absurd number (2000000
> to be exact), the reason is that I normally stream some videos and
> like to pause it in the middle, but if I do that when I resume it the
> server will timeout me and mplayer will be unable to continue the
> stream.

That is a bug and should be fixed since many months ago.

> The problem is that all the video is stored in the RAM, if I try to
> load a video of 2 or more hours, mplayer will consume all my RAM and
> swap and make all the computer super slow.

That would be a bug in your operating system. It has no reason to treat writing to the swap file significantly different than writing to a normal file.
That is, unless we are doing something stupid in the cache code MPlayer, I've not double-checked that.

> So, I think that the best solution would be to simply store the video
> stream file in an temporary directory (/tmp ?) instead of the RAM and
> load the only the necessary part from it at a time (like it would
> normally with a default cache value).
> 
> But I didn't found an option to do just that, is that possible? If
> not, is hard to implement or something planned to an future release?

Due to above, the "computer becoming super slow" is clearly a bug and should be fixed, thus no such feature should be necessary.
Someone did implement a special protocol that would wait on reaching the end of a file instead of exiting though.
I didn't make an effort to get it in so far, because it was really used to work around bugs in MPlayer, and I don't much like features that might lead to bugs being worked around instead if being fixed....

Regards,
Reimar


More information about the MPlayer-users mailing list