[MPlayer-users] Problem with volume setting being reset to max when -loop is used.

The Wanderer inverseparadox at comcast.net
Fri Oct 26 00:47:19 CEST 2007


James Ronald wrote:

> I wrote a touch screen front end that controls mplayer in slave mode.
> Everything seem to be  working wonderfully except the "-loop"
> option. I'm using "-loop 0" on the command line when starting mplayer
> in slave mode.
> 
> ./mplayer -ac mad -quiet -slave -loop 0 -idle -input 
> file=/tmp/.mplayer_pipe movie.avi
> 
> While running in this mode, if the volume setting is adjusted, on
> each iteration of the loop, the volume seems to get reset to the
> original setting.  Just like it was being run for the first time.

Or, rather, as if a new file were being started - because volume changes
during playback are preserved only until the next file.

Based on a few tests and what little I know of the background, what
'-loop 0' appears to be actually doing is looping the *playlist* over
and over - in other words, when MPlayer reaches the end of its list of
files to be played, it automatically jumps back to the beginning. When
there is only one file, the effect is that the file is played
repeatedly, but each time it is being treated as a new file and so the
parameters return to the values they had at invocation time.

(Or so I deduce from a little testing and what I know of the background.
I haven't actually confirmed this in the source.)

There was some discussion a while ago of providing the ability to allow
people to specify whether a given mid-playback command should change the
value for the remainder of the current session or only for the remainder
of the current file, but nothing was ever implemented, apparently
because the people involved do not have a sufficiently good
understanding of the input layer to tell where and how to change it. (I
am technically one of the people who was involved in that discussion,
but I do not have a good enough understanding of *any* part of the
MPlayer code to begin making serious modifications with any hope of not
breaking things severely.)

> I built MPlayer from  SVN r24633 for arm-linux 2.6.20 using gcc
> 3.4.6.   Any ideas or a work around would be appreciated.

If you actually do need to be able to adjust the volume in mid-playback
and have it remain adjusted until changed again, I don't think you have
any real options at the moment short of trying to further the adoption
of the change I mentioned above - which would mean writing patches to
support it, because the code for that really doesn't exist yet AFAIK.

Alternately, you might consider having your front-end simply adjust the
system's volume itself (assuming that MPlayer is not using -softvol),
since that should be independent of anything MPlayer does. This is not
an ideal solution, however.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.



More information about the MPlayer-users mailing list