gmplayer fails to play a file whose filename contains spaces

Bug #164709 reported by hype
62
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Undecided
Unassigned
mplayer (Debian)
Fix Released
Unknown
mplayer (Ubuntu)
Fix Released
Undecided
Luke Yelavich

Bug Description

Binary package hint: mplayer

After recent mplayer updates, when clicking on a video file whose name includes space, from nautilus, gmplayer spits an error saying it could not open file x%20x.avi (format doesnt matter).

gmplayer probably replaces spaces with "%20", and then cant find the corresponding file.

But if i drag the same video file from nautilus to mplayer (gmplayer) play bar, the movie starts.
Same if i choose "open with" > mplayer (not gmplayer), the movie starts fine.

Its not a vital bug, but it can be quite annoying. :)

Related post on French forum: http://forum.ubuntu-fr.org/viewtopic.php?id=168696
mplayer --version : MPlayer 1.0rc2-4.1.3 (C) 2000-2007 MPlayer Team

Thanks

Related branches

Revision history for this message
Nick Andrik (andrikos) wrote :

I can confirm this bug. The reason I see is that mplayer does not url-decode the filenames.
This should be forwarded upstream.

Revision history for this message
Nick Andrik (andrikos) wrote :

By filenames above I meant the file:// urls

Revision history for this message
Charles Perreault (muganor) wrote :

The bug is a regression in the gutsy-backports repository with the 1.0~rc2-0ubuntu1 package. I don't think mplayer is to blame but probably the person that compiled the software and made the package didn't include the proper switches when configuring the software (./configure --with-some-option). I could be wrong, but this bug don't seem to be in the mplayer forums / lists I've searched so far. It looks ubuntu-specitific...

Workaround :
Downgrade to version 1.0~rc1-0ubuntu13.1 (repository gutsy-security) using synaptic / menu package / force version. You can also lock the new version so that update-notifier stop bothering you.

Revision history for this message
Nick Andrik (andrikos) wrote :

Yup you are right. The previous versions had no problem. So we should notify the guy who made the package for backports to create it again with the correct option.

Revision history for this message
hype (hypeuser-lp) wrote :

Nick Andrik, is there a way to do that via lauchpad?
Or should we just figure out who built that package and just mail him?

Revision history for this message
Nick Andrik (andrikos) wrote :

If you see on the left of this page I think it is this one:
Uploaded By: Mario Limonciello
Can you take care of it?

Revision history for this message
crash (crash369) wrote :

This bug also occurs for filenames that actually have "%20" strings instead of spaces.

So attempting to open either "some file.xxx" or "some%20file.xxx" by double-clicking in Nautilus results in the error message: "failed to open file:///some%20file.xxx."

I wonder if this is a Nautilus issue, because the following commands issued from a terminal work just fine:
$ gmplayer some\ file.xxx
$ gmplayer some%20file.xxx

Revision history for this message
Nick Andrik (andrikos) wrote :

No it's a mplayer issue.
Try with file:///home/user/.....
This is why it fails (it uses file:// urls)

Revision history for this message
Marcus25 (mino25) wrote :

I confirm this bug, when gmplayer open a file or a directory that contains space "%20", it's fail to open the file. The bug isn't present on kmplayer, where the file with spaces work fine. I tried it using a script for play video with amarok, like that: `gmplayer" #{url}"` return this error: "failed to open file:///...", while `kmplayer" #{url}"` work fine.

Revision history for this message
Nick B. (futurepilot) wrote :

Yes, I've got the same problem here. It does seem to be a regression in the rc2 version of Mplayer. It will also fail if the file is in a directory with a space in the name even if the file itself doesn't have any spaces.

Revision history for this message
Starlite (starlite) wrote :

Same here. But I'm not so sure that this bug is only Ubuntu-specific. I've faced the same problem in Debian Sid... I had to downgrade there too.

Changed in mplayer:
status: New → Confirmed
Revision history for this message
David Finch (ubuntu-mytsoftware) wrote :

Open /usr/share/applications/mplayer.desktop
change "Exec=gmplayer %U" to "Exec=gmplayer %f"
That'll make it pass mplayer the local path rather than constructing a url.

Revision history for this message
David Finch (ubuntu-mytsoftware) wrote :
Revision history for this message
Alexandre Martani (amartani) wrote :

I don't know if it is the same bug, but it also doesn't open files with non-ASCII characters. This is particular annoying, since gutsy introduced localized folder names, so my "Desktop" is now called "Área de Trabalho", so I can't open a video file on my Desktop. I also tried on a folder without spaces, but with non-ASCII characters, and also had the same problem.
Opening files from terminal is ok. Changing mplayer.desktop also fixed the problem.

Revision history for this message
andrew.46 (andrew.46-deactivatedaccount) wrote :

Hi,

 Fix, as suggested by the Debian patch, is to alter the file:

/usr/local/share/applications/mplayer.desktop

(or whatever path) and change:

Exec=gmplayer %U

to

Exec=gmplayer %F

I have queried the mplayer-users with mixed success:

http://lists.mplayerhq.hu/pipermail/mplayer-users/2008-February/071783.html

    Andrew

Revision history for this message
andrew.46 (andrew.46-deactivatedaccount) wrote :

Ooops my apologies, I can now see the fix is already demonstrated. More sleep less computer for me I think :-)

             Andrew

Revision history for this message
Florian Dorn (florian-dorn) wrote :

This bug is still unfixed in hardy.

Revision history for this message
Robert Hrovat (robi-hipnos) wrote :

Jup, it's quite annoying that this doesn't work. It should be fixed at least in hardy.

Thanks Andrew for the fix. It Helped!

Revision history for this message
Matti Lindell (mlind) wrote :

Here's a debdiff for Hardy.

Luke Yelavich (themuso)
Changed in mplayer:
assignee: nobody → themuso
status: Confirmed → In Progress
Revision history for this message
andrew.46 (andrew.46-deactivatedaccount) wrote :

I have submitted a similar patch to mplayer-dev-eng:

http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2008-March/056927.html

but this will only affect svn mplayer, if the patch is committed.

     Andrew

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mplayer - 2:1.0~rc2-0ubuntu12

---------------
mplayer (2:1.0~rc2-0ubuntu12) hardy; urgency=low

  * Modify mplayer.desktop to support opening URIs with spaces (LP: #164709).

 -- Matti Lindell <email address hidden> Tue, 25 Mar 2008 19:01:10 +0200

Changed in mplayer:
status: In Progress → Fix Released
Changed in mplayer:
status: Unknown → Fix Released
Revision history for this message
andrew.46 (andrew.46-deactivatedaccount) wrote :

Wooooo hooooo!!! My patch has been accepted in the svn mplayer:

http://svn.mplayerhq.hu/mplayer?view=rev&revision=26306

And I guess this will eventually trickle down to the yet to be released mplayer rc3 :-)

       Andrew Strong

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.