Page 1 of 1

Any way to play file from smb server using MobileVLCKit

Posted: 06 Jul 2016 11:46
by garanda
I'm Using MobileVLCKit to browse my local network shares using VLCMediaDiscoverer on iOS, but when I try to initialize I receive this error:

core services discovery error: no suitable services discovery module

Another thing that I'm try is to initialize de VLCMedia with the smb scheme like this:

Code: Select all

let curl = NSURL(string: "smb://user:pass@host/folder/video.mp4"); media = VLCMedia(URL: curl)
But vlc is not able to open the file.

Is there any way to achieve this, Play a video file from samba server directly to MobileVLCKit just like the official VLC for iOS does?

Thanks in advance.

Re: Any way to play file from smb server using MobileVLCKit

Posted: 13 Jul 2016 11:40
by fkuehne
Of course this must work. VLC-iOS uses the exact same VLCKit we deliver separately. However, note that SMB support was added to v3.0, which is only available as pre-release versions as of yet.

Re: Any way to play file from smb server using MobileVLCKit

Posted: 13 Jul 2016 12:49
by garanda
Of course this must work. VLC-iOS uses the exact same VLCKit we deliver separately. However, note that SMB support was added to v3.0, which is only available as pre-release versions as of yet.
Many thanks Felix, you lead me in the right way, I was using the 2.2.2 version.

So, you recommend any stable 3.x nightly version from: http://nightlies.videolan.org/build/iOS/?C=M;O=D ?

Thanks for your help!!!

Re: Any way to play file from smb server using MobileVLCKit

Posted: 14 Jul 2016 14:14
by fkuehne
The latest is typically the most the stable :)

Re: Any way to play file from smb server using MobileVLCKit

Posted: 14 Jul 2016 21:07
by garanda
The latest is typically the most the stable :)
Thanks felix now I'm able to open files from smb...

I have one last question for you, I'm having an issue when try to open a file from smb and its path has some space, e.g:

"smb://user:pass@host/folder name/video.mp4"

I'm replacing the spaces from the path using escape function and replacing with %20 something like this:

Code: Select all

let strurlcode = stringURL.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLFragmentAllowedCharacterSet()) let url = NSURL(string: strurlcode);
And the result is: "smb://user:pass@host/folder%20name/video.mp4", now when I pass this URL to the VLCMedia nothing happens, and the state of VLCMediaPlayerState changes to Stopped.

If the path doesn't have any spaces the file starts playback without problems.

Thanks in advance for your help.

Re: Any way to play file from smb server using MobileVLCKit

Posted: 20 Jul 2016 08:00
by flames3000
I was working on SMB video play with vlc for ios.

I am using MobileVLCKit.framework(http://nightlies.videolan.org/build/ios ... 9-0750.zip)

make code like:
********
_mediaplayer.media = [VLCMedia mediaWithURL:[NSURL URLWithString:@"smb://user:pwd@192.168.1.1/Public/Videos/test.m4v"]];
[_mediaplayer play];
********
But it did not played.
_mediaplayer.state changed from VLCMediaPlayerStateBuffering to VLCMediaPlayerStateStopped

If I play video with http protocol, it works well.

Re: Any way to play file from smb server using MobileVLCKit

Posted: 17 Feb 2017 03:53
by flysofast
The latest is typically the most the stable :)
Thanks felix now I'm able to open files from smb...

I have one last question for you, I'm having an issue when try to open a file from smb and its path has some space, e.g:

"smb://user:pass@host/folder name/video.mp4"

I'm replacing the spaces from the path using escape function and replacing with %20 something like this:

Code: Select all

let strurlcode = stringURL.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLFragmentAllowedCharacterSet()) let url = NSURL(string: strurlcode);
And the result is: "smb://user:pass@host/folder%20name/video.mp4", now when I pass this URL to the VLCMedia nothing happens, and the state of VLCMediaPlayerState changes to Stopped.

If the path doesn't have any spaces the file starts playback without problems.

Thanks in advance for your help.
Have you found the solution for this? I've also tried to use string escape characters like

Code: Select all

"smb://user:pass@host/folder name/video\\ file.mp4"
but still no luck.