ストリーミングで公開されているNHKラジオ語学講座(らじる★らじる(聴き逃し)配信)の録音を自動化するためのデスクトップアプリです。語学講座の録音にはffmpegを利用します。OSDN.net で公開されていた「CaptureStream」の派生版であり、同ソースコードを基盤としています。正式に開発を引き継いでいるものではありません。録音した語学講座のファイルは著作権法で許されている範囲内でご利用ください。
例:CaptureStream2をGUIなしで起動する
/Applications/CaptureStream2.app/Contents/MacOS/CaptureStream2 -nogui
以下の内容を com.example.capturestream2.plist
という名前で保存します。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.capturestream2</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/CaptureStream2.app/Contents/MacOS/CaptureStream2</string>
<string>-nogui</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>3600</integer> <!-- 例: 1時間ごとに実行 -->
</dict>
</plist>
🧠 補足:
RunAtLoad
: Mac起動時やログイン時に実行StartInterval
: 秒単位で繰り返し実行(例:3600秒=1時間)StartCalendarInterval
: 特定の時刻に実行したい場合はこちらを使うmkdir -p ~/Library/LaunchAgents
cp com.example.capturestream2.plist ~/Library/LaunchAgents/
chmod 644 ~/Library/LaunchAgents/com.example.capturestream2.plist
launchctl load ~/Library/LaunchAgents/com.example.capturestream2.plist
📌 登録済みか確認:
launchctl list | grep capturestream2
launchctl unload ~/Library/LaunchAgents/com.example.capturestream2.plist