1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

らじるらじるをRPiで録音しています。(2026年01月20日現在)

1
Posted at

環境

RaspberryPi OS trixie

やっていること

らじるらじるの録音。radi.shでは録音できなくなったしradi.shはもうメンテナンスを辞めたそうです。

らじるらじるなら別に聞き逃しで聞けば良いですしほぼ聞き逃しで聞いていますが、天気予報は聞き逃しがないのと古楽の楽しみがたまに聞き逃しがないので録音しています。2026年01月20日現在の話です。

スクリプト

ffpmegを使用しています。sudo apt install ffmpeg でインストール出来ます。

#!/bin/bash

# らじるらじる6.2.0対応
# https://www.nhk.or.jp/radio/config/config_web.xml参照

time=`echo ${2}*60 | bc`

if [ ${1} = "R1" ]; then
  ffmpeg -i "https://simul.drdi.st.nhk/live/3/joined/master.m3u8" -t ${time} ${3}
elif [ ${1} = "R2" ]; then
  ffmpeg -i "https://simul.drdi.st.nhk/live/4/joined/master.m3u8" -t ${time} ${3}
elif [ ${1} = "FM" ]; then
  ffmpeg -i "https://simul.drdi.st.nhk/live/5/joined/master.m3u8" -t ${time} ${3}
fi

の、

radio/config/config_web.xml

を目で見てスクリプトにベタ打ちしています。他地方の方は別途設定しないと動かないはずです。

ガワのスクリプト。

#!/bin/bash

/home/tetu/bin/radiru.sh FM 63 "/media/hdd1/music/Kogaku/Kogaku_`date "+%Y_%m_%d_%H_%M"`.m4a"

cd /media/hdd1/music/Kogaku/
cp -p `ls -rt | tail -n 1` /media/hdd2/music/Kogaku/

こんなスクリプトをガワに書いています。ハードディスクを二つつけているのでバックアップの方にコピーするローテクな事をしています。

0 6 * * 1,2,3,4,5 /home/tetu/bin/kogaku.sh

cronに仕掛けて動かしています。別途らじるらじるが仕様を変えたら動かなくなるはずです。動かなくなったら改めて自分で使う分は変更します。以上メモです。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?