vlc regard the file path as a URL,so the subtitle won't be loaded automatically

Bug #190188 reported by yegle
36
Affects Status Importance Assigned to Milestone
vlc (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Normally vlc will try to load subtitle automatically,for example,if you put example.avi and example.srt in the same directory,and you double click on example.avi,and example.srt will be loaded.

But vlc will regard the file path as a URL,and encoded it(you can find some details in RFC 1738).

For example,if you have a file
/home/yegle/[example].avi
,and you have a correspond subtitle file called [example].srt.You double click on [example].avi and you will find /home/yegle/%5Bexample%5D.avi will be displayed at the bottom of the vlc window,and [example].srt wasn't loaded.

At first I think this is because vlc cannot deal with non-ascii characters,but later I find when I drag and drop [example].avi to vlc window,the subtitle loaded just fine.So this bug will happen when you double click on a file contains non-ascii characters.

sorry for my poor English.
:-)

Revision history for this message
yegle (cnyegle) wrote :

I found the reason.The default Exec key of the vlc.desktop file(located in /usr/share/applications) have a %U argument,so the full file path passed to vlc will encoded as a URL automatically.To solve this problem,change it to %F,and everything will be fine.

Revision history for this message
ankurnath (ankurnath) wrote :

The fix above works only for local files. After this fix VLC fails to play files on samba shares.

Revision history for this message
Hew (hew) wrote :

I can confirm this issue as present in up-to-date Hardy. The workaround given solves the problem (at least for local files).

Changed in vlc:
status: New → Confirmed
Revision history for this message
Federico Ramallo (framallo) wrote :

Right click and open with... > use custom command: vlc %F

that way you have handy the original vlc launcher for samba files.

also could be solved using vlc param:
      --sub-autodetect-path=<string>
                                 Subtitle autodetection paths
          Look for a subtitle file in those paths too,
          if your subtitle file was not found in the
          current directory.
http://wiki.videolan.org/VLC_command-line_help

but couldn't find how to get the path as URI or local path from nautilus
http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html

I don't like drag and drop because when you try to pause the movie keeps playing and the subs are paused (ugly)

any ideas?

Revision history for this message
Fevrin (fevrin) wrote :

According to <a href="http://ubuntuforums.org/showthread.php?t=775337&highlight=VLC+subtitles">this</a> thread, %m works better and is more appropriate in the "vlc.desktkop" file. It's what worked for me, as well.

Revision history for this message
Hew (hew) wrote :

Tested with Intrepid and the problem has gone. %U is still present in the desktop file, so something else must have changed. Can someone else test using Intrepid? Thanks in advance.

Changed in vlc:
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Reinhard Tartler (siretart) wrote :

closing due to inactivity. reopen if the problem is still affecting you

Changed in vlc:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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