LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-23-2007, 08:58 PM   #1
slowcivic2k
LQ Newbie
 
Registered: Nov 2006
Location: Minnesota
Distribution: Fedora Core 8 i686
Posts: 9

Rep: Reputation: 0
Question mplayer can't play files with spaces?


Fresh install of FC8 no more than an hour ago, I have gotten mplayer set up to play just about anything, except it will not play files with a space (%20) in the file name. I had discovered this attempting to play files off of a network drive, which failed, but all online media works just fine. I had also narrowed it down by moving them locally and taking any special characters out, and voila, it works.

Question is, is there a way to tell mplayer to play files with special characters, namely with spaces?
 
Old 11-24-2007, 03:44 AM   #2
dinolinux
Member
 
Registered: Jun 2005
Location: Oslo, Norway
Distribution: Slackware 11, Solaris 10, Solaris 9, Sourcemage 0.9.6
Posts: 322

Rep: Reputation: 31
Hi

I think you can play the files by launching mplayer from the command line, and using tab completion for the filenames. When you do that, spaces are automagically escaped.

To tab-complete a filename, enter the first few letters (with proper capitalization) of the filname, then press tab. The complete filename should appear. If you get a beep or no response, add more letters and check whether you've typed in the first few ones correctly.
 
Old 12-11-2007, 03:05 AM   #3
Dummy-in-Linux
Member
 
Registered: Jun 2004
Location: Bangkok, Thailand
Distribution: Fedora 25 86_64
Posts: 357

Rep: Reputation: 32
The spaces problem is only with the version from livna, after I switched to mplayer from atrpms.net I had no problems playing files with spaces in the url
 
Old 12-25-2007, 08:19 AM   #4
changlinn
LQ Newbie
 
Registered: Jan 2005
Location: Australia
Distribution: ParrotOS, Kali, Ubunut
Posts: 28

Rep: Reputation: 15
It is a simple bug with the shortcut used to run gmplayer when doubleclicking a file.
Edit /usr/share/applications/mplayer.desktop and changing 'Exec=gmplayer %U' to 'Exec=gmplayer %F'
 
Old 12-26-2007, 10:42 AM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Spaces in file names are normally a "Bad Thing" in Unices; is there some compelling reason why they are needed here?

BTW, it's almost trivial to whip up a 3-liner to translate them all to underscores. It might be better to start using normal Linux/Unix best practice than fixing these "bugs". (I say "bugs" because I'm sure that there are die-hards who would call this a feature -- the program is detecting defective file names for you. )
 
Old 12-26-2007, 10:31 PM   #6
changlinn
LQ Newbie
 
Registered: Jan 2005
Location: Australia
Distribution: ParrotOS, Kali, Ubunut
Posts: 28

Rep: Reputation: 15
Linux is not Unix
Linux is fortunately about choice, the choice to have spaces in your filenames if you want. For me all new files and folders I create do not have spaces, but I am not going to go through all of my files dating back to the early 90's and rename them all because I have switched to Linux. Being flexible is what is winning Linux ground. Being rigid and you may as well use SCO-unix.
This is a bug as it breaks previous behavior, nuff said.
 
Old 12-27-2007, 09:48 AM   #7
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
I am not sure how to explain my view both clearly & politely, I here's trying:

Of course Linux is not UNIX® (uppercase, trademarked, specific), but it is a Unix (lowercase, not trademarked, generic), as I meant the phrase "in Unices" to imply. Sorry for not being clearer.

I am not sure when M$ started allowing spaces in filenames, perhaps w/ Win95. The exact time is not so important, as that this was a change that makes/made older software written to an earlier standard seem broken. Some would accuse M$ of doing this deliberately.

I don't see eschewing spaces as having anything to do w/ rigidity; but, rather, technically logical behavior. It just happens that this coincides w/ nearly 40 years of *nix practices.

When you decided not to create any new files or directories w/ spaces in their names, it sounds to me as if you acknowledged this as a better way. Given that Linux allows you to write recursive scripts, you can, if you want, remove the spaces from your existing file names easily & automatically. It is not the Herculean task that in might be in "Winders".

FWIW, if you deal w/ music file names, you may find that this is an on-going issue. I have written a script that "fixes" such file names & I run it periodically.
 
Old 12-27-2007, 10:42 PM   #8
changlinn
LQ Newbie
 
Registered: Jan 2005
Location: Australia
Distribution: ParrotOS, Kali, Ubunut
Posts: 28

Rep: Reputation: 15
I do realise that no spaces in filenames is better practice. But humans tend to like spaces in filenames, as it makes it easier to read. Same reason we have domain names instead of everyone remembering ips'.
Flexibility is the key to Linux's current success and its future success, if people want to have spaces in filenames, so be it.
 
Old 12-28-2007, 06:27 AM   #9
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
FWIW, I just used the Konqueror "Archive Web Page" Tool(s). It chose a title for the .war that included lots of spaces. I also did a "Save As" (still in Konqueror) on the same page, this time the title had lots of hyphens in it -- as they say in this neck of the woods, go figure.

Totally OT: In Konqueror I just ran search & replace on the text in the dialog box in which I am writing this (& it worked). Cool, I wonder if FF or Opera can do that.
 
  


Reply

Tags
mplayer, spaces


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mplayer doesn't play some .wmv files rlnd Linux - Software 6 03-11-2007 12:16 PM
How to play rmvb files with Mplayer ufosnorkis Linux - Software 6 10-19-2006 10:48 PM
Mplayer on G3? Other way to play QT files? Bazbo Linux - Software 2 05-15-2006 12:30 PM
Mplayer won't play aac files MooMooMilk Linux - Software 1 11-30-2004 01:14 PM
Asx files do not play in Mplayer vavoem Linux - Software 2 08-18-2004 04:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration