anime.bat (21 Sep 2017)

My anime.bat uses a command-line mp3 player called mpg123. You could modify it to use other players like foobar2000 or MPC-BE!

You could download its Window$ static  executable from the official website (
  Latest version: 1.25.6
)
or (
you could grab the one at the bottom of this web-page (mpg123-1.21.0.zip), which I compiled from source codes using MinGW (

  1. need to uninstall all card reader drivers in Device Manager first
  2. ./configure --enable-static --disable-shared
)
or (
   http://www.guysalias.tk/misc/mpg123/
)

@echo off
rem
rem http://www.dostips.com/DtTipsStringManipulation.php
rem http://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how
rem http://msdn.microsoft.com/en-us/library/windows/desktop/dd317756%28v=vs.85%29.aspx
rem http://ss64.com/
rem
rem All radio channels list
rem http://dir.xiph.org/by_genre/Anime
rem
rem *** code pages
rem japanese
rem chcp 932
rem sim chinese
rem chcp 936
rem JIS
rem chcp 50222
rem UTF-8
rem ***

rem set code-page to Unicode
rem 65001

set tuneto=%1

set MPG123=mpg123.exe --long-tag --utf8 -v
set MYMP3FLDR=drive:\path\to\my_mp3_folder
set slist=

set cnt=0

rem **************************************
rem RTHK channels
rem http://bbs.91kds.net/thread-1484-1-1.html
rem
set RTHK=http://202.177.192.119/radio
set RTHK=http://stm.rthk.hk/radio
call :array %cnt% rthk1 %RTHK%1
call :array %cnt% rthk2 %RTHK%2
call :array %cnt% rthk3 %RTHK%3
call :array %cnt% rthk4 %RTHK%4
call :array %cnt% rthk5 %RTHK%5
call :array %cnt% rthk31 %RTHK%31
call :array %cnt% rthk33 %RTHK%33
call :array %cnt% rthk35 %RTHK%35
call :array %cnt% rthkpth %RTHK%pth

rem **************************************
rem DBC Hong Kong (www.newworldtel.com)
rem
rem DBC=http://58.64.197.165:8001/dbc
rem DBC=http://liveaud0.dbc.hk/80C6D6/dn0/dbc
rem set DBC=http://rtspoversea.dbc.hk/dbc
set DBC=http://rtspaws.dbc.hk/dbc_mp3_ch
call :array %cnt% dbc1 %DBC%1
call :array %cnt% dbc2 %DBC%2
call :array %cnt% dbc3 %DBC%3
call :array %cnt% dbc4 %DBC%4
call :array %cnt% dbc5 %DBC%5
call :array %cnt% dbc6 %DBC%6
call :array %cnt% dbc7 %DBC%7

rem **************************************
rem Movie Ticket Radio
rem
rem set MTR=http://64.202.98.203:
set MTR=http://listen.djcmedia.com/

call :array %cnt% classic %MTR%movieticketclassichigh
call :array %cnt% pop %MTR%
movieticketpophigh

rem
rem **************************************
rem standalone stations
rem
call :array %cnt% ani http://stream1.aniradio.org:8000/stream1.bot.mp3
call :array %cnt% amaze http://apple.neostreams.info:10007
call :array %cnt% anime http://stream.animeradio.de/animeradio.mp3
call :array %cnt% bbc http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-eieuk
call :array %cnt% bbc4 http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_q
call :array %cnt% bigb http://50.7.173.162:8091/listen.pls
call :array %cnt% cbs http://6693.live.streamtheworld.com/CBSNEWS_SC
call :array %cnt% dada http://dadamore2.ddo.jp:8000
call :array %cnt% dino http://s11.myradiostream.com:17142/
call :array %cnt% fkk http://perseus.shoutca.st:8324/stream
call :array %cnt% fkkmoe http://centauri.shoutca.st:8557
call :array %cnt% heron http://sc6.shoutcaststreaming.us:8018
call :array %cnt% jar http://audio.misproductions.com:80/japan128k
call :array %cnt% nami http://radio2.flex.ru:8000/radionami
call :array %cnt% neko http://www.neko-radio.com:8000/radio
call :array %cnt% nfo http://itori.animenfo.com:443
call :array %cnt% nexus http://radio.animenexus.net:8000/animenexus
call :array %cnt% otaku http://radio.otakunopodcast.com:8000/otakunoradio
call :array %cnt% rajio http://srv378.revolutions-panel.pro:8004/stream
call :array %cnt% read http://mozart.wkar.msu.edu:80/rrs-64-mp3
call :array %cnt% rdo http://stream.r-a-d.io/main.mp3
call :array %cnt% science http://radiostream.science360.org:4200/live
call :array %cnt% shinsen http://shinsen-radio.org:8000/shinsen-radio.128.mp3
call :array %cnt% stream http://www.streamingsoundtracks.com/modules/Listen/MP3-hi.pls
call :array %cnt% bigb http://50.7.173.162:8091
call :array %cnt% ygg http://yggdrasilradio.net/yggdrasilradio_mp3_128kbps.pls


rem **************************************
rem SKY.FM channels
rem http://72.26.204.62/
rem set SKYFM=http://pub8.sky.fm/sky_
rem https://gist.github.com/yandod/5582430/
rem Need special app as of 05 Mar 2016
set SKYFM=http://pub7.radiotunes.com/radiotunes_
call :array %cnt% rt-nature %SKYFM%nature

rem **************************************
rem Radionomy channels
rem
rem IceCast Directory (streaming999)
set RDONM=http://streaming.radionomy.com/
call :array %cnt% acr1 %RDONM%AnimeClassicsRadio1
call :array %cnt% acr2 %RDONM%AnimeClassicsRadio2
call :array %cnt% acrcls %RDONM%AnimeClassicsRadioRetro
call :array %cnt% acrmoe %RDONM%AnimeClassicsRadioMOE
call :array %cnt% akiba %RDONM%AkibaStationRadio
call :array %cnt% all %RDONM%AllAnimeNetwork
call :array %cnt% all2 %RDONM%AllAnimeNetwork2
call :array %cnt% arena %RDONM%JapanArenaOnlineRadio
call :array %cnt% kawaii %RDONM%kawaiiradio-official
call :array %cnt% open %RDONM%radio-openings-animes
call :array %cnt% sekai %RDONM%AnimeSekai
call :array %cnt% stereo %RDONM%Anime-stereo
call :array %cnt% subar %RDONM%Subarashii
call :array %cnt% symphony %RDONM%RadioAnimeSymphony
call :array %cnt% tsuki %RDONM%tsuki-radio
call :array %cnt% vocal %RDONM%RadioVocaloid
call :array %cnt% yume %RDONM%YumeAnimeRadio


rem **************************************
rem Streaming Bible
rem
set BIBLE=http://streamingbibleradio.org:8001/
call :array %cnt% biblekjv %BIBLE%English_KJV
call :array %cnt% biblecnt %BIBLE%Cantonese

set PLYR=%MPG123%
for /L %%b in (1,1,%cnt%) do (call :LISTEN %%b)


if "%tuneto%"=="" (
  @echo.
  @echo player: %MPG123%
  @echo.
  @echo %cnt% stations:
  @echo %slist%
  @echo.
  echo MP3 folder: %MYMP3FLDR%
  goto :eof
)

set PLYR=%MPG123% -z -@
if "%tuneto%"==":)" (
  goto :PLAYALL
)

rem PLAYFLDR
dir /s/b %MYMP3FLDR%\%tuneto% | %PLYR% -
goto :eof

:LISTEN
  set tt=station[%1]
  call set vr=%%%tt%%%
  for /f "tokens=1,2 delims= " %%a in ("%vr%") do (
    if "%tuneto%"=="" (
      if "%slist%"=="" (
        set slist=%%a
      ) else (
        set slist=%slist% %%a
      )
    ) else (
      call :PLY %%a %%b
    )
  )
goto :eof

:PLY
if /i "%1"=="%tuneto%" (
 
%PLYR% -@ %2
  if errorlevel==-1 (
    %PLYR% --ignore-mime -@ %2
  )
)
goto :eof

:PLAYM3U
rem set "PLYR=%MPG123% -@"
rem **************************************
rem set TGT="%M3U%sample.m3u"
rem if /i "%1"=="sample.m3u"
goto :eof

:PLAYALL
dir /s/b %MYMP3FLDR% | %PLYR% %tuneto%
goto :eof

:array
set /a cnt=%1+1
set station[%cnt%]=%2 %3


:eof
ċ
anime.bat-2014Mar06.7z
(2k)
Man-wai Chang,
Mar 8, 2014, 8:06 PM
ċ
animenfo.m3u
(0k)
Man-wai Chang,
Jun 13, 2013, 3:51 AM
ċ
mpg123-1.20.1.zip
(487k)
Man-wai Chang,
Jun 18, 2014, 3:01 AM
ċ
mpg123-1.21.0.zip
(487k)
Man-wai Chang,
Oct 13, 2014, 6:44 AM
Comments