MPlayer cache empties playing audio stream

I'm playing a live audio stream with MPlayer and the cache runs empty after a certain period of time, I can set it higher with -cache (kb), but it eventually runs down and causes the audio stream to buffer.

Other than just further increasing the buffer, is there anything I can do to prevent this?

Also, what do the figures represent while playing an audio stream from command line?

A:1695.5 (28:20:8) of 0.0 (unknown) 501.8% 9%

The (28:20:8) would appear to be the time since the stream started. The 9% seems to be the cache available. What are the other figures?

1 Answer

You have asked two questions here so I have answered each in turn:

1. Cache problems...

Your MPlayer cache settings could certainly be improved and I would suggest adjusting or adding the following two or three options:

  1. -cache-min <percentage>: This will allow playback of your stream to commence only when the set percentage of the stream has been cached. I will usually set 80 here.
  2. -cache <kBytes>: For my own MPlayer streams I usually set a reasonably outlandish size for the cache and this works nicely with the -cache-min setting in point 1. I use 16mb here but MPlayer expects kbs: 16384.
  3. -bandwidth 1000000: This setting may help with some streams, I confess that I don't use it myself...

2. Status line mysteries...

As for the numbers on the status line of MPlayer you have inadvertently asked a 'Frequently Asked Question' for which I link the official documentation here.... However to make it all a bit clearer I give a real world example here which you might like to look at. I load the following stream with this command line (using the 2 cache settings I have suggested):

mplayer -cache 16384 -cache-min 80 -playlist \ 

The status line of MPlayer then reveals the following:

A: 21.0 (21.0) of 0.0 (unknown) 0.3% 80%

And this signifies:

  1. A: 21.0 (21.0) of 0.0 (unknown): This represents an Audio stream that has now been running for 21 seconds with the bracketed number 21.0 indicating that the stream has been running for a total of 21 seconds. I suspect these 2 numbers will vary if you seek within the stream or if the stream designates a start time that is different from your starting time with the stream. The 0.0 (unknown) indicates that the stream does not give an indication of its total length.
  2. 0.3%: This indicates the audio codec CPU usage in percent. Your own number here of 501.8% seems a little odd...
  3. 80%: As you have surmised this is the current cache size used.

Documentation of the status line in MPlayer is not great but hopefully this gives you a better understandning of what is happening.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like