Page 1 of 1

Can my app pass an SMB path to VLC?

Posted: 01 Aug 2022 15:03
by vvvvlllllccccc
I mean, suppose that there is a SMB file server, named `\\server` (or `smb://server`), and there is a video file on it like `\\server\videos\clip1.mp4`. Can my app pass this file URL to Android VLC so that VLC can play the video file by streaming (not copying the whole file to the phone first)? Android VLC already is capable of connecting to an SMB server and playing a file on it, manually within VLC, so I guess it might be possible, but I am not sure.

Re: Can my app pass an SMB path to VLC?

Posted: 02 Aug 2022 06:26
by Aza
Did you try in More > Streams > New stream?

Re: Can my app pass an SMB path to VLC?

Posted: 02 Aug 2022 17:07
by vvvvlllllccccc
Did you try in More > Streams > New stream?
No, I did not mean doing it manually as an end user. I meant my app's passing an SMB path to VLC. Imagine that my app is listing the video files on an SMB shared directory. When the user clicks a video file, I want to open it with VLC, by passing the file's SMB path (e.g., smb:\\server\dir\file.mp4) to it.

I do not want to copy the video file to a local temp directory and then pass that local path to VLC, nor do I want to create an intermediary web server for it and pass the HTTP video URL to VLC.

Re: Can my app pass an SMB path to VLC?

Posted: 03 Aug 2022 07:11
by Aza
Sorry, I completely missed your point.

Code: Select all

startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("vlc://smb://server/path/to/file/file.mp4")))
should do the trick

Re: Can my app pass an SMB path to VLC?

Posted: 05 Aug 2022 04:25
by vvvvlllllccccc
Sorry, I completely missed your point.

Code: Select all

startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("vlc://smb://server/path/to/file/file.mp4")))
should do the trick
That worked. Thanks. I had wondered if it is allowed to have "://" inside of a URL, but apparently, that is.