« Amusing LED Hat | GrandTec Grand IP Camera 3 firmware update » |
Some people like myself have had issues of wanting to play audio and videos files from a Windows SAMBA shared directory and have been told that you can only do so if you mount the smb shared directory first as access the files as local files. I have been using this setup since Ubuntu Dapper till Ubuntu Gutsy with no problems.
This HOWTO shows a method of playing videos using MPlayer directly from nautilus window without having to mount the shared directory.
Packages that you need from you favourite ubuntu mirror:
The latest standard MPlayer package actually supports smb and you can check by running the following in terminal with a valid smb address:
mplayer smb://192.168.1.3/shared/example.avi
If this doesnt work, then you either need the latest mplayer or samba client package.
Once we know that mplayer supports smb, we need to next configure a handler for opening movie files with mplayer. I tried to simply use the “Open With” action in nautilus but it never seemed to fire up mplayer with the correct file details, hence I had to use nautilus-actions-config to configure individual action.
After installing nautilus-actions-config package, simply run nautilus-actions-config from terminal. This should bring up a new dialog box where you can create a new action.
For quick setup, enter the following;
Menu item and Action:
Label: Open with Mplayer
Path: /usr/bin/mplayer
Parameters: %u
* For params you can further add mplayer parameters such as -cache 8192 for possibly smoother stream across network where 8192 is the size of the cache *
You can check smb windows shares and you can uncheck the rest if you wish. This means that your custom action will only appear for smb windows shares.
This approach can also allow the handling of secured Windows shares.
Under the Parameters field, simply enter something like the following,
-cache 8192 %s://SMBUSER:SMBPASSWORD@%h%M
Where SMBUSER and SMBPASSWORD are your secret username and passwords. As for the % parameters, please check the corresponding entry from the Parameters Legend above.