• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

NHKのネットラジオ「らじる☆らじる」を録音するためのシェルスクリプトを生成し、録音予約ジョブを登録する。こじまみつひろ氏作の radiru_rec2.py を改造したもの。


Commit MetaInfo

Revisão9e404ec5776369316e3d90bc8e94d1bfcea1c569 (tree)
Hora2022-04-11 18:36:21
AutorEHARA, Junichi <j-ehara@pop1...>
CommiterEHARA, Junichi

Mensagem de Log

Change URLs of input audio.

Mudança Sumário

Diff

--- a/radiru_rec.py
+++ b/radiru_rec.py
@@ -6,7 +6,7 @@ import datetime
66 from time import strptime
77
88 def get_version():
9- return "version 3.1 -- m3u8対応版 (2017年9月以降)"
9+ return "version 4.0 -- m3u8対応版 (2021年4月以降)"
1010
1111 def get_args():
1212 parser = argparse.ArgumentParser(description='radiru_radiru record scripts builder')
@@ -182,11 +182,11 @@ def make_script(channel, duration, title):
182182 my_id = get_serial()
183183 # print("scriptdir:{0},musicdir:{1}".format(scriptdir,musicdir))
184184 if channel == 'r1':
185- m3u8url = 'https://nhkradioakr1-i.akamaihd.net/hls/live/511633/1-r1/1-r1-01.m3u8'
185+ m3u8url = 'https://radio-stream.nhk.jp/hls/live/2023229/nhkradiruakr1/master.m3u8'
186186 elif channel == 'r2':
187- m3u8url = 'https://nhkradioakr2-i.akamaihd.net/hls/live/511929/1-r2/1-r2-01.m3u8'
187+ m3u8url = 'https://radio-stream.nhk.jp/hls/live/2023501/nhkradiruakr2/master.m3u8'
188188 elif channel == 'fm':
189- m3u8url = 'https://nhkradioakfm-i.akamaihd.net/hls/live/512290/1-fm/1-fm-01.m3u8'
189+ m3u8url = 'https://radio-stream.nhk.jp/hls/live/2023507/nhkradiruakfm/master.m3u8'
190190 else:
191191 print("channel set error:{0}".format(channel))
192192 usage()
@@ -204,7 +204,7 @@ def make_script(channel, duration, title):
204204 lines.append("#!/bin/sh")
205205 lines.append("file={0}/`date +\"%F-%H-%M\"`_{1}.m4a".format(musicdir, title))
206206 lines.append("sleep 38s")
207- lines.append("timeout {0}m avconv -loglevel quiet -i {1} -codec:a copy $file".format(duration, m3u8url))
207+ lines.append("timeout {0}m ffmpeg -loglevel quiet -i {1} -codec:a copy $file".format(duration, m3u8url))
208208 lines.append("rm -f {0}\n".format(scriptname))
209209 script = "\n".join(lines)
210210