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

Sezaru sezdocs at gmail.com
Sat Jan 26 12:05:20 CET 2013


Yes, it's exactly for youtube, I've tried an similar approach, the
problem is if you try to watch the video when youtube-dl is
downloading it, if mplayer surpass youtube-dl last downloaded video
bit, there will be no video data and mplayer will simply close. With
the cache approach mplayer will simply freezes itself untill new
content is available.

Did you just open mplayer when the video finished downloaded, or there
is some setting to make mplayer waits new data somehow?

Thanks!

On Sat, Jan 26, 2013 at 10:42 AM, houghi <houghi at houghi.org> wrote:
> On Sat, Jan 26, 2013 at 08:03:51AM -0200, Sezaru 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.
>
> Is this from sites like Youtube and the like? What I have done might be
> used as basis of something else.
> What you could do is download the file and then have it played that file
> via a pipe. That way you will not stop downloading when you stop.
>
> What I do is download videos and then watch them later. I can download
> several streams at the same time.
>
> The basis for this is youtube-dl (works on different sites
> http://rg3.github.com/youtube-dl/ for more info)
>
> I have written a script around it called ytube. Basis is:
> #!/bin/bash
> DIR="/share/data_1/download/movies/youtube"
> URL="$@"
> #Get the file
> cd $DIR
> youtube-dl -o "%(stitle)s.%(ext)s" "${URL}"
>
> Next I have added a bookmark in my bookmark bar that says as location:
> javascript:void(location.href='http://local/tv/ytube.php?&u='+encodeURIComponent(location.href))
>
> The page ytube.php contains the following code:
> <?php
> if (isset($_GET['u']))
> {
>         $URL=$_GET['u'];
>         exec("/home/houghi/bin/ytube \"$URL\" &");
>         echo $URL;
> } else {
>         echo "Nothing here";
> }
> ?>
>
> I also have a plugin that prevents autoplay in Firefox. So now I can
> easily click on the bookmark and it starts downloading. I can download
> several at a time, if I so desire and then look them in the way I want.
>
> Perhaps not what you are looking for, but agian the idea would be do first
> download, pipe that to play and then after you have played it, you delete
> the file.
>
> houghi
> --
> You can have peace. Or you can have freedom.
> Don't ever count on having both at once.
>                        -- Robert A. Heinlein
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users


More information about the MPlayer-users mailing list