【家】録画鯖の復旧(その3)Mirakurunのインストール
目的 |
修理・故障・メンテナンス |
作業 |
DIY |
難易度 |
![](/images/icon_difficult_on.svg) 初級 |
作業時間 |
3時間以内 |
1
2
3
■Mirakurunのインストール
$ su
# pm2 -g
# npm install pm2 -g
# npm install mirakurun -g --unsafe --production
# npm install rivarun -g
# npm install arib-b25-stream-test -g --unsafe
# pm2 status
+----+--------------------+----------+------+-----------+----------+----------+
| id | name | mode | ? | status | cpu | memory |
+----+--------------------+----------+------+-----------+----------+----------+
| 1 | mirakurun-server | fork | 0 | online | 5.1% | 274.2mb |
+----+--------------------+----------+------+-----------+----------+----------+
4
■チューナーの設定
# mirakurun config tuners
- name: PX4-S1
types:
- BS
- CS
command: recpt1_px4 --device /dev/px4video0 --lnb 15 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PX4-S2
types:
command: recpt1_px4 --device /dev/px4video1 --lnb 15 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PX4-T1
types:
- GR
command: recpt1_px4 --device /dev/px4video2 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PX4-T2
types:
- GR
command: recpt1_px4 --device /dev/px4video3 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: TBS6922
types:
- SKY
command: szap-s2j -c /usr/local/etc/szap-s2j.conf -l <satelite> -S 1 -p -r -M 5 -C 35 <channel>
dvbDevicePath: /dev/dvb/adapter0/dvr0
decoder: arib-b1-stream-test
isDisabled: true
# exit
5
■チャンネルの設定
チャンネル設定は、先人がスクリプトを作成しているということで拝借してきました。
・スクリプトに必要なepgdumpのインストール
$ cd ~/git
$ git clone
https://github.com/stz2012/epgdump
$ cd epgdump
$ make
$ su
# make install
# exit
・チャンネル設定スクリプトのインストール
$ cd ~
$ wget
https://www.jifu-labo.net/files/mcconfig.pl.gz
$ gzip -d mcconfig.pl.gz
$ vi
my $Recpt1_Cmd = "/usr/local/bin/recpt1";
↓
my $Recpt1_Cmd = "/usr/local/bin/recpt1_px4";
$ su
# install -m 755 mcconfig.pl /usr/local/bin/
# yum install perl-XML-LibXML perl-YAML
・チャンネル設定
# mcconfig.pl -f
# mirakurun config channels
- name: NHKEテレ1東京
type: GR
channel: '39'
- name: NHKEテレ1東京
type: GR
channel: '40'
・
・
・
(使わないチャンネルは、isDisabled: true を最後に追記する。)
# mirakurun start
6
■動作確認
# rivarun --list | sed 's/},/},\n/g'
status: 200
headers: {"server":"Mirakurun/2.14.0","content-type":"application/json; charset=utf-8","date":"Fri, 20 Mar 2020 05:14:38 GMT","connection":"close","content-length":"14968"}
[{"type":"GR","channel":"39","name":"NHKEテレ1東京","services":[{"id":3273701032,"serviceId":1032,"networkId":32737,"name":"NHKEテレ1東京"},
{"id":3273701033,"serviceId":1033,"networkId":32737,"name":"NHKEテレ2東京"},
{"id":3273701034,"serviceId":1034,"networkId":32737,"name":"NHKEテレ3東京"},
・
・
・
# exit
$ rivarun --b25 --sid 1032 --ch GR/39 15 testGR39U.ts
(地上波(NHKEテレ) Unix Socket)
$ rivarun --b25 --mirakurun localhost:40772 --sid 1032 --ch GR/39 15 testGR39T.ts
(地上波(NHKEテレ) TCP Socket)
$ rivarun --b25 --sid 101 --ch BS/BS15_0 15 testBS15_0U.ts
(BS(NHK BS1) Unix Socket)
$ rivarun --b25 --mirakurun localhost:40772 --sid 101 --ch BS/BS15_0 15 testBS15_0T.ts
(BS(NHK BS1) TCP Socket)
7
■ログローテート
$ su
# pm2 install pm2-logrotate
# vi /etc/logrotate.d/mirakurun
/usr/local/var/log/mirakurun.stdout.log
/usr/local/var/log/mirakurun.stderr.log
/{
daily
compress
rotate 7
missingok
notifempty
}
[PR]Yahoo!ショッピング
入札多数の人気商品!
[PR]Yahoo!オークション
関連コンテンツ
関連整備ピックアップ
関連リンク