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.11k stars 214 forks source link

Support for network folders #639

Open eyalmazuz opened 10 months ago

eyalmazuz commented 10 months ago

I think being able to add network folders such as sftp or samba shared folders could be a great feature. I host most on the shows on an external storage attached to a raspberry pi

but when adding a path like ``sftp://user>@<ip:/srv/dev-disk-by-uuid-d6068799-fba7-4ec7-85b4-484520f35a9d/data/media/tvseries/

I get the following error:

[10:47:33] Could not find media directory 'sftp://user>@<ip:/srv/dev-disk-by-uuid-d6068799-fba7-4ec7-85b4-484520f35a9d/data/media/tvseries/KimiZero/'. To update your list of media directories please select File->Set Media Directories from the menu bar and specify where Syncplay should look to find media files.

I don't think buffer issues are a problem personally, when using MPV the video buffers pretty quickly anyways so it's a non-issue

Et0h commented 10 months ago

If what you want is for everyone to be able to access SFTP as if it were HTTP then that is something I can do. See for example https://github.com/Syncplay/syncplay/actions/runs/6603204856 which makes Syncplay treat SFTP as a trustable URL and let me know if that is what you want.

However, if you want Syncplay to treat your SFTP path as a local folder then I think on Linux you would need something like like https://www.redhat.com/sysadmin/sshfs to mount it as a local directory. For Windows see discussion at https://www.reddit.com/r/DataHoarder/comments/l12gon/is_there_a_free_software_to_mount_sftp_drives_to/

eyalmazuz commented 10 months ago

If what you want is for everyone to be able to access SFTP as if it were HTTP then that is something I can do. See for example https://github.com/Syncplay/syncplay/actions/runs/6603204856 which makes Syncplay treat SFTP as a trustable URL and let me know if that is what you want.

However, if you want Syncplay to treat your SFTP path as a local folder then I think on Linux you would need something like like https://www.redhat.com/sysadmin/sshfs to mount it as a local directory. For Windows see discussion at https://www.reddit.com/r/DataHoarder/comments/l12gon/is_there_a_free_software_to_mount_sftp_drives_to/

Hi thank you, I tried downloading that version although I'm using manjaro linux I had to convert the deb to a supported format to install hopefully I did install the correct version...

I have the media directory sets as follows: image

but when opening syncplay I get the following issue

[14:23:59] Attempting to connect to syncplay.pl:8995 [14:23:59] Could not find media directory ''. To update your list of media directories please select File->Set Media Directories from the menu bar and specify where Syncplay should look to find media files. [14:24:00] This client does not support TLS [14:24:00] Successfully reached syncplay.pl (151.80.32.178)

if I add the media folder when syncplay is open I get the usual

[14:33:23] Could not find media directory 'sftp://user>@<ip:/srv/dev-disk-by-uuid-d6068799-fba7-4ec7-85b4-484520f35a9d/data/qtbittorrent/downloads/'. To update your list of media directories please select File->Set Media Directories from the menu bar and specify where Syncplay should look to find media files.

as for what I want, I think maybe sshfs is a solution (tested and it does work), although I don't want to mount a network folder when I already have an access to, for example here:

image

But it could be a cool idea if it would possible having a remote server all people could add as media folder and then no one needs to download the video locally and everyone can access the video from the remote server

daniel-123 commented 10 months ago

Sadly this is much more complicated - Syncplay doesn't understand userspace virtual file systems like SFTP mounted through gvfs or similar. Adding support for it is not trivial and would require bringing in some extra dependencies.

SSHFS or similar solutions which work transparently at lower level will work as they expose network locations in the same way as local directories. As you are connecting from one Linux machine to another Linux machine, the obvious solution that comes to mind is using NFS.

Et0h commented 10 months ago

Yup, the situation is as @daniel-123 describes it.

Syncplay was never designed or intended to deal with SFTP as if it were a local drive, and relies on the OS and third party mount software to allow for this to work.

In terms of mounts, Syncplay is designed to media directories regularly for new files. This might be an issue if you mount an external drive, but nobody has volunteered to improve Syncplay's behaviour in this regard as per https://github.com/Syncplay/syncplay/discussions/547 and so that will be the behaviour for the foreseeable future.

If you have permission to host a file and want to do so in a way that allows multiple people to stream it, then you could set up your own HTTPS server. However, depending on the bitrate of the file and the strength of your upload speed and other people's download speeds this could result in an unsatisfactory experience. Syncplay's main use case is for syncing in circumstances where everyone already has a full copy of the file to be played before they start trying to play it, and that is the use case that has been the primary focus of development and testing.

Et0h commented 8 months ago

I have now updated https://syncplay.pl/guide/trouble/ to note that Syncplay was not designed to work properly with network folders.