Syncplay / syncplay

Client/server to synchronize media playback on mpv/VLC/MPC-HC/MPC-BE on many computers
http://syncplay.pl/
Apache License 2.0
2.09k stars 213 forks source link

unusual letters in path to media file #38

Closed nnamrrehdlopoel closed 9 years ago

nnamrrehdlopoel commented 10 years ago

You can't play a movie with syncplay/vlc and the title or the file includes unusual letters like ü/' '. Syncplay thinks, I would be playing the movie and it would last -0:00. VLC returns the error below 11 times. It does not happen if you drag+drop the movie directly into vlc.

The problem seems to be, that syncplay transfers the path as URL-encoded (e.g. as %20) to VLC, but VLC requires it as ASCII.

nnamrrehdlopoel

VLC errors: File reading failed: VLC could not open the file "C:\Users\Leo\Videos\Stefan\fr Hannes + Paolo\Die_purpurnen_Fluesse_II_Die_Engel_der_Apokalypse.mp4" (No such file or directory). Your input can't be opened: VLC is unable to open the MRL 'file:///C:/Users/Leo/Videos/Stefan/fr%20Hannes%20%2B%20Paolo/Die_purpurnen_Fluesse_II_Die_Engel_der_Apokalypse.mp4'. Check the log for details.

Et0h commented 10 years ago

Syncplay does not currently support loading Unicode files for VLC, so at present people have to load the files through VLC. It would be great if someone could add Unicode to Syncpay's VLC code, but I do not know if that would be easy (or even possible) due to the VLC-side handling of lua and Unicode.

If you load the file through dragging it into Syncplay window it should give the error: "Cannot load file through Syncplay because it contains non-ASCII characters. Please load the file through VLC."

Were you loading the file through the Syncplay configuration dialogue, commandline options, or by dragging it into the main Syncplay window?

nnamrrehdlopoel commented 10 years ago

I think, I dragged into the Syncplay window into the 'list of who is playing what'.

And I just noticed that I only have problems with non-ASCII letters which disappear (für ==> fr) and not with the ASCII letters that turn into hexadecimal code (+ ==> %2B)

ghost commented 10 years ago

So does VLC use a legacy charset for this, or just drop them? This seems unlikely. Are you sure you can't just use UTF-8 here? Otherwise, you should convince the VLC devs to use UTF-8 for Lua.

Et0h commented 10 years ago

Good detective work. I'm currently away from my main computer but will look into it when I get back. I think utf8 can work on lua in theory but it breaks the default libraries and may not be be compatible with vlc function calls. If vlc accepts Mpc-hc style substitutions or uri encoding then that's be easier then straight up utf8 bit I haven't tested that.

Et0h commented 10 years ago

Does https://github.com/Uriziel/syncplay/commit/10089bb417530b3ce6888a1304d82d7409221511 properly fix things and provide UTF-8 support for loading files via the Syncplay config dialogue and within the main Syncplay dialogue? This approach tries to use file:// for Unicode files.

Et0h commented 9 years ago

Is fixed in Syncplay 1.3.0. Thanks for reporting.