Musicas, Radio e Videos no Terminal LXDE
nano play
#!/bin/bash
## 09/02/2013
## Crédito Fran
## Debian 7.0
## apt-get install mpg123 mplayer
## Versão 1.2
notify-send -i applications-multimedia "Play Shell"
# Especificando o player a ser utilizado.
PLAYER="/usr/bin/mpg123"
PLAYER2="/usr/bin/mplayer"
LIMPAR="clear"
#!/bin/bash
## 09/02/2013
## Crédito Fran
## Debian 7.0
## apt-get install mpg123 mplayer
## Versão 1.2
notify-send -i applications-multimedia "Play Shell"
# Especificando o player a ser utilizado.
PLAYER="/usr/bin/mpg123"
PLAYER2="/usr/bin/mplayer"
LIMPAR="clear"
# Gerenciador de arquivos
WIN="pcmanfm"
# Cache rádio online
CH="-cache 512"
# Otinizar volume
VOL="-af volume=5db"
# Cor
# Fim
F="$(tput sgr0)"
# Amarelo
A="$(tput bold ; tput setaf 3)"
# Vermelho
V="$(tput bold ; tput setaf 1)"
# Branco
B="$(tput bold ; tput setaf 7)"
# Verde
VR="$(tput bold ; tput setaf 2)"
while true; do
$LIMPAR
echo $B" *****************************************************"$F
echo $B" * Estação Rádio ou Pasta de Músicas ou Videos *"$F
echo $B" * [space] PAUSA, [q] PARA, [Ctrl]+[c] SAI *"$F
echo $B" *****************************************************"$F
echo $B" ***********Pastas de Músicas ou Videos*********"$F
echo $B" * 1 Músicas MP3 2 Músicas ou vídeos *"$F
echo $B" ***********************************************"$F
echo $B" **************Estações de Rádios***************"$F
echo $B" * 3 89.1 Radio rock 4 Hard Rock *"$F
echo $B" * 5 Mix 106.3 FM 6 Classic Rock *"$F
echo $B" * 7 88.1 Gazeta FM 8 Transamérica *"$F
echo $B" * 9 Personalize *"$F
echo $B" ***********************************************"$F
echo ""
read fran
case $fran in
1)
echo ""
echo $B"Insira caminho completo do diretório"$F
echo ""
sleep 2
$WIN /home/$USER/Música &
sleep 1
notify-send "Insira caminho completo do diretório"
cd /tmp
read pasta
find "$pasta" \
-iname *.mp3 > lista.txt && sort lista.txt > lista.m3u
$PLAYER --utf8 -v -r --stereo -C --title --list /tmp/lista.m3u
$LIMPAR
;;
2)
echo ""
echo $B"Insira caminho completo do diretório"$F
echo ""
sleep 2
$WIN /home/$USER/Vídeos &
sleep 1
notify-send "Insira caminho completo do diretório"
cd /tmp
read pasta
find "$pasta" \
-iname *.avi -o -iname *.mkv -o -iname *.aif -o -iname *.aifc -o -iname *.aiff -o -iname *.asf -o -iname *.au -o -iname *.mp2 -o -iname *.mp3 -o -iname *.mpa -o -iname *.mp4 > lista.txt && sort lista.txt > lista.m3u
$PLAYER2 -af volume=10db -playlist /tmp/lista.m3u
$LIMPAR
;;
3)
notify-send "89.1 Radio rock"
$PLAYER2 $VOL $CH "https://playerservices.streamtheworld.com/api/livestream-redirect/RADIO_89FM_ADP.aac"
$LIMPAR
;;
4)
notify-send "Hard Rock"
$PLAYER2 $VOL $CH "http://hydra.cdnstream.com:80/1521_128"
$LIMPAR
;;
5)
notify-send "Mix 106.3 FM"
$PLAYER2 $VOL $CH "https://playerservices.streamtheworld.com/api/livestream-redirect/MIXFM_SAOPAULO.mp3"
$LIMPAR
;;
6)
notify-send "Classic Rock"
$PLAYER2 $VOL $CH "http://185.33.21.113:11093"
$LIMPAR
;;
7)
notify-send "88.1 Gazeta FM"
$PLAYER2 $VOL $CH "https://shout25.crossradio.com.br:18002/stream"
$LIMPAR
;;
8)
notify-send "Transamérica"
$PLAYER2 $VOL $CH "http://transamerica.crossradio.com.br:9100/live.aac"
$LIMPAR
;;
9)
echo ""
echo $B"Insira um link de outra rádio aqui"$F
echo ""
notify-send "Insira um link de outra rádio aqui"
read link
$PLAYER2 $VOL $CH "$link"
$LIMPAR
;;
*)
notify-send "Insira um link de outra rádio aqui"
notify-send "Insira um link de outra rádio aqui"
echo $V" **************************"$F
echo $V" * Escolha errada!!! *"$F
echo $V" * Tente novamente... *"$F
echo $V" **************************"$F
echo ""
sleep 4
$LIMPAR
;;
esac
done
chmod 777 play
exit
depois no terminal play
##########################################################################
Opcional
mkdir ~/.mplayer
nano ~/.mplayer/config
WIN="pcmanfm"
# Cache rádio online
CH="-cache 512"
# Otinizar volume
VOL="-af volume=5db"
# Cor
# Fim
F="$(tput sgr0)"
# Amarelo
A="$(tput bold ; tput setaf 3)"
# Vermelho
V="$(tput bold ; tput setaf 1)"
# Branco
B="$(tput bold ; tput setaf 7)"
# Verde
VR="$(tput bold ; tput setaf 2)"
while true; do
$LIMPAR
echo $B" *****************************************************"$F
echo $B" * Estação Rádio ou Pasta de Músicas ou Videos *"$F
echo $B" * [space] PAUSA, [q] PARA, [Ctrl]+[c] SAI *"$F
echo $B" *****************************************************"$F
echo $B" ***********Pastas de Músicas ou Videos*********"$F
echo $B" * 1 Músicas MP3 2 Músicas ou vídeos *"$F
echo $B" ***********************************************"$F
echo $B" **************Estações de Rádios***************"$F
echo $B" * 3 89.1 Radio rock 4 Hard Rock *"$F
echo $B" * 5 Mix 106.3 FM 6 Classic Rock *"$F
echo $B" * 7 88.1 Gazeta FM 8 Transamérica *"$F
echo $B" * 9 Personalize *"$F
echo $B" ***********************************************"$F
echo ""
read fran
case $fran in
1)
echo ""
echo $B"Insira caminho completo do diretório"$F
echo ""
sleep 2
$WIN /home/$USER/Música &
sleep 1
notify-send "Insira caminho completo do diretório"
cd /tmp
read pasta
find "$pasta" \
-iname *.mp3 > lista.txt && sort lista.txt > lista.m3u
$PLAYER --utf8 -v -r --stereo -C --title --list /tmp/lista.m3u
$LIMPAR
;;
2)
echo ""
echo $B"Insira caminho completo do diretório"$F
echo ""
sleep 2
$WIN /home/$USER/Vídeos &
sleep 1
notify-send "Insira caminho completo do diretório"
cd /tmp
read pasta
find "$pasta" \
-iname *.avi -o -iname *.mkv -o -iname *.aif -o -iname *.aifc -o -iname *.aiff -o -iname *.asf -o -iname *.au -o -iname *.mp2 -o -iname *.mp3 -o -iname *.mpa -o -iname *.mp4 > lista.txt && sort lista.txt > lista.m3u
$PLAYER2 -af volume=10db -playlist /tmp/lista.m3u
$LIMPAR
;;
3)
notify-send "89.1 Radio rock"
$PLAYER2 $VOL $CH "https://playerservices.streamtheworld.com/api/livestream-redirect/RADIO_89FM_ADP.aac"
$LIMPAR
;;
4)
notify-send "Hard Rock"
$PLAYER2 $VOL $CH "http://hydra.cdnstream.com:80/1521_128"
$LIMPAR
;;
5)
notify-send "Mix 106.3 FM"
$PLAYER2 $VOL $CH "https://playerservices.streamtheworld.com/api/livestream-redirect/MIXFM_SAOPAULO.mp3"
$LIMPAR
;;
6)
notify-send "Classic Rock"
$PLAYER2 $VOL $CH "http://185.33.21.113:11093"
$LIMPAR
;;
7)
notify-send "88.1 Gazeta FM"
$PLAYER2 $VOL $CH "https://shout25.crossradio.com.br:18002/stream"
$LIMPAR
;;
8)
notify-send "Transamérica"
$PLAYER2 $VOL $CH "http://transamerica.crossradio.com.br:9100/live.aac"
$LIMPAR
;;
9)
echo ""
echo $B"Insira um link de outra rádio aqui"$F
echo ""
notify-send "Insira um link de outra rádio aqui"
read link
$PLAYER2 $VOL $CH "$link"
$LIMPAR
;;
*)
notify-send "Insira um link de outra rádio aqui"
notify-send "Insira um link de outra rádio aqui"
echo $V" **************************"$F
echo $V" * Escolha errada!!! *"$F
echo $V" * Tente novamente... *"$F
echo $V" **************************"$F
echo ""
sleep 4
$LIMPAR
;;
esac
done
chmod 777 play
exit
depois no terminal play
##########################################################################
Opcional
mkdir ~/.mplayer
nano ~/.mplayer/config
##################
# video settings #
##################
# Start in fullscreen mode by default.
fs=yes
## Performance
lavdopts=threads=2
## Console
quiet=yes
msgcolor=yes
## Devices
consolecontrols=yes
mouseinput=yes
nojoystick=yes
noar=yes
nolirc=yes
## Window
# menu=yes
geometry=50%:50%
xy=1024
## File
use-filename-title=yes
## Video-Output
dr=yes
noslices=yes
adapter=1
vf=eq2,ass,screenshot
## Audio-Output
# all default
## On-Screen Display (OSD)
fontconfig=yes
embeddedfonts=yes
font="MPlayer OSDMenu"
subfont="FreeSerif"
subfont-encoding=UNICODE
ass=yes
ass-hinting=0
ass-color=33FFFF00
ass-border-color=0000A0A
ass-use-margins=yes
ass-font-scale=2
subfont-autoscale=0
subfont-text-scale=4
subfont-osd-scale=20
ffactor=1
spuaa=4
## Regions
slang=por,pt-br,pt-BR,ptbr,pt,und,eng
alang=por,pt-br,pt-BR,ptbr,pt,und,eng
#subcp=CP1252
sub-fuzziness=1
## Others
[protocol.dvd]
profile-desc="profile for dvd:// streams"
dvd-device="i:/"
nocache=yes
[protocol.dvdnav]
profile-desc="Profile for reading DVD menus"
dvd-device="i:/"
nocache=yes
# video settings #
##################
# Start in fullscreen mode by default.
fs=yes
## Performance
lavdopts=threads=2
## Console
quiet=yes
msgcolor=yes
## Devices
consolecontrols=yes
mouseinput=yes
nojoystick=yes
noar=yes
nolirc=yes
## Window
# menu=yes
geometry=50%:50%
xy=1024
## File
use-filename-title=yes
## Video-Output
dr=yes
noslices=yes
adapter=1
vf=eq2,ass,screenshot
## Audio-Output
# all default
## On-Screen Display (OSD)
fontconfig=yes
embeddedfonts=yes
font="MPlayer OSDMenu"
subfont="FreeSerif"
subfont-encoding=UNICODE
ass=yes
ass-hinting=0
ass-color=33FFFF00
ass-border-color=0000A0A
ass-use-margins=yes
ass-font-scale=2
subfont-autoscale=0
subfont-text-scale=4
subfont-osd-scale=20
ffactor=1
spuaa=4
## Regions
slang=por,pt-br,pt-BR,ptbr,pt,und,eng
alang=por,pt-br,pt-BR,ptbr,pt,und,eng
#subcp=CP1252
sub-fuzziness=1
## Others
[protocol.dvd]
profile-desc="profile for dvd:// streams"
dvd-device="i:/"
nocache=yes
[protocol.dvdnav]
profile-desc="Profile for reading DVD menus"
dvd-device="i:/"
nocache=yes
Comentários
Postar um comentário