[MPlayer-users] mplayer doesn't update the size of a growing file

The Wanderer wanderer at fastmail.fm
Fri Sep 14 17:22:38 EEST 2018


On 2018-09-02 at 19:37, arthurpeabody wrote:

> When I listen to a stream I capture it with streamripper and listen
> to the captured file with mplayer.  mplayer never updates the size of
> the file.  When I change the position, if it's past the size of the
> file when I started mplayer, mplayer quits.

I'm not sure this would work, but have you considered playing from a
pipe rather than a file?

That is, if your streamripper output file is /tmp/output.rip, try
playing with something like:

mplayer - < /tmp/output.rip

The '-' is standard command-line syntax for "standard input".

The '<' redirects standard input to come from the specified file.

In theory, this should prevent MPlayer from knowing how big the input
file is, and make it possible to keep playing (or seeking) past the
original end of the file.

I've tested this by concatenating a second MPEG file onto the end of the
first one after starting playback, and it seems to work as expected
(even though MPlayer _does_ seem to know how big the file is supposed to
be, at least enough to display a percentage-complete progress bar when
seeking). I can't guarantee that that will hold for an actual streamed
file, though.

(You could also do the same thing with 'cat /tmp/output.rip | mplayer
-', but that would get you dinged for "senseless use of cat".)

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20180914/37d7b592/attachment.sig>


More information about the MPlayer-users mailing list