# samba + mplayere = cant play videos from a share.

## VoidWalker

I have 2 computers. One desktop, one laptop. The desktop is running on Windows 7 (7100) and on the laptop i have a completely working gentoo (2.6.29-r5) with gnome. My issue if following: I cant play videos from windows shared disks if i use smb://server/share it worked before with Archlinux but now it wont play videos. (But i can open and edit text files

 and so on) This does not work(i dont know if this is using samba) if i use the gnome menu "Places>Connect to Server...>Windows Share>server, share ..." It "mounts" the location but, again, it wont play videos. Only possible way how to make it play videos from a share is to stop using samba and simply

mount -t cifs -o username=my_usr_name_on_the_server,password=my_pass_on_the_server //server/share /mnt/w

this way i was able to do all the things i used to do while on archlinux. 

another way, with samba, to play a video was 

mplayer smb://user_on_serv:pass_to_serv@server/share/video

is there any way how to skip this step with passwords and play the video directly?

this is what i get if i am trying to play a vid from a smb share:

```
void@vaio ~ $ gnome-mplayer

(gnome-mplayer:5259): Gtk-WARNING **: Operation not supported by backend

(gnome-mplayer:5259): Gtk-WARNING **: Operation not supported by backend

(gnome-mplayer:5259): Gtk-WARNING **: Operation not supported by backend

iter is invalid, nothing to play
```

```
void@vaio ~ $ mplayer -gui

The -gui option will only work as the first command line argument.

MPlayer 29040-4.3.2 (C) 2000-2009 MPlayer Team

This does not seem to be a file: smb://asus/w/Anime/[Anon-NknF] Seto no Hanayome Ova Gi 2.mkv !

This does not seem to be a file: smb://asus/w/The_Horribly_Slow_Murderer_with_the_Extremely_Inefficient_Weapon.mp4 !

```

```
oid@vaio ~ $ mplayer -vo gl smb://asus/w/The_Horribly_Slow_Murderer_with_the_Extremely_Inefficient_Weapon.mp4

MPlayer 29040-4.3.2 (C) 2000-2009 MPlayer Team

Playing smb://asus/w/The_Horribly_Slow_Murderer_with_the_Extremely_Inefficient_Weapon.mp4.

params.c:OpenConfFile() - Unable to open configuration file "/home/void/.smb/smb.conf":

   No such file or directory

params.c:OpenConfFile() - Unable to open configuration file "/home/void/.smb/smb.conf.append":

   No such file or directory

Using netbios name VAIO.

Using workgroup WORKGROUP.

Could not open from LAN: 'smb://asus/w/The_Horribly_Slow_Murderer_with_the_Extremely_Inefficient_Weapon.mp4'

Failed to open smb://asus/w/The_Horribly_Slow_Murderer_with_the_Extremely_Inefficient_Weapon.mp4.

Exiting... (End of file)

```

the only way how to make it work, was, as mentioned before, this:

void@vaio ~ $ mplayer -vo gl smb://name:pass@asus/w/The_Horribly_Slow_Murderer_with_the_Extremely_Inefficient_Weapon.mp4Last edited by VoidWalker on Sat Aug 01, 2009 11:11 am; edited 1 time in total

----------

## aceFruchtsaft

This most likely is not a client but a server problem. If you want to connect to Windows shares without a username/password, you have to enable the Guest Account in Windows (whether that one is enabled by default depends on the Windows version.)

Maybe on Arch you had some default domain/username/password configuration file for smbclient which was used for authentication, which is missing in Gentoo.

You can instantly see if guest logins work if you run

```

smbclient -N -L servername

```

which should give a list of shares on the server.

----------

## VoidWalker

This is what i get: 

```

void@vaio ~ $ smbclient -N -L asus

Anonymous login successful

Domain=[WORKGROUP] OS=[Windows 7 Ultimate 7100] Server=[Windows 7 Ultimate 6.1]

   Sharename       Type      Comment

   ---------       ----      -------

cli_rpc_pipe_open: cli_nt_create failed on pipe \srvsvc to machine asus.  Error was NT_STATUS_ACCESS_DENIED

Error returning browse list: NT_STATUS_ACCESS_DENIED

Anonymous login successful

Domain=[WORKGROUP] OS=[Windows 7 Ultimate 7100] Server=[Windows 7 Ultimate 6.1]

   Server               Comment

   ---------            -------

   Workgroup            Master

   ---------            -------

```

even after i enabled the guest account... do you think that if i would use smb.conf from archlinux it would work?

----------

## aceFruchtsaft

You could give it a try, however, smb.conf will not resolve the password issue because it does not contain any passwords. What might influence the way samba connects is the "workgroup" parameter in smb.conf, because when connecting to a Windows machine which is not in the domain, both machines have to be in the same workgroup.

Did you connect with Arch to the very same Windows machine? Could you post the smb.conf from Arch, this might provide some more insight.

----------

## VoidWalker

Now, i made smclient work, the issue was that i had disabled entering the shares without password....

```
void@vaio ~ $ smbclient -N -L asus  

Domain=[ASUS] OS=[Windows 7 Ultimate 7100] Server=[Windows 7 Ultimate 6.1]

   Sharename       Type      Comment

   ---------       ----      -------

   ADMIN$          Disk      Remote Admin

   C$              Disk      Default share

   D               Disk      

   D$              Disk      Default share

   DT              Disk      

   E               Disk      

   E$              Disk      Default share

   F               Disk      

   F$              Disk      Default share

   G$              Disk      Default share

   H$              Disk      Default share

   IPC$            IPC       Remote IPC

   Stuff           Disk      

   Users           Disk      

   W               Disk      

   W$              Disk      Default share

Domain=[ASUS] OS=[Windows 7 Ultimate 7100] Server=[Windows 7 Ultimate 6.1]

   Server               Comment

   ---------            -------

   Workgroup            Master

   ---------            -------

```

But still no luck with video, i cant understand why....

mplayer -vo gl smb://desktop_name:desktop_passwd@desktop/share/video

still works :/

The problem is that i dont have my smb.conf from the previous instalation... but that smb.conf was the arch default... so i migth find it somewhere on the net.

----------

## M

Do you have mplayer compiled with samba USE flag? I personaly prefer to mount shares via cifs and smb.conf is not needed for this, for smb:// only workgroup and netbios name might be helpful if needed at all, you can copy smb.conf.example from /etc to ~/.smb/smb.conf and play with it. You had windows7 with arch too? If it is similar to vista now there is now a bunch of crap for shares, discoverable, visible, public etc. not just share this folder...

----------

## VoidWalker

yes, i had w7 with arch too.... it seems that the only solution right now is the cifs mount. Damn  :Sad: 

----------

## aceFruchtsaft

I had a look at the network traffic with wireshark. When running smbclient -N -L <servername> the network trace shows that the guest login is used, as expected. However, when I run mplayer smb://servername/sharename/somemovie wireshark shows that the guest account is not used. Instead, the smbclient library uses the currently logged in user as the username and thus it fails without a password.

However, you can force smbclient to use the guest account via

```

mplayer smb://guest@servername/sharename/somemovie

```

and you won't need a password if guest access is permitted in Windows 7.

----------

## VoidWalker

Thank you... but this still wont really solve my problem. I wanted to doubleclick the movie on the share (via gnome panel, it uses samba, Places>Connect to a server...>Windows share) But as this does not want to work, until i find a better solution, i will use mount.cifs. Anyway thank you for trying.

----------

