- radioplay.sh
#!/bin/sh # ruta de la playlist. P_MEDIA="/tmp/playlist" # lista de radio. R_LIST="$HOME/.radio" # color de fondo para la GUI. FG="#a0a0a0" # define el menú de acuerdo al ambiente. [ -t 0 ] && MENU="fzy" \ || MENU="dmenu" # radio target. [ -f "$R_LIST" ] \ || exit 1 # presenta radios en un menu. radio=$($MENU < $R_LIST) if [ -n "$radio" ]; then radio_url=${radio##* } # make the playlist. printf "$radio_url" > $P_MEDIA else exit 0 fi # reproductor. if [ -f "$P_MEDIA" ]; then [ -t 0 ] && mpv --no-video \ --playlist=$P_MEDIA \ || mpv --quiet \ --force-window=yes \ --lavfi-complex="[aid1]asplit[ao][a1];[a1]showwaves=mode=cline:colors=${FG}:rate=25,format=rgb0 [vo]" \ --playlist=$P_MEDIA else exit 1 fi # ffmpeg-filters showwaves # --lavfi-complex='[aid1]asplit[ao][a1];[a1]showwaves=mode=cline:colors=white:rate=25,format=rgb0 [vo]' # ejemplo fichero .radio: # radio_name https://some-radio-url # radio_textoplano http://texto-plano.xyz:8000/live.ogg
