Tuesday, March 5, 2013

Repeat in gnome-mplayer

The old method was the command line switch "-loop 0" when invoking mplayer. This made the media file or playlist repeat. But in a newer installation of Lubuntu, I found that $ mplayer -loop 0 did not execute the file --- it simply returned errors about the "loop" switch. Two annoying hours later, the problem was fixed.

solution

The solution was to
  • install mplayer. Although it appeared I already had mplayer installed on my system, I did not. I had mplayer2 installed on my system and, of course mplayer2 has no repeat function, so that "loop -0" simply caused errors.

    Unfortunately, this took me an hour and a half to uncover. This was because, currently, mplayer2 is completely (and suspiciously - RIAA/MPAA influence?) disguised as mplayer. I was sure I had mplayer, not mplayer2, on my system. That is, the "/usr/bin" folder contained "/usr/bin/mplayer", NOT "/usr/bin/mplayer2". And typing "$ /usr/bin/mplayer" appeared to launch mplayer even though mplayer2 was being executed.

    Eventually I was able to discover what was going on via "mplayer --version". Not surprisingly, this returned information about "mplayer2" instead of mplayer -- the ruse was finally revealed.
  • Once the real mplayer was installed, I simply opened gnome-mplayer, went into its "preferences" and, under the "mplayer" tab, added the command switch "loop -0". Thereafter, media repeated when played.

2 comments:

Kevin DeKorte said...

Why didn't you just enable the Edit->Loop Playlist rather than setting the -loop 0 option.

xbasket said...

Good point. Not sure if I described it in my post, but I tried forums and what I could find before bothering to replace mplayer2. One setting, possibly the one you suggested, would just hang without closing? So far with mplayer no difficulties, knock on wood.