Any way to play file from smb server using MobileVLCKit

iOS, iPad, iPhone, tvOS specific usage questions
garanda
Blank Cone
Blank Cone
Posts: 11
Joined: 20 Jun 2016 17:41

Any way to play file from smb server using MobileVLCKit

Postby garanda » 06 Jul 2016 11:46

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.

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

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

Postby fkuehne » 13 Jul 2016 11:40

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.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

garanda
Blank Cone
Blank Cone
Posts: 11
Joined: 20 Jun 2016 17:41

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

Postby garanda » 13 Jul 2016 12:49

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!!!

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

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

Postby fkuehne » 14 Jul 2016 14:14

The latest is typically the most the stable :)
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

garanda
Blank Cone
Blank Cone
Posts: 11
Joined: 20 Jun 2016 17:41

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

Postby garanda » 14 Jul 2016 21:07

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.

flames3000
New Cone
New Cone
Posts: 1
Joined: 20 Jul 2016 07:45

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

Postby flames3000 » 20 Jul 2016 08:00

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.

flysofast
New Cone
New Cone
Posts: 3
Joined: 16 Feb 2017 08:21

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

Postby flysofast » 17 Feb 2017 03:53

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.


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 20 guests