You are not logged in.
Pages: 1
Hi,
i'm looking for a very simple command line music player like mpg123 but with a server option like mocp/mpd.
Other than mocp or mpd i want it for playing files on-the-fly. Like browsing around and playing files i see in the current directory, queueing them, maybe with a curses interface like ncmpc.
As far as i know, mpg123 can't queue and doesn't run in the background per default. mocp on the other hand comes very close but i don't think it can play files out of the current working directory like i want it.
Do you know a tool that fits my description?
Thanks in advance,
demian
Last edited by demian (2010-06-01 18:21:05)
no place like /home
github
Offline
I would imagine mocp can do what you need. I never use it in that way, so I'm not sure, but you should take a look at the manpage if you haven't already. There is also cmus, which I haven't tried. If neither of those work for you, you might be out of luck.
Offline
fwiw, i have a script i call playnow which accepts a file path and plays it through mpd. i use it for one-off downloaded content or whatever. it just adds it to a temp folder, quickly updates the db, adds the temp folder to the current playlist (queuing) and plays it.
it's been working well for me. i also hear mpd accepts the file:/// uri scheme which kinda takes care of this usage case too.
//github/
Offline
Maybe mocp -a or mocp -p? I didn't dig into it, but playing songs while browsing folders on mc is definitely on my ToDo list
Sorry for my English. Feel free to point out my errors.
Offline
Turns out it can be done with mocp:
if which mocp &>/dev/null;then
mplay() {
mocp -c
mocp -a "$@"
mocp -p
}
alias madd="mocp -a"
alias mtog="mocp -G"
alias mkill="killall mocp"
alias mnxt="mocp -f"
alias mpause="mocp -P"
alias mprev="mocp -r"
alias mcl="mocp -c"
alias msync="mocp -y"
fi
Thanks for the suggestions.
P.S.: playnow is not suitable for me as I have mpd installed on only one of my systems. I'll have to work on an automount solution to get goodsong (and then probably playnow too) on my other pcs working too, but there are more pressing matters right now .
Last edited by demian (2010-06-01 18:16:41)
no place like /home
github
Offline
fwiw, i have a script i call playnow which accepts a file path and plays it through mpd. i use it for one-off downloaded content or whatever. it just adds it to a temp folder, quickly updates the db, adds the temp folder to the current playlist (queuing) and plays it.
it's been working well for me. i also hear mpd accepts the file:/// uri scheme which kinda takes care of this usage case too.
As far as I know, MPD's database is updated automatically via inotify as soon as a file is added, so I think you don't even need to update before playing.
Offline
brisbin33 wrote:fwiw, i have a script i call playnow which accepts a file path and plays it through mpd. i use it for one-off downloaded content or whatever. it just adds it to a temp folder, quickly updates the db, adds the temp folder to the current playlist (queuing) and plays it.
it's been working well for me. i also hear mpd accepts the file:/// uri scheme which kinda takes care of this usage case too.
As far as I know, MPD's database is updated automatically via inotify as soon as a file is added, so I think you don't even need to update before playing.
sounds great in theory, but i'm not so sure about in practice.
for inotify to pick up the new file(s) and mpd to update itself all between bash executing `ln -s` and `mpc add` would be... impressive. calling `mpc --wait update` manually means i only wait exactly as long as the update requires.
thanks for the advice though, maybe i'll test it out and see.
//github/
Offline
That's awesome Demian, thanks for sharing that!
Sorry for my English. Feel free to point out my errors.
Offline
Mplayer!
#!/usr/bin/perl
# mplayerd
use strict;
use App::Daemon qw(daemonize);
my @files = @ARGV or die 'Need files';
my $cmd = "mplayer -slave -input file=\$HOME/.mplayer/mplayerd.fifo";
unless(-p "$ENV{HOME}/.mplayer/mplayerd.fifo") {
use POSIX;
mkfifo("$ENV{HOME}/.mplayer/mplayerd.fifo", 0666) or die $!;
}
print "Daemonizing.";
daemonize();
system("$cmd \"$_\"") for @files;
echo loadfile foofile > fifo
etc...
Offline
fwiw, i have a script i call playnow which accepts a file path and plays it through mpd. i use it for one-off downloaded content or whatever. it just adds it to a temp folder, quickly updates the db, adds the temp folder to the current playlist (queuing) and plays it.
it's been working well for me. i also hear mpd accepts the file:/// uri scheme which kinda takes care of this usage case too.
There's also mpcplay.
Offline
xmms2 does what you want out of the box.
Offline
thanks.
but actually i'm quite comfortable with mocp now, since it's leightweight and already comes with a curses interface.
no place like /home
github
Offline
Pages: 1