LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   CONSOLE CD/Mp3 player (https://www.linuxquestions.org/questions/linux-software-2/console-cd-mp3-player-265624/)

stevesk 12-12-2004 02:55 PM

CONSOLE CD/Mp3 player
 
Hello guys! How are you? Well, I am using a Slackware Linux 10.0, who has 'good' cd/mp3 players for X11. But the problem is that always when a screensaver starts or 'restarts' (the last one happens in each 5min depending of the screensaver) I see a big pause in any sound I am playing. And it is bad specially if you are away from the computer ex. in your bed trying to listen music.

I would like to know if a console cd/mp3 player could solve this problem, because it works in console so 'maybe' the screensaver would not interfere with that. I have tried a lot of console players but all of them got errors while trying to run, so I could not see if the problem would be solved. I've tried to contact their developers but got no anwers from them. Examples of cd/mp3 softwares I've tried and for some reason did not work (I did everything, read the INSTALL, installed exactly the libs they asked before installing them, did everything they said me to do, etc. and they got installed but I got program errors): cdcd, dcd, jac, and others.

So, if anyone knows a good console player that could 'maybe' work right and solve this problem, I would thank so much.

Thanks for your attention! :)

ilikejam 12-12-2004 03:47 PM

Hi.

mplayer might be a good bet for a text mode media player. I'm not too familiar with the package list and procedure for Slack, but I've never had any problems compiling it on Fedora. MPlayer will play pretty much anything you can throw at it. You'd obviously have to not be running X at all for this to have any effect on your problem.

You might want to disble your screensaver and just have the screen blank if you really want to use X - that shouldn't cause any glitches in audio. If you need X to be running and still want a screensaver as opposed to just a blank screen, then you could try running your current CD/media player with a lower 'nice' value. Have a look at 'man nice' and 'man renice' for details.

Dave

juanctes 10-18-2006 03:54 PM

my console mp3 player
 
Hi here is a litle script that i wrote for the console (coments are in spanish since that is my mother tongue)
it uses mplayer to play the list generated, but u also may uncoment the part that uses play pasing each filename to it.
whit mplayer is much better since u can move insede the music and cna also go back and fordward betwen tracks. without usen "killall sox" that just goes fordward
well good bye
it also makes use of global variable MP3DIR
if u dont have it set it ask for it.
Code:

cat /usr/local/bin/mp3
#!/bin/sh
#uso:  mp3 [-t <parte (o todo) del nombre de un tema>]
#      [-c <carpeta dentro de la (las carpetas que contienen mp3s)>]

if [ ! -z "$MP3DIR" ] ; then
    basedir=/usr/local/bin
    find "$MP3DIR" -type d > $basedir/mp3dirlist
    if [ ! -z $1  ] ; then
        if [ -z $3 ] ; then
            if [ "$1" = "-t" ] ; then
                find "$MP3DIR" -type f -iname "*$2*.[mM][pP]3" > $basedir/playlist
            else
                if [ "$1" = "-c" ] ; then
                    find "$MP3DIR" -type d -iname "*$2*" -exec find {} -type f -iname "*.[mM][pP]3" \; > $basedir/playlist
                else
                    echo "parametro incorrecto (desconocido)!"
                    exit 1
                fi
            fi
        else
            if [ "$1" = "$3" ] ; then
                echo "No se pueden repetir las opciones!"
                exit 1
            fi
            if [ "$1" = "-t" ] && [ "$3" = "-c" ] ; then
                    echo  entro en el primer condicional doble
                find "$MP3DIR" -type d -iname "*$4*" -exec find {} -type f -iname "*$2*.[mM][pP]3" \; > $basedir/playlist

            else
                if [ "$3" = "-t" ] && [ $1 = "-c" ] ; then
                    echo  entro en el segundo condicional doble
                    find "$MP3DIR" -type d -iname "*$2*" -exec find {} -type f -iname "*$4*.[mM][pP]3" \; > $basedir/playlist
                else
                    echo "parametros incorrectos (desconocidos)!"
                    exit 1
                fi
            fi
        fi
    else
        find "$MP3DIR" -type f -iname "*.[mM][pP]3" > $basedir/playlist
    fi
    #Eliminar los comentarios si no se dispone del mplayer, y comentar la linea 'mplayer -playlist $basedir/playlist';
    #O bien inserte el comando de cualquier reproductor que acepte una lista.
    #for i in `seq \`wc -l $basedir/playlist | cut -d / -f 1\` ;` ; do
        #a="`head -n $i $basedir/playlist | tail -n 1`"
        #echo "-------------------------------------------------------"
        #echo "Reproduciendo: " `basename "$a"`
        #b=`expr length "$a"`
        #c=`expr length "\`basename "$a"\`" `
        #echo "En carpeta: " `expr substr "$a" 1 $(($b - $c))`
        #echo "-------------------------------------------------------"
        #play "$a"
    #done
    mplayer -playlist $basedir/playlist
else
    echo "La variable \$MP3DIR no esta establecida."
    echo "Desea estabecerla? (S/N) [N]:"
    read a
    if [ ! -z $a ] ; then
        if [ "$a" = "S" ] ; then
            echo "Si ingresa (\"/\") el script buscara en todo el sistema de archivos (muy lento)"
            echo "Ingrese el directorio en formato absoluto:"
            read a
            if [ -e ~/.profile ] ; then
                if ` grep export ~/.profile 1> /dev/null ` ; then
                    replace "export " "MP3DIR=\"$a\"
export MP3DIR " -- ~/.profile
                else
                    echo "`grep . ~/.profile`
MP3DIR=\"$a\"
export MP3DIR" > ~/.profile
                fi
            else
                echo "MP3DIR=\"$a\"
export MP3DIR" > ~/.profile
            fi
            chmod 755 ~/.profile
            . ~/.profile
            /usr/local/bin/mp3 $1 $2 $2 $4
        else
            exit 1
        fi
    else
        exit 1
    fi
fi
exit 0
#END



All times are GMT -5. The time now is 01:32 PM.