anime.bat (14 Apr 2018)

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.10

32-bit build: http://www.mpg123.de/download/win32/

64-bit build: http://www.mpg123.de/download/win64/

)

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/

)

14 Apr 2018: Added option "--resync-limit -1" to handle MP3 songs with invalid headers after asking MPG123's programmer.

As of 26 Dec 2017, Hong Kong has suspended if not stopped its DAB+ broadcast after about 5 years of operation. So all DBC channels and RTHK 3x channels are out of service. Also many Radionomy channels are no longer in service. And Sky FM aka Radiotunes is no longer offering free broadcast.

[SCMP] Digital radio in Hong Kong dies with bow out of RTHK channels

Full story:http://www.scmp.com/news/hong-kong/education-community/article/2106501/digital-radio-hong-kong-dies-bow-out-rthk

@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 if needed

rem 65001

set path=%PATH%;%~dp0

set tuneto=%1

set MPG123=mpg123.exe --resync-limit -1 --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

rem call :array %cnt% amaze http://apple.neostreams.info:10007

call :array %cnt% amaze http://192.243.109.237:8000/anime.mp3

call :array %cnt% amitage http://sunbla.de:8012/

call :array %cnt% anime http://stream.animeradio.de/animeradio.mp3

call :array %cnt% animefm http://animefm.stream.laut.fm/animefm

call :array %cnt% anison http://pool.anison.fm:9000/AniSonFM(128)

call :array %cnt% anison320 http://pool.anison.fm:9000/AniSonFM(320)

call :array %cnt% baka http://144.217.203.184:8398/mountpoint

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% blast http://curiosity.shoutca.st:6110/

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:8957/stream

call :array %cnt% heron http://sc6.shoutcaststreaming.us:8018

call :array %cnt% j1 http://cabhs30.sonixcast.com:9774/

call :array %cnt% j1g http://cabhs37.sonixcast.com:20054/

call :array %cnt% j1x http://cabhs31.sonixcast.com:20080/

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% usfed http://192.173.28.42/WFEDAM.mp3

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% anmstt %RDONM%animes-station

call :array %cnt% arena %RDONM%JapanArenaOnlineRadio

call :array %cnt% jame %RDONM%JamendoLounge

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%\*mp3 | findstr -i %tuneto% | %PLYR% -

rem

rem dir /s/b %MYMP3FLDR%\*mp3 | findstr -i %tuneto% | busybox shuf | %MPG123% --resync-limit -1 -@-

rem

goto :eof

:LISTEN

set tt=station[%1]

call set vr=%%%tt%%%

for /f "tokens=1,2 delims= " %%a in ("%vr%") do (

if "%tuneto%"=="" (

rem list channels

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%\*mp3 | %PLYR% %tuneto%

rem

rem dir /s/b %MYMP3FLDR%\*mp3 | busybox shuf | %MPG123% --resync-limit -1 -@-

rem

goto :eof

:array

set /a cnt=%1+1

set station[%cnt%]=%2 %3

:eof