smbget -u username -p passw0rd -w domain_or_workgroup //server/share/mediafile.ogv -O - | mplayer -

Pipe media file on samba share to mplayer

add -rootwin to make it cover the whole desktop. This may work better than mounting it as a cifs mount.

0
By: dizzi90
2014-02-16 21:42:06

These Might Interest You

  • This commando copies the file (which must reside in the current directory) to //<server>/<share-name>/<subdirectory>/<file> through the CIFS protocol (Samba share or Windows Share). It doesn't require you to mount the filesystem first. --directory "<subdirectory>" may be omitted in order to copy the file the the root of the share. The "%password" part may also be omitted. If doing so, smbclient will ask for the password interactively. To copy a file from a Windows/Samba share, change "put" for "get". smbclient --user=user%password --directory "&lt;subdirectory&gt;" --command "get &lt;file&gt;" //&lt;server&gt;/&lt;share-name&gt; Show Sample Output


    1
    smbclient --user=user%password --directory "<subdirectory>" --command "put <file>" //<server>/<share-name>
    quitaiskiluisf · 2018-05-12 19:18:42 0
  • Streams youtube-dl video to mplayer. Usage: syt 'youtube.com/link' 'anotherlinkto.video' Uses mplayer controls


    3
    syt() { pipe=`mktemp -u`; mkfifo -m 600 "$pipe" && for i in "$@"; do youtube-dl -qo "$pipe" "$i" & mplayer "$pipe" || break; done; rm -f "$pipe"; }
    snipertyler · 2015-03-14 01:48:20 0
  • mounts a samba share on a remote machine using a credentials file that can be in a file tht is not accessable by other users the file will look like: username="username" password="password" best option i belive


    -2
    sudo mount -t cifs -o credentials=/path/to/credenials //hostname/sharename /mount/point
    magma_camel · 2009-11-23 23:55:20 0

  • 7
    sudo mount -t cifs -o user,username="samba username" //$ip_or_host/$sharename /mnt
    ludogomez · 2009-11-23 15:26:23 1
  • the middle command between the ; and ; is the vi commands that insert that line into the last line of the file, the esc with the carets is literally hitting the escape key, you have to have the smbfs package installed to do it, I use it to access my iTunes music on my mac from my linux PC's with amarok so I can play the music anywhere in the house. among other things, it allows you to access the files on that share from your computer anytime you're on that network.


    4
    sudo vi /etc/fstab; Go//smb-share/gino /mnt/place smbfs defaults,username=gino,password=pass 0 0<esc>:wq; mount //smb-share/gino
    GinoMan2440 · 2009-04-02 16:04:35 3
  • The glob pattern * expands to all files, no need for the 'ls' command. The quotes around "$i" make sure filenames with spaces in them are handled correctly. mplayer determines if it is a media file and plays it, or gives errors and the loop asks if this file has to be removed. Show Sample Output


    0
    for i in *; do mplayer "$i" && rm -i "$i"; done
    warkruid · 2013-12-26 17:13:23 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: