[mythtv-users] alternatives to mythmusic?
Garth Benedict
shrkbait at gmail.com
Tue Mar 7 14:52:56 UTC 2006
Gabe, if you just type mpg123 from the command line (no params) do you get a
blurb about "This version of mpg321 has been configured with alsa as its
default. libao output device." If not then maybe you need to find a '-a'
or '-o' option to make it point to alsa (mpg123 -o alsa FILENAME). I go out
my digital so I know it CAN work. Your mplayer conf file is probably
already setup with a proper '-ao' in its case. I also have an
/etc/asound.conf instead of a .asoundrc file. Were you running your command
as root or a user? If not root then try root. And verbose mode really
makes it think it is playing?
BTW, the following is a patch to mp3act to get stop/prev/next working in
jukebox mode. This was required on my FC3 system. The output of 'ps' is
different amongst distributions it seems.
[root at jules t]# diff -urN includes/mp3act_functions.php
/var/www/html/mp3act/includes/
--- includes/mp3act_functions.php 2005-08-02 08:50:50.000000000 -0400
+++ /var/www/html/mp3act/includes/mp3act_functions.php 2006-01-28 17:15:
13.000000000 -0500
@@ -1369,15 +1369,20 @@
}
}
function killCmd($cmd){
- $pids = shell_exec("ps A | grep '$cmd' | awk -- '{print $1}'");
+// exec("echo \"ps -Af | grep '$cmd' | awk -- '{print $1}'\"
>>/tmp/mp3act-local.log 2>&1 ");
+ $pids = shell_exec("ps -Af | grep '$cmd' | awk -- '{print $2}'");
+// exec("echo $pids >>/tmp/mp3act-local.log 2>&1");
$pids = explode("\n",$pids);
- exec("kill $pids[0] $pids[1] > /dev/null 2>&1 &");
+// exec("echo '$pids[0]' '$pids[1]' >>/tmp/mp3act-local.log 2>&1");
+// exec("echo sudo kill $pids[0] $pids[1] >>/tmp/mp3act-local.log 2>&1");
+ exec("sudo kill $pids[0] $pids[1] >>/tmp/mp3act-local.log 2>&1 &");
}
function playLocal($file){
$mp3player = getSystemSetting("mp3bin");
$command = "$mp3player ".escapeshellarg(stripslashes($file));
- $pid = shell_exec("nohup $command > /dev/null 2>&1");
+ //$pid = shell_exec("nohup $command > /dev/null 2>&1");
+ $pid = shell_exec("nohup sudo $command >>/tmp/mp3act-local.log2>&1");
//setPid($pid);
//$tmp=exec("$mp3player ".escapeshellarg(stripslashes($file))." ");
}
@@ -1694,4 +1699,4 @@
return 1;
}
Along with the required sudoers entries.
On 3/7/06, Gabe Rubin <gaberubin at gmail.com> wrote:
>
> perhaps, I am just being dense here, but I am having a hard time
> getting this to work. I know it is working somewhat because I can
> stream, but cant use the jukebox mode (my reason for trying this). I
> have installed mpg123, but when I call it from the command line with a
> mp3, it just looks like it is playing, but I hear nothing. This is
> opposed to calling mplayer from the command line and giving it an mp3,
> it plays fine. I tried changing mplayer to my player in the settings,
> but that does not work either.
>
> What exactly am I supposed to give permissions to the audio device and
> program? I have made it so anyone can execute mpg123, but given the
> command line issue, i dont think this is my problem. I am running FC4
> with a SP/DIF output and ALSA if that helps.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20060307/38c6a7e6/attachment.htm
More information about the mythtv-users
mailing list