Bug 189898 - can't play files containing space in their names or path
Summary: can't play files containing space in their names or path
Status: RESOLVED FIXED
Alias: None
Product: phonon-backend-gstreamer
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Matthias Kretz
URL:
Keywords:
: 197401 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-17 18:11 UTC by o.rollet
Modified: 2011-04-27 21:15 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
amarok log (23.86 KB, text/plain)
2009-06-22 11:33 UTC, Nikolay Vladimirov
Details
amarok-xine-backend-log (13.59 KB, text/plain)
2009-06-22 11:40 UTC, Nikolay Vladimirov
Details
log from a song that works (37.32 KB, text/plain)
2009-06-22 11:43 UTC, Nikolay Vladimirov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description o.rollet 2009-04-17 18:11:37 UTC
Version:           3.2.2 (using 4.2.2 (KDE 4.2.2), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.28-11-generic

Juk and Amarok2 don't play files containing space in their names or path.
The collection scanner seems able to read their ID3 tags and add them to the collection, but no audio output.
Removing spaces in the name or path makes them playable again.
No problem with other audio player (VLC, Exaile...)
Comment 1 o.rollet 2009-04-17 18:15:26 UTC
Oups, forgotten : 
Juk shows the following reason : " Juk can't play the audo file <nl>"  "<nl> for the following reason : <nl> / Could not locate media source./
Comment 2 Dario Andres 2009-04-17 20:14:20 UTC
Could you test using a file with space in its name as a notification sound, and try to play it (use SystemSettings->Notifications). If you don't hear it, this could be a Phonon issue (the KDE4 multimedia system).
Thanks
Comment 3 o.rollet 2009-04-17 20:43:39 UTC
No sound from notifications when using a file with a space in its name.
No problem if the space is removed.
Comment 4 Dario Andres 2009-04-17 20:46:29 UTC
Reassigning to Phonon
Comment 5 Michael Pyne 2009-04-18 04:04:37 UTC
It would be useful to know which Phonon backend is in use.  I'm betting phonon-gst with yet another URL-encoding bug myself...
Comment 6 o.rollet 2009-04-18 16:02:39 UTC
The Phonon backend is Gstreamer
Comment 7 o.rollet 2009-04-26 19:53:26 UTC
Note : on a just fresh install kubuntu 9.04; this comportment is still reproductible. No problem at all with xine backend however, but the gstreamer backend don't play these files.
Comment 8 Emanuele Cisotti 2009-05-09 19:45:20 UTC
Same problem here.
Is it there any workaround?
I use Kubuntu 9.04, with Amarok2 compiled from the SVN.
Comment 9 Dario Andres 2009-05-12 18:25:26 UTC
As a workaround you can try to switch to the xine Phonon backend.
Thanks
Comment 10 Dimitris Karnoutsos 2009-06-05 11:06:49 UTC
*** This bug has been confirmed by popular vote. ***
Comment 11 Pavel Zheltobryukhov 2009-06-21 19:37:30 UTC
*** Bug 197401 has been marked as a duplicate of this bug. ***
Comment 12 Pavel Zheltobryukhov 2009-06-21 21:14:27 UTC
(In reply to comment #9)
> As a workaround you can try to switch to the xine Phonon backend.
> Thanks

In my case switching or replacing gstreamer to xine backend doesn't help - Amarok 2.1.1 with xine backend doesn't playback any files, with or without spaces.

I use KDE 4.2.90 (KDE 4.2.90 (KDE 4.3 Beta2)) "release 138" from OpenSUSE KDE4 Factory
Comment 13 Ignacio Serantes 2009-06-21 23:14:27 UTC
This is an encoding bug, another one in KDE 4. Spaces, japanese characters, spanish characters, etc...

So don't expect to be fixed soon.
Comment 14 Nikolay Vladimirov 2009-06-22 11:21:00 UTC
I can reproduce this on ubuntu Ubuntu karmic:
KDE 4.2.90 and amarok 2.1.1

So for me it's:
1. Xine phonon backend doesn't work at all even with ogg.
2. With gstreamer I can only playback tracks without spaces in their path. 

Rhythmbox works fine so it's not an gstreamer issue. I've installed libxine1-plugins and ffmpeg for xine and everything relevant.  and gstreamer-plugins-{bad,ugly}
Comment 15 Nikolay Vladimirov 2009-06-22 11:33:01 UTC
Created attachment 34729 [details]
amarok log

Attaching amarok log. I don't know if it's relevant but it may help.
Comment 16 Nikolay Vladimirov 2009-06-22 11:40:09 UTC
Created attachment 34730 [details]
amarok-xine-backend-log

The same song with xine backend.
Comment 17 Nikolay Vladimirov 2009-06-22 11:43:34 UTC
Created attachment 34731 [details]
log from a song that works

This is a log from a song that works with the gstreamer backend.
Comment 18 Nikolay Vladimirov 2009-07-31 14:38:36 UTC
ping. 

Still happens with up to date(31 Jul) karmic koala - KDE 4.2.98 (KDE 4.3 RC3).
Comment 19 Ignacio Serantes 2009-08-02 00:41:17 UTC
Qtdemo Music Player example can play this files so the problem seems not to be in Phonon GStreamer engine.

I think that this is an encoding problem with Phonon and KDE.
Comment 20 Ignacio Serantes 2009-08-02 02:31:30 UTC
The following patch solves the problem for me:

You must change the next in method EngineController::playUrl located in EngineController.cpp ( line 388 ):

    {

        m_media->setCurrentSource( url );

    }


    {
        // PATCH
        if ( url.toLocalFile() == "" )
        {
            m_media->setCurrentSource( url );
        }
        else
        {
            m_media->setCurrentSource( url.toLocalFile() );
        }
        // PATCH
    }

This patch detects if you are playing a local file or not and do a special treatment for local files. In my system works with Xine and GStreamer engines.

Hope this information would be useful to fix this bug.
Comment 21 Ignacio Serantes 2009-08-02 02:33:56 UTC
Sorry, I forgot to explain that the previous patch is for Amarok 2, not for Phonon.
Comment 22 Michael Pyne 2009-08-02 04:16:58 UTC
It's been a while since I tested this bug but I went and checked and by now most of my music I've been listening to have spaces in the filename.  So JuK, Phonon, and phonon-gst all work.  This is with Qt git, which provides Phonon and phonon-gst.

JuK just uses setCurrentSource(KUrl::fromPathOrFile(localFileName)) and setCurrentSource(localFileName) so I'm not sure why doing a similar thing in Amarok wouldn't work.
Comment 23 Nikolaj Hald Nielsen 2009-08-02 20:01:24 UTC
Fixed by commit b608836eaacb79196a47a73bfbfa22123e42c101
Thanks to Ignacio for the patch
Comment 24 Will Stephenson 2009-12-14 13:51:23 UTC
Which Phonon version is this fix in?
Comment 25 Ignacio Serantes 2009-12-14 20:34:51 UTC
Not fixed in Phonon, the patch was for Amarok 2.
Comment 26 Lubos Lunak 2010-01-07 17:29:53 UTC
This is not fixed according to the last comment.
Comment 27 Marcos Dione 2010-01-14 00:42:03 UTC
please test with svn version newer than 1049218.
Comment 28 Marcos Dione 2010-01-14 00:48:50 UTC
... er, newer than version  1051431.
Comment 29 Pavel Zheltobryukhov 2010-01-20 20:05:25 UTC
seems to be fixed in Amarok 2.2.1.90 with KDE 4.3.85 (KDE 4.4 Beta2)
Kubuntu 9.10 in VirtualBox 3.1.2
Comment 30 Marcos Dione 2010-02-20 17:05:22 UTC
Just a reminder to future reopeners: This bug (and similiar 'my media player can't play this local file' bugs) is only related to the phonon backend you're using, not to the player. Please add that info.
Comment 31 Myriam Schweingruber 2011-04-27 21:15:19 UTC
reassigning to the new bugzilla product for better bug tracing of the various backends. Sorry for the noise.