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.12k stars 215 forks source link

Cannot use spaces or quotes in player arguments for vlc #665

Closed zuluwi closed 8 months ago

zuluwi commented 8 months ago

When I enter the following code to specify the snapshot folder in the player arguments, it gives an error due to spaces even though the folder path is in quotation marks

--language en --extraintf=luaintf:http --http-port=12342 --http-password=vlcpassword --snapshot-path "D:\stok\test folder\snapshots"

resim

also the arguments where I use quotation marks without spaces don't work. In cmd I can run the following code properly

"C:\Program Files\VideoLAN\VLC\vlc.exe" --extraintf=luaintf:http --http-port=12342 --http-password=vlcpassword --snapshot-path "D:\stok\test folder\snapshots" --snapshot-format="jpg" --snapshot-prefix="image-" 

Is this a bug or am I not entering these characters properly?

Version and platform:

Et0h commented 8 months ago

Thanks for reporting this issue. I've had a look and I think it's a bug. As far as I can see if you want a space in a snapshot path that for now you will need to either manually set it in VLC preferences or use mpv/mpv.net.

zuluwi commented 8 months ago

Thanks for your reply! I specifically wanted to be able to specify the snapshot location by entering arguments. By the way, when I try with mpv, I get the same result, in the syncplay.ini file the folder path seems to be separated even though there are quotation marks

perplayerarguments = {'c:\\program files\\videolan\\vlc\\vlc.exe': ['--extraintf=luaintf:http', '--http-port=12342', '--http-password=vlcpassword', '--snapshot-path="D:\\stok\\test', 'folder\\snapshots"', '--snapshot-format="jpg"', '--snapshot-prefix="image-"', '--drawable-hwnd=1'], 'd:\\stok\\test folder\\snapshots\\mpv.exe': ['--screenshot-dir="D:\\stok\\test', 'folder\\snapshots"']}
Et0h commented 8 months ago

Just checked and you're right, it is incorrectly splitting stuff in syncplay.ini.

Et0h commented 8 months ago

I've tried to fix the issue in PR #668

@zuluwi could you please test out the Syncplay build at https://github.com/Syncplay/syncplay/actions/runs/7671885102?pr=668 (Syncplay-1.7.1-Setup.exe or Syncplay_1.7.1_Portable) to let me know if it fixes the issue and allows --snapshot-path="D:\stok\test folder\snapshots"?

zuluwi commented 8 months ago

I tried it and it worked with no problem. Thank you so much for your hard work 🙏

Et0h commented 8 months ago

I've also tested this with mpv and mpv.net using the arguments title="mpv (Syncplay)" keep-open=always osd-msg1="Test" and it fixes the issue for mpv as well. As such, I'll be accepting the PR. If people find any problems with this change then please let me know.