LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-12-2004, 02:55 PM   #1
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Rep: Reputation: 30
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!
 
Old 12-12-2004, 03:47 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
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
 
Old 10-18-2006, 03:54 PM   #3
juanctes
Member
 
Registered: Dec 2004
Location: Argentina, corrientes (far from buenos aires, to the north)
Distribution: Ubuntu :(
Posts: 74

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Console MP3 Player? Chryzmo Linux - Software 10 10-18-2006 03:57 PM
S1 Mp3 player (Help Create a New Distro for an MP3 player!)) Ian_Hawdon Linux - General 3 12-05-2005 01:14 PM
mount mp3 player to /mnt/mp3? Muzzy Linux - General 4 05-09-2004 05:31 AM
iRiver iHP-120 20GB MP3 Player, a player for the rest of us ? dukeinlondon General 1 04-04-2004 04:44 AM
MP3 CD player can't read MP3 CD's burned in linux food188 Linux - Software 2 01-11-2004 04:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration