Linux SMB file link to external player given without password
#1
Hey,

I am trying to use an external player (namely VLC) but the SMB link from XBMC to the player comes without username and password. Therefore the video can't be played from my password protected NAS. The internal player in XBMC works just fine (and uses the correct user:password as I can tell from the NAS logs).

I have tried many kinds of contents for the passwords.xml but I can not get it to work and my google searches where unsatisfactory. I am running ubuntu 13.10 on a x64 machine and XBMC 12.3 installed using the ubuntu software center.

I have set up:
My VLC log file http://pastebin.com/4tQQtvYi clearly shows, that no username and password are supplied to the player. The MRL looks like smb://192.168.0.200/... but should look like smb://user:[email protected]/...

My XBMC log can be found here http://pastebin.com/a8Xerhxx



<small history>
And now comes the funny part how I got to this...
I have had an oooold Win XP Pro computer running the same release of XMBC just fine. After getting my new computer together I copied the whole userprofile to this new machine to Windows 7 Pro. After a few attempts of XBMC using the wrong username (I guess my windows user name) to my SMB shares on my NAS it eventually got it right and used the correct username:password combination. This behaviour was perfectly reproducable after a reboot of the computer. Since I configured my NAS to kick a IP out after a certain number of faulty logins I wanted to get rid of this behaviour, deleted the userprofile, the media library on the NAS and started configuring from scratch. No change in this behaviour. The external player (VLC) in Windows worked for my TV shows (to be found on the NAS under smb://.../Serien ...) but not for the Movies (on the NAS under smb://.../Filme/...).
Since I wanted to get started with Linux anyhow I copied the Windows XP userprofile to linux, set up a new installation of Ubuntu with XBMC and the faulty logins with the wrong username were gone. The problem with the forgotten user:password combination when starting the external player in Linux persisted. VLC was started correctly for my TV shows but not for the movies. The SMB link for the movies was correct when inserting user:password@ to it. So I started on Linux from scratch again (deleting the old media librarys on the NAS) and now the external player is not working at all.
</small history>



Can anyone enlighten me? What am I doing wrong?
Is it normal that I can't find any hints of parsing the passwords.xml in the xbmc log file?

Thanks in advance for your responses!

Greets, Sven
Reply
#2
Hey,

I have found a workaround to get VLC to work with the password protected SMB share. VLC accepts username and password as command line arguments. With those settings in the playercorefactory.xml it works just fine:

Code:
        <player name="VLC" type="ExternalPlayer" audio="false" video="true">
            <filename>/usr/bin/vlc</filename>
            <args>--smb-user=<user> --smb-pwd=<password> --fullscreen --play-and-exit "{1}"</args>
            <hidexbmc>false</hidexbmc>
            <hideconsole>false</hideconsole>
            <warpcursor>topleft</warpcursor>
            <playcountminimumtime>300</playcountminimumtime>
        </player>


I also managed to get XBMC using the correct username and password when connecting to my NAS to retrieve jpeg images for the movies. It didn't use the correct username before. I just haven't figured out how I did it and I'm still looking for the difference between this startup from scratch and the last one.

Sven
Reply
#3
If the internal player works fine, why are you using vlc?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#4
Mainly because I'm used to it, I know the shortcuts and features (changing PAR, increasing volume above 100%, changing audio stream etc.) and I like VLC.
Since I found out yesterday also, because the internal players' playback stutters on my old machine (Athlon X2) with some movies (even SD). And since my old machine is becoming my media center it needs to play videos fluently. As it turns out i would have had to dig into something anyhow.
Reply
#5
hi, this is a very old thread but since I couldn't find anything else relevant to this topic I try my luck here:
I am trying to achieve the same on android: use kodi to open media from smb with vlc.
things work fine (without user/pw as well - I've set up the access to the share in VLC itself and hence I guess the args are not required) - so things work fine up until I try to open a file that contains space in the filename...

checking the logs in VLC I found the following:
creating on-the-fly Media object for smb://host/media/my movie.mkv
...
core input source: creating demux: access 'smb' demux 'any' location='host/media/my movie.mkv' file='(null)'
...
core stream: creating access: smb://host/media/my movie.mkv
...
dsm stream: Login failure but you were logged in as a Guest
core input `smb://host/media/my movie.mkv' successfully opened

and than it goes on adding the root folder name to the path and "opening" that path:
core input: Creating an input for 'Root'
...
core stream: creating access: smb://host/media/my movie.mkv/media
...
than on and on like creating access: smb://host/media/my movie.mkv/media/media/media/media/media/media/media/media etc...

So I've noticed that the file is the path and no file is found btw on first try the core input (I assume since move filename has space in it) ueses '' though the first ' is really a `

VLC has access granted to the share from the VLC interface and all files work when started within VLC.


I am not sure if that's rather a VLC topic, but since I can open the files directly in VLC I thought I check with the KODI community.
Of course I could just rename the files to not contain spaces... though I was hoping someone can shed light what other option I could have...

cheers
Reply

Logout Mark Read Team Forum Stats Members Help
SMB file link to external player given without password0