yuroyami / syncplay-mobile

📱 Unofficial Syncplay client app for Android and iOS. Watch stuff in sync with your friends. Works well with Syncplay on PC. Fully written in Kotlin and Compose multiplatform.
113 stars 5 forks source link

mpv backend does not open files from SMB share (or other non-internal fs locations) #81

Open vickyorlo opened 7 months ago

vickyorlo commented 7 months ago

As in the title. The situation: A movie file is loaded via MiXplorer into Syncplay-Android, either from a samba share (smb://) or MiX's own USB OTG driver (usb://). On the mpv backend, syncplay-android loads the file enough to get the bitrate and an incorrect length, but the seekbar stays at 00:00 and unpausing does nothing. The exact same file copied onto the device's internal flash plays with no problems.

On the exaplayer backend, the file plays fine, but with issues as noted by other users (for example subtitles).

This is a problem for me as I'm using syncplay-android on an Android TV device with maybe 7 gigs of free space, and it only supports fat32 for external storage. I have a movie file that's more than 8gb.

yuroyami commented 7 months ago

For file loading, syncplay-android implements (almost) the same logic used in the official mpv-android app. Could you please try to reproduce the issue with the official mpv-android app? Let me know how it goes.

SimplisticGH commented 4 months ago

I'm not sure how mpv-android reacts natively, but I do know that file explorers, such as Material Files, have the ability to serve content to mpv-android from SMB shares through the app share/picker screen. But since syncplay-android gets to decide how content is opened, that ability is broken.

yuroyami commented 2 months ago

@SimplisticGH Upon further revision on this in attempt to see what's going on, I found out that mpv does indeed support SMB files and paths, the URIs usually begin with smb://. The app already provides means to open URLs. I assume there is a way to obtain those paths somehow ?

Nonetheless, this seems like a good opportunity to actually add support to let other file managers/explorers to serve paths to syncplay-android.

vickyorlo commented 2 months ago

Hi again, sorry for the complete lack of response for so long. I had actually lost access to the TV I was testing this with, and I only regained access recently. But, to answer, yes, the mpv-android app does support playing files via SMB. The built-in filepicker does not allow this, but sending the file to mpv via something like MiXplorer plays the file perfectly fine.

SimplisticGH commented 2 months ago

The app already provides means to open URLs. I assume there is a way to obtain those paths somehow ?

I can with material files, but upon attempts to add files it only manages to recognize the file name.

However, it seems that CIFS Documents Provider is capable of patching through the default file explorer and successfully playing SMB videos with syncplay-android, so the need for official support might be lower priority now.