Re: mplayer doesn't update the size of a growing file

The Wanderer <[email protected]>
Newsgroups gmane.comp.video.mplayer.user
Organization This space intentionally left blank.
Message-ID <[email protected]>
On 2018-09-15 at 11:31, arthurpeabody wrote:

> Quoth The Wanderer:
> 
>> mplayer - < /tmp/output.rip
> 
> When I do this mplayer doesn't respond to keyboard input, won't move
> forward or backward, won't quit.

It does for me - but only when I have the MPlayer window in focus; if I
switch focus to the terminal window from which I launched MPlayer, I get
the behavior you describe.

That's because when the terminal window is in focus, keypresses like
that get (buffered to be, and then) sent to the standard input of the
active process, which in this case means they get mixed in with the data
stream of the input file.

Do you really switch focus away from the actual video-playback window,
while the video is playing, enough that this is a problem?


Another workaround you might try is a FIFO:
  mkfifo /tmp/videostream.fifo
  cat output.rip > /tmp/videostream.fifo &
  mplayer -cache 65536 /tmp/videostream.fifo

(There may be alternate approaches which would let you skip the 'cat'
part, and if so they're probably better, but I don't know of one offhand
that I'd be confident would work.)

This will let you seek within however much of a time range your chosen
'-cache' value will accommodate. The further back you want to be able to
go, or the higher bitrate (et cetera) your video stream is, the bigger
the cache you'll need; however, the bigger the cache you specify, the
longer will be the delay before playback starts. Without '-cache', you
won't be able to seek backwards at all, or at least if you do it won't
work as expected.

Make sure you have enough RAM to accommodate however much of the stream
you let accumulate in the FIFO before starting playback, or while
playback is paused.

I can't guarantee that this won't have other unexpected or undesirable
characteristics, but it seems to work adequately well in my testing.

-- 
   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

_______________________________________________
MPlayer-users mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEJCOqsZEc2qVC44pUBKk1jTQoMmsFAludqfQACgkQBKk1jTQo
MmulLxAAmsSKkbzum6TZ21YSAU9PMOwvVGZfycX7VB8tG/vxrA2rUgpgklgFFzJA
MSCX3XDMFFFP2iQBUbxcYUlUkvRV3xZyPIubeBmcUtYOPnKYItyOMZnUmRx7js+I
97NtUu0Yta4i0MoqL93PqIg88CiRtYj2WbpYPtEIJq0u/eOH5hk+6gBMguAkyEER
1BPtTNzCiQ5LCegeeGC56qRZVgJEYCXpNLLZHG71C9mXUPYztGh6ANtRq44wBpj1
cn0iiX33uddH0HXUV27fjl9LPBWKoEh38QJWjV7qNQYYmytLmfWIWk04aKcL8je0
7QZH1HnmLSmKIHxwMxmJhU0DsUxYKrUnQwRYdj9iO4iyB4QrdXrmNoU/eyBpT1O1
BM5k7mr/moL9beM8w2huDenOu9wdqEPUkZkKfglpXqb8HICiNbF1RQ6n/zXSMAFD
9yD3Mt1/re8/WCxzTzEGIPdcG5V88fjjG/IjNYkk654boGxfbnPHpjq48skyVg2F
WIFw0NrgzRU/XRnrV7D3BkS+921PuqEHKXhxyeHIQj9gNVtWD9kO8jLDYHzXKkn7
GfCWADCroBU7ws6AyKxOWEy5kdptFFYVE2cfdkplhJhHeJgElrkKu4enlpSauvCp
2MaePXzCsvKoXre2rT27p5P/PFu6UZrMRvK5KGIQiASPWEaTHhM=
=RrZn
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.