HomeServer31
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#contents
* HW 環境 [#b0d05f02]
- 現在稼働中の TV 録画サーバー(Ubutu16.04-LTS, PT3 x2, E...
- この機会に現在((購入/導入)可能)で/(メンテナンス...
- ''三鷹用サーバーとして使用していたハードをそのまま活用...
- ''その後、横浜からメインサーバーを三鷹に移設したので、...
- TV 録画機能はインストールしたままなので、再起動すれば稼...
** Ubuntu バージョン更新(to Ubuntu 22.04 LTS) [#td13c7e1]
- ''do-release-upgrade'' コマンドを利用して段階的にローリ...
- 既存の環境設定(SSH、Samba、Network 設定などを引き継げ...
- 但し、この方法を使った場合 ''以前のバージョンに戻ること...
** チューナーボード( PLEX 8ch 同時録画 ) [#h0bd793e]
- [[PLEX MLT8PE:http://www.plex-net.co.jp/product/px-mlt8...
-- PCIx x1 (電源供給用)
-- USB オンボードヘッダー(データ用、USB2.0 でも OK)
-- カードリーダー内蔵
|Function|Decice|h
|USB Bridge|ITE IT9305E|
|ISDB-T/S Demodulator|Sony CXD2856ER (x3)|
|Terrestrial/Satellite Tuner|Sony CXD2858ER (x3)|
-- &ref(px-mlt8pe_1.jpg);
-- &ref(px-mlt8pe_3.jpg);
*** ボード認識(PCI デバイスではなく、USB として認識され...
- 以下では PLEX のボードと カードリーダーが認識されている
[MUMIT] munakata:~$ lsusb
Bus 002 Device 002: ID 152d:9561 JMicron Technology Corp...
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 ro...
Bus 001 Device 004: ID 04e6:5116 SCM Microsystems, Inc. ...
Bus 001 Device 003: ID 0511:0252 N'Able (DataBook) Techn...
Bus 001 Device 002: ID 0511:0253 N'Able (DataBook) Techn...
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 ro...
* SW 環境 [#pf12f915]
** Ubuntu 22.04-LTS Desktop 版を利用 [#p50e0963]
*** インストール ディレクトリ [#g2de9156]
- KGB2
-- ''/home/munakata/git'' 以下
[KGB2] munakata:~$ ls -l ./git
合計 36
drwxrwxr-x 3 munakata munakata 4096 3月 15 2023 479b7...
drwxrwxr-x 16 munakata munakata 4096 1月 20 11:10 EPGSt...
drwxrwxr-x 6 munakata munakata 4096 2月 8 2023 OLD_m...
drwxrwxr-x 3 munakata munakata 4096 3月 15 2023 epgdump
drwxrwxr-x 7 munakata munakata 4096 2月 2 2023 libar...
drwxrwxr-x 2 munakata munakata 4096 3月 15 2023 mirak...
drwxrwxr-x 6 munakata munakata 4096 2月 22 2023 mod-a...
drwxrwxr-x 5 munakata munakata 4096 2月 2 2023 pt3
drwxrwxr-x 4 munakata munakata 4096 3月 15 2023 recdvb
- MUMIT
-- ''/home/munakata/git'' 以下
[MUMIT] munakata:~$ ls -l git
合計 12
drwxrwxr-x 17 munakata munakata 4096 3月 21 2023 EPGSt...
drwxrwxr-x 7 munakata munakata 4096 3月 21 2023 libar...
drwxrwxr-x 9 munakata munakata 4096 3月 21 2023 px4_drv
*** 開発環境 [#w753a330]
- autoconf build-essential cmake curl git libssl-dev libt...
$sudo apt-get install autoconf build-essential cmake cur...
*** アプリ [#ha738395]
- chrony (時刻合わせ)
- samba
*** ARIB ライブラリー (libarib25) [#b6e0dc4e]
- ソースから ARIB ライブラリー関数をビルドしてインストール
$ mkdir ~/git_work_arib
$ cd ~/git_work_arib
$ git clone https://github.com/stz2012/libarib25.git
$ cd libarib25/
$ cmake . <--- '.'を忘れずに!!
$ make
# sudo make install
# sudo /sbin/ldconfig
-- cmake で ''Could NOT find PCSC (missing: PCSC_LIBRARIE...
munakata@mumit:~/git/libarib25$ munakata@mumit:~/git/lib...
CMake Error at /usr/share/cmake-3.22/Modules/FindPackage...
Could NOT find PCSC (missing: PCSC_LIBRARIES)
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandar...
cmake/FindPCSC.cmake:29 (find_package_handle_standard_...
CMakeLists.txt:30 (find_package)
以下の2つのパッケージをインストールする
munakata@mumit:~/git/libarib25$ sudo apt-get install lib...
munakata@mumit:~/git/libarib25$ sudo apt-get install ge...
- ライブラリーが認識されていることを確認
[MUMIT] munakata:~$ ldconfig -p | grep arib
libarib25.so.0 (libc6,x86-64) => /usr/local/lib/...
libarib25.so (libc6,x86-64) => /usr/local/lib/li...
libaribb24.so.0 (libc6,x86-64) => /lib/x86_64-li...
*** B-CASカード認識 [#n00955c1]
- B-CAS カードの購入
- カードリーダーの購入(ボード上のカードリーダーを PCSC ...
-- 利用するコミュニティドライバーの説明には ''ボード上の...
このドライバは、各種対応デバイスに内蔵されているカードリ...
- PCSC のインストール
$sudo apt-get install pcscd pcsc-tools libpcsclite-dev
$sudo systemctl enable pcscd.service
- B-CAS カードの面に注意( &color(red){赤い面が下}; にな...
-- &ref(BS_card.jpg);
[MUMIT] munakata:~$ pcsc_scan
Using reader plug'n play mechanism
Scanning present readers...
0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (5331...
Sat Jan 28 11:52:57 2023
Reader 0: SCM Microsystems Inc. SCR 3310 [CCID Interfac...
Event number: 2
Card state: Card inserted,
ATR: 3B F0 12 00 FF 91 81 B1 7C 45 1F 03 99
ATR: 3B F0 12 00 FF 91 81 B1 7C 45 1F 03 99
+ TS = 3B --> Direct Convention
+ T0 = F0, Y(1): 1111, K: 0 (historical bytes)
TA(1) = 12 --> Fi=372, Di=2, 186 cycles/ETU
21505 bits/s at 4 MHz, fMax for Fi = 5 MHz => 26881 ...
TB(1) = 00 --> VPP is not electrically connected
TC(1) = FF --> Extra guard time: 255 (special value)
TD(1) = 91 --> Y(i+1) = 1001, Protocol T = 1
-----
TA(2) = 81 --> Protocol to be used in spec mode: T=1 -...
TD(2) = B1 --> Y(i+1) = 1011, Protocol T = 1
-----
TA(3) = 7C --> IFSC: 124
TB(3) = 45 --> Block Waiting Integer: 4 - Character Wa...
TD(3) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global...
-----
TA(4) = 03 --> Clock stop: not supported - Class accep...
+ Historical bytes:
+ TCK = 99 (correct checksum)
Possibly identified card (using /usr/share/pcsc/smartcar...
3B F0 12 00 FF 91 81 B1 7C 45 1F 03 99
Japanese Chijou Digital B-CAS Card (pay TV)
- pcsc_scan が失敗( ''SCardEstablishContext: Service not...
-- pcsd startが実行されていない( /var/run/pcscd/pcscd.co...
-- pcscd を再起動する
$sudo systemctl restart pcscd.socket
$ls /var/run/pcscd/pcscd.comm
/var/run/pcscd/pcscd.comm
** チューナーカードのドライバー [#q0135174]
- github 上の ''nns779'' [[コミュニティ(通称 非公式)...
$ git clone https://github.com/nns779/px4_drv
- [[PLEX サイト:http://www.plex-net.co.jp/download/]] で...
- ''fwtool'' コマンドを使って ''PXW3U4.sys'' ファイルから...
- Linux ホスト上の ''/lib/firmware'' ディレクトリーに配...
$ cd px4_drv/fwtool/
$ make
$ wget http://plex-net.co.jp/plex/pxw3u4/pxw3u4_BDA_ver1...
$ unzip pxw3u4_BDA_ver1x64.zip
$ sudo ./fwtool pxw3u4_BDA_ver1x64/PXW3U4.sys it930x-fir...
$ sudo cp -p it930x-firmware.bin /lib/firmware/
$ cd ..
- dkms の仕組みを利用して kernel バージョンに合わせたドラ...
-- 非公式ドライバーを展開した場所にある ''dkms.conf'' と...
. ./dkms.conf
cp -a `pwd` /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
dkms add -m $PACKAGE_NAME -v $PACKAGE_VERSION
dkms build -m $PACKAGE_NAME -v $PACKAGE_VERSION
dkms install -m $PACKAGE_NAME -v $PACKAGE_VERSION
-- 上で作成した dkms のインストールスクリプトを実行
$ sudo bash dkms.install
-- カーネルロードモジュールの確認
[MUMIT] munakata:$ lsmod | grep -e ^px4_drv
px4_drv 172032 0
-- マシンの再起動で ''/dev/pxmlt8videoN'' というドライバ...
[MUMIT] munakata:~$ ls -l /dev/px*
crw-rw-r-- 1 root video 511, 0 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 1 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 2 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 3 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 4 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 5 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 6 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 7 1月 26 11:26 /dev/pxmlt8...
-- dkms を使ったドライバーアンインストール用のスクリプト ...
. ./dkms.conf
dkms remove -m $PACKAGE_NAME -v $PACKAGE_VERSION --all
rm -vrf /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
-- ドライバーのアップデート
$ git pull
$ sudo bash dkms.uninstall
$ sudo bash dkms.install
** 録画コマンド ''recpt1'' のビルドと録画テスト [#g61b315b]
- 録画コマンドは、PLEX 公式ドライバ付属の recpt1 を利用する
$ wget http://plex-net.co.jp/download/linux/Linux_Driver...
$ unzip Linux_Driver.zip
$ cd Linux_Driver/MyRecpt1/MyRecpt1/recpt1
- デバイス名を公式ドライバの記述から非公式のものに置き換...
$ sed -i".org" 's/-DTV/video/g' pt1_dev.h
- ''疑問:''
-- 上記の sed コマンドは ''/dev/px4ーDTV0'' となっているデ...
-- 今回のカードのドライバー名は ''/dev/px4-video0'' では...
-- 実際に存在するデバイス名を記載しなければ実行時にカード...
-- 更に実際に存在しないカード(pt1/2/3 とか)をヘッダーか...
-- このファイルは 地デジ と BS/CS にチャンネルを明示的に...
- 実際に使った ''pt1_dev.h'' ファイル(先頭部分)
[MUMIT] munakata:~/plex/Linux_Driver/MyRecpt1/MyRecpt1/r...
/* -*- tab-width: 4; indent-tabs-mode: nil -*- */
#ifndef _PT1_DEV_H_
#define _PT1_DEV_H_
//****************************************************
//*********** Jacky Han Modification Start ***********
//****************************************************
char *bsdev[NUM_BSDEV] = {
"/dev/pxmlt8video0",
"/dev/pxmlt8video1",
"/dev/pxmlt8video4",
"/dev/pxmlt8video5",
"/dev/pxmlt8video8",
"/dev/pxmlt8video9",
"/dev/pxmlt8video12",
"/dev/pxmlt8video13",
"/dev/pxmlt8video16",
"/dev/pxmlt8video17",
"/dev/pxmlt8video20",
"/dev/pxmlt8video21",
"/dev/pxmlt8video24",
"/dev/pxmlt8video25",
"/dev/pxmlt8video28",
"/dev/pxmlt8video29"
};
char *isdb_t_dev[NUM_ISDB_T_DEV] = {
"/dev/pxmlt8video2",
"/dev/pxmlt8video3",
"/dev/pxmlt8video6",
"/dev/pxmlt8video7",
"/dev/pxmlt8video10",
"/dev/pxmlt8video11",
"/dev/pxmlt8video14",
"/dev/pxmlt8video15",
"/dev/pxmlt8video18",
"/dev/pxmlt8video19",
"/dev/pxmlt8video22",
"/dev/pxmlt8video23",
"/dev/pxmlt8video26",
"/dev/pxmlt8video27",
"/dev/pxmlt8video30",
"/dev/pxmlt8video31"
};
//****************************************************
//************ Jacky Han Modification End ************
//****************************************************
(以下、変更なし)
- pt1/2/3 系のコマンドを区別できるように ''Makefile.in'' ...
$ vi Makefile.in
変更前) ※7行目以降
TARGET = recpt1
TARGET2 = recpt1ctl
TARGET3 = checksignal
変更後)
TARGET = recpt1_px4
TARGET2 = recpt1ctl_px4
TARGET3 = checksignal_px4
- recpt1_px4 のビルド
[MUMIT] munakata:~/plex/offcial/Linux_Driver/MyRecpt1/My...
gcc -MM recpt1.c decoder.c mkpath.c tssplitter_lite.c re...
rm -f recpt1.o decoder.o mkpath.o tssplitter_lite.o recp...
recpt1core.o asicen_dtv.o recpt1 recpt1ctl checksignal ...
[MUMIT] munakata:~/plex/offcial/Linux_Driver/MyRecpt1/My...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for create_arib_std_b25 in -larib25... yes
checking for log10 in -lm... yes
checking for pthread_kill in -lpthread... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
[MUMIT] munakata:~/plex/offcial/Linux_Driver/MyRecpt1/My...
-- make を実行すると多数のワーニング ''warning: braces ar...
--- make の結果 ---> &ref(make_log.txt);
- ワーニングなのでコマンド自体は出来上がり、インストール...
[MUMIT] munakata:~/plex/offcial/Linux_Driver/MyRecpt1/My...
install -m 755 recpt1_px4 recpt1ctl_px4 checksignal_px4 ...
- 受信テスト
[MUMIT] munakata:$ recpt1_px4 --b25 --strip 27 30 ~/test...
[MUMIT] munakata:$ recpt1_px4 --b25 --strip BS15_0 30 ~/...
* Runtime 関係 [#bbaea76e]
** [[Mirakurun:https://github.com/Chinachu/Mirakurun]] [#...
- [[Remarks for Platform Support:https://github.com/China...
-- ''Node.js ^14.17.0 || ^16 needed''
*** node 16.x インストール [#hc10e2dc]
[MUMIT] munakata:~$ curl -sL https://deb.nodesource.com/...
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
[MUMIT] munakata:~$ sudo apt-get install -y nodejs
[MUMIT] munakata:~$ node -v
v16.19.0
*** Mirakurunのインストール [#c7d78dfd]
- Mirakurun はデバイスを触るサービスなので root でインス...
- # PM2 (Process Manager)
[MUMIT] munakata:~$ sudo npm install pm2 -g
- Mirakurun インストール
[MUMIT] munakata:~$ sudo npm install mirakurun -g --unsa...
[MUMIT] munakata:~$ sudo npm install rivarun -g
[MUMIT] munakata:~$ sudo npm install arib-b25-stream-tes...
-- &ref(launched.jpg);
*** Tuner 設定 [#b14b28f1]
- &color(red){''Tuner 設定[PT3 x2]''};(デフォルトは PT...
-- ''BS/CS = channel 0/1/4/5''
-- ''GR(地デジ) = channel 2/3/6/7''
-- &ref(tuners.yml);
[KGB2] munakata:~$ cat tuners.yml
- name: PT3-S1
types:
- BS
- CS
command: recpt1 --device /dev/pt3video0 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-S2
types:
- BS
- CS
command: recpt1 --device /dev/pt3video1 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-S3
types:
- BS
- CS
command: recpt1 --device /dev/pt3video4 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-S4
types:
- BS
- CS
command: recpt1 --device /dev/pt3video5 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-T1
types:
- GR
command: recpt1 --device /dev/pt3video2 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-T2
types:
- GR
command: recpt1 --device /dev/pt3video3 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-T4
types:
- GR
command: recpt1 --device /dev/pt3videoi6 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-T4
types:
- GR
command: recpt1 --device /dev/pt3video7 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: TBS6922
types:
- SKY
command: szap-s2j -c /usr/local/etc/szap-s2j.conf -l <...
dvbDevicePath: /dev/dvb/adapter0/dvr0
decoder: arib-b1-stream-test
isDisabled: true
- &color(red){''Tuner 設定[PLEX MLT8PE]''};(デフォルト...
-- BS/CS = channel 0/1/4/5 (たぶん PLEX はどのチャンネル...
-- GR = channel 2/3/6/7
-- &ref(tuners_plex.yml);
[MUMIT] munakata:~/plex$ sudo mirakurun config tuners
- name: PXMLT8-S1
types:
- BS
- CS
command: recpt1_px4 --device /dev/pxmlt8video0 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-S2
types:
- BS
- CS
command: recpt1_px4 --device /dev/pxmlt8video1 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT8-S3
types:
- BS
- CS
command: recpt1_px4 --device /dev/pxmlt8video4 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-S4
types:
- BS
- CS
command: recpt1_px4 --device /dev/pxmlt8video5 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-T1
types:
- GR
command: recpt1_px4 --device /dev/pxmlt8video2 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-T2
types:
- GR
command: recpt1_px4 --device /dev/pxmlt8video3 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-T3
types:
- GR
command: recpt1_px4 --device /dev/pxmlt8video6 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-T4
types:
- GR
command: recpt1_px4 --device /dev/pxmlt8video7 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: TBS6922
types:
- SKY
command: szap-s2j -c /usr/local/etc/szap-s2j.conf -l <...
dvbDevicePath: /dev/dvb/adapter0/dvr0
decoder: arib-b1-stream-test
isDisabled: false
*** チャンネル設定 [#w032d3a0]
- Mirakurun 3.9-rc2 では GR/BS ともに自動登録できるようだ...
-- &ref(channels.yml);
*** mirakurun-server の再始動 [#kd50a43c]
[MUMIT] munakata:~/plex$ sudo pm2 stop mirakurun-server
[MUMIT] munakata:~/plex$ sudo pm2 start mirakurun-server
- log rotation の設定
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 install pm2-...
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 list
- &ref(all_active.jpg);
-- log_rotation 設定ファイル ( etc/logrotate.d/mirakurun )
/usr/local/var/log/mirakurun.stdout.log
/usr/local/var/log/mirakurun.stderr.log
/{
daily
compress
rotate 7
missingok
notifempty
}
- channel の設定
-- コマンド
[KGB2] munakata:~$ sudo mirakurun config channels
-- ファイルの場所
[KGB2] munakata:~$ ls -l /usr/local/etc/mirakurun/channe...
-rw-r--r-- 1 root root 2394 3月 14 06:11 /usr/local/etc...
-- %%''&color(red){TVK (GR 17) が取得できない、テレビでは...
** [[EPGStation:https://github.com/l3tnun/EPGStation]] [#...
- [[Linux / macOS 用セットアップマニュアル:https://github...
- インストール要件の確認
[MUMIT] munakata:~$ node --version
v16.19.0
[MUMIT] munakata:~$ curl -o - http://localhost:40772/api...
{"current":"3.9.0-rc.2","latest":"3.9.0-rc.2"}
[MUMIT] munakata:~$ python --version
Python 2.7.18
[MUMIT] munakata:~$ gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
[MUMIT] munakata:~$ ffmpeg -version
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000...
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22...
--enable-librsvg --enable-libmfx --enable-libdc1394 --en...
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[MUMIT] munakata:$ cd git
[MUMIT] munakata:/git$ git clone https://github.com/l3tn...
[MUMIT] munakata:~/git$ cd EPGStation/
[MUMIT] munakata:~/git/EPGStation$ npm run all-install
[MUMIT] munakata:~/git/EPGStation$ npm run build
- snap は /home 以外の名前のディレクトリで実行するとエラ...
- [[詳細設定:https://github.com/l3tnun/EPGStation/blob/ma...
//- 起動時に EPGSTATION が起動していない場合には
// $ pm2 start dist/index.js --name "epgstation"
- 設定ファイルの作成
$ cp config/config.yml.template config/config.yml
$ cp config/operatorLogConfig.sample.yml config/operator...
$ cp config/epgUpdaterLogConfig.sample.yml config/epgUpd...
$ cp config/serviceLogConfig.sample.yml config/serviceLo...
$ cp config/enc.js.template config/enc.js
-- FFmpeg/FFprobe についてデフォルトでは ''/usr/local/bin...
-- Ubuntu では ''/usr/bin'' に ffmpeg/ffprobe があるので...
- 起動時に EPGSTATION が自動起動しない理由を解析した結果...
$ sudo pm2 start dist/index.js --name "epgstation"
$ sudo pm2 save
* 運用 [#l713f224]
** node program manager (pm2) [#qaf17b54]
** 管理画面(Web インターフェース) [#ff090014]
|サービス|機能|アドレス|確認ポイント|h
|mirakurun|録画チューナーサーバー|https://<インストール対...
|~|~|~|チューナー登録状況|
|epgstation|ユーザーインターフェース|http://<インストール...
|~|~|~|予約録画出来るか|
|~|~|~|チューナー数分録画出来るか|
|~|~|~|キーワード予約録画出来るか|
** アップデート [#pbb9575b]
*** EPGStatrion のアップデート [#w96739e4]
- EPGStatrion は github 上で開発されており、git pull でコ...
- バージョンアップ実施時には Mirakurun を一時停止し、アッ...
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 stop epgatat...
-&ref(EPG_update_stop.png);
[MUMIT] munakata:~/git/EPGStation$ git pull
-&ref(EPG_update_git.png);
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 start epgsta...
-&ref(EPG_update_start.png);
*** mirakurun のアップデート [#k67cc9e9]
- npm コマンドを使ってパッケージを更新する
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 start miraku...
[MUMIT] munakata:~/git/EPGStation$ sudo npm install mira...
-&ref(mrakurun_update_npm.png);
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 start miraku...
*** node js パッケージのインストール [#hc850956]
- ncu コマンド(更新確認)
[KGB2] munakata:~/git/EPGStation$ ncu
Checking /raid_vol/home/munakata/git/EPGStation/package....
[====================] 47/47 100%
@types/lodash 4.17.0 → 4.17.5
@types/multer 1.4.9 → 1.4.11
@types/node 18.11.9 → 20.14.2
@typescript-eslint/eslint-plugin 7.8.0 → 7.13.0
@typescript-eslint/parser 7.8.0 → 7.13.0
axios 1.6.8 → 1.7.2
eslint 8.57.0 → 9.5.0
eslint-config-prettier 8.10.0 → 9.1.0
file-type 16.5.4 → 19.0.0
prettier 3.2.5 → 3.3.2
swagger-ui-dist 5.17.2 → 5.17.14
url-join 4.0.1 → 5.0.0
Run ncu -u to upgrade package.json
- ncu -u (アップデート)
[KGB2] munakata:~/git/EPGStation$ ncu -u
Upgrading /raid_vol/home/munakata/git/EPGStation/package...
[====================] 47/47 100%
@types/lodash 4.17.0 → 4.17.5
@types/multer 1.4.9 → 1.4.11
@types/node 18.11.9 → 20.14.2
@typescript-eslint/eslint-plugin 7.8.0 → 7.13.0
@typescript-eslint/parser 7.8.0 → 7.13.0
axios 1.6.8 → 1.7.2
eslint 8.57.0 → 9.5.0
eslint-config-prettier 8.10.0 → 9.1.0
file-type 16.5.4 → 19.0.0
prettier 3.2.5 → 3.3.2
swagger-ui-dist 5.17.2 → 5.17.14
url-join 4.0.1 → 5.0.0
Run npm install to install new versions.
- npm install (更新版のインストール)
[KGB2] munakata:~/git/EPGStation$ npm install
npm notice
npm notice New major version of npm available! 8.19.4 ->...
npm notice Changelog: https://github.com/npm/cli/release...
npm notice Run npm install -g npm@10.8.1 to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: epgstation@2.9.1
npm ERR! Found: eslint@9.5.0
npm ERR! node_modules/eslint
npm ERR! dev eslint@"9.5.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^8.56.0" from @typescript-eslint/p...
npm ERR! node_modules/@typescript-eslint/parser
npm ERR! dev @typescript-eslint/parser@"7.13.0" from t...
npm ERR! peer @typescript-eslint/parser@"^7.0.0" from ...
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR! dev @typescript-eslint/eslint-plugin@"7.13....
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken)...
npm ERR!
npm ERR! See /raid_vol/home/munakata/.npm/eresolve-repor...
npm ERR! A complete log of this run can be found in:
npm ERR! /raid_vol/home/munakata/.npm/_logs/2024-06-...
- 上記エラーは n を使って node を最新の LTS バージョンに...
[KGB2] munakata:~/git/EPGStation$ sudo npm install n -g
[KGB2] munakata:~/git/EPGStation$ sudo n lts
[KGB2] munakata:~/git/EPGStation$ node -v
v20.14.0
* 障害解析 [#s9471eb6]
*** 録画に失敗する問題 ⇒ Mirakurun とのソケット通信に失敗...
- EPGStation/logs/Service$ sudo ''vi stream.log''
[2024-06-16T06:11:25.984] [INFO] stream - start stream: 0
[2024-06-16T06:11:25.984] [INFO] stream - get mirakurun ...
[2024-06-16T06:11:40.987] [ERROR] stream - start stream ...
[2024-06-16T06:11:40.987] [ERROR] stream - Error: socket...
at connResetException (node:internal/errors:705:14)
at Socket.socketOnEnd (node:_http_client:518:23)
at Socket.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:135...
at processTicksAndRejections (node:internal/process/...
code: 'ECONNRESET'
}
[2024-06-16T06:11:40.988] [INFO] stream - stop stream 0
* 参考 URL [#qefc32f9]
- [[PLEX社製TVチューナーの非公式Linuxドライバインストール...
- [[Mirakurunのインストール手順(Ubuntu・Debian・CentOS)...
- [[Ubuntu22.04とPLEX社製チューナーで構築するMirakurun最...
- [[EPGStation-PLEX tuner-Ubuntu 22.04-自宅録画サーバー:h...
- [[PX-W3PE4チューナー+非公式版ドライバー (20.04 ベース)...
- [[LinuxでPX-W3U4を使う(2019年1月版) (18.04 ベース):http...
- [[WinUSB版px4_drvの使い方:https://enctools.com/px4-drv-...
- [[【完全解説】LinuxとPX-W3U4でEPGStation v2を構築する方...
- [[Mirakurunを手動でチャンネル設定:https://qiita.com/yur...
- [[地上波(GR)のチャンネルスキャンを追加:https://horaku...
- [[チャンネルスキャンの実行方法。(MirakurunxEPGStation):...
終了行:
#contents
* HW 環境 [#b0d05f02]
- 現在稼働中の TV 録画サーバー(Ubutu16.04-LTS, PT3 x2, E...
- この機会に現在((購入/導入)可能)で/(メンテナンス...
- ''三鷹用サーバーとして使用していたハードをそのまま活用...
- ''その後、横浜からメインサーバーを三鷹に移設したので、...
- TV 録画機能はインストールしたままなので、再起動すれば稼...
** Ubuntu バージョン更新(to Ubuntu 22.04 LTS) [#td13c7e1]
- ''do-release-upgrade'' コマンドを利用して段階的にローリ...
- 既存の環境設定(SSH、Samba、Network 設定などを引き継げ...
- 但し、この方法を使った場合 ''以前のバージョンに戻ること...
** チューナーボード( PLEX 8ch 同時録画 ) [#h0bd793e]
- [[PLEX MLT8PE:http://www.plex-net.co.jp/product/px-mlt8...
-- PCIx x1 (電源供給用)
-- USB オンボードヘッダー(データ用、USB2.0 でも OK)
-- カードリーダー内蔵
|Function|Decice|h
|USB Bridge|ITE IT9305E|
|ISDB-T/S Demodulator|Sony CXD2856ER (x3)|
|Terrestrial/Satellite Tuner|Sony CXD2858ER (x3)|
-- &ref(px-mlt8pe_1.jpg);
-- &ref(px-mlt8pe_3.jpg);
*** ボード認識(PCI デバイスではなく、USB として認識され...
- 以下では PLEX のボードと カードリーダーが認識されている
[MUMIT] munakata:~$ lsusb
Bus 002 Device 002: ID 152d:9561 JMicron Technology Corp...
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 ro...
Bus 001 Device 004: ID 04e6:5116 SCM Microsystems, Inc. ...
Bus 001 Device 003: ID 0511:0252 N'Able (DataBook) Techn...
Bus 001 Device 002: ID 0511:0253 N'Able (DataBook) Techn...
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 ro...
* SW 環境 [#pf12f915]
** Ubuntu 22.04-LTS Desktop 版を利用 [#p50e0963]
*** インストール ディレクトリ [#g2de9156]
- KGB2
-- ''/home/munakata/git'' 以下
[KGB2] munakata:~$ ls -l ./git
合計 36
drwxrwxr-x 3 munakata munakata 4096 3月 15 2023 479b7...
drwxrwxr-x 16 munakata munakata 4096 1月 20 11:10 EPGSt...
drwxrwxr-x 6 munakata munakata 4096 2月 8 2023 OLD_m...
drwxrwxr-x 3 munakata munakata 4096 3月 15 2023 epgdump
drwxrwxr-x 7 munakata munakata 4096 2月 2 2023 libar...
drwxrwxr-x 2 munakata munakata 4096 3月 15 2023 mirak...
drwxrwxr-x 6 munakata munakata 4096 2月 22 2023 mod-a...
drwxrwxr-x 5 munakata munakata 4096 2月 2 2023 pt3
drwxrwxr-x 4 munakata munakata 4096 3月 15 2023 recdvb
- MUMIT
-- ''/home/munakata/git'' 以下
[MUMIT] munakata:~$ ls -l git
合計 12
drwxrwxr-x 17 munakata munakata 4096 3月 21 2023 EPGSt...
drwxrwxr-x 7 munakata munakata 4096 3月 21 2023 libar...
drwxrwxr-x 9 munakata munakata 4096 3月 21 2023 px4_drv
*** 開発環境 [#w753a330]
- autoconf build-essential cmake curl git libssl-dev libt...
$sudo apt-get install autoconf build-essential cmake cur...
*** アプリ [#ha738395]
- chrony (時刻合わせ)
- samba
*** ARIB ライブラリー (libarib25) [#b6e0dc4e]
- ソースから ARIB ライブラリー関数をビルドしてインストール
$ mkdir ~/git_work_arib
$ cd ~/git_work_arib
$ git clone https://github.com/stz2012/libarib25.git
$ cd libarib25/
$ cmake . <--- '.'を忘れずに!!
$ make
# sudo make install
# sudo /sbin/ldconfig
-- cmake で ''Could NOT find PCSC (missing: PCSC_LIBRARIE...
munakata@mumit:~/git/libarib25$ munakata@mumit:~/git/lib...
CMake Error at /usr/share/cmake-3.22/Modules/FindPackage...
Could NOT find PCSC (missing: PCSC_LIBRARIES)
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandar...
cmake/FindPCSC.cmake:29 (find_package_handle_standard_...
CMakeLists.txt:30 (find_package)
以下の2つのパッケージをインストールする
munakata@mumit:~/git/libarib25$ sudo apt-get install lib...
munakata@mumit:~/git/libarib25$ sudo apt-get install ge...
- ライブラリーが認識されていることを確認
[MUMIT] munakata:~$ ldconfig -p | grep arib
libarib25.so.0 (libc6,x86-64) => /usr/local/lib/...
libarib25.so (libc6,x86-64) => /usr/local/lib/li...
libaribb24.so.0 (libc6,x86-64) => /lib/x86_64-li...
*** B-CASカード認識 [#n00955c1]
- B-CAS カードの購入
- カードリーダーの購入(ボード上のカードリーダーを PCSC ...
-- 利用するコミュニティドライバーの説明には ''ボード上の...
このドライバは、各種対応デバイスに内蔵されているカードリ...
- PCSC のインストール
$sudo apt-get install pcscd pcsc-tools libpcsclite-dev
$sudo systemctl enable pcscd.service
- B-CAS カードの面に注意( &color(red){赤い面が下}; にな...
-- &ref(BS_card.jpg);
[MUMIT] munakata:~$ pcsc_scan
Using reader plug'n play mechanism
Scanning present readers...
0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (5331...
Sat Jan 28 11:52:57 2023
Reader 0: SCM Microsystems Inc. SCR 3310 [CCID Interfac...
Event number: 2
Card state: Card inserted,
ATR: 3B F0 12 00 FF 91 81 B1 7C 45 1F 03 99
ATR: 3B F0 12 00 FF 91 81 B1 7C 45 1F 03 99
+ TS = 3B --> Direct Convention
+ T0 = F0, Y(1): 1111, K: 0 (historical bytes)
TA(1) = 12 --> Fi=372, Di=2, 186 cycles/ETU
21505 bits/s at 4 MHz, fMax for Fi = 5 MHz => 26881 ...
TB(1) = 00 --> VPP is not electrically connected
TC(1) = FF --> Extra guard time: 255 (special value)
TD(1) = 91 --> Y(i+1) = 1001, Protocol T = 1
-----
TA(2) = 81 --> Protocol to be used in spec mode: T=1 -...
TD(2) = B1 --> Y(i+1) = 1011, Protocol T = 1
-----
TA(3) = 7C --> IFSC: 124
TB(3) = 45 --> Block Waiting Integer: 4 - Character Wa...
TD(3) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global...
-----
TA(4) = 03 --> Clock stop: not supported - Class accep...
+ Historical bytes:
+ TCK = 99 (correct checksum)
Possibly identified card (using /usr/share/pcsc/smartcar...
3B F0 12 00 FF 91 81 B1 7C 45 1F 03 99
Japanese Chijou Digital B-CAS Card (pay TV)
- pcsc_scan が失敗( ''SCardEstablishContext: Service not...
-- pcsd startが実行されていない( /var/run/pcscd/pcscd.co...
-- pcscd を再起動する
$sudo systemctl restart pcscd.socket
$ls /var/run/pcscd/pcscd.comm
/var/run/pcscd/pcscd.comm
** チューナーカードのドライバー [#q0135174]
- github 上の ''nns779'' [[コミュニティ(通称 非公式)...
$ git clone https://github.com/nns779/px4_drv
- [[PLEX サイト:http://www.plex-net.co.jp/download/]] で...
- ''fwtool'' コマンドを使って ''PXW3U4.sys'' ファイルから...
- Linux ホスト上の ''/lib/firmware'' ディレクトリーに配...
$ cd px4_drv/fwtool/
$ make
$ wget http://plex-net.co.jp/plex/pxw3u4/pxw3u4_BDA_ver1...
$ unzip pxw3u4_BDA_ver1x64.zip
$ sudo ./fwtool pxw3u4_BDA_ver1x64/PXW3U4.sys it930x-fir...
$ sudo cp -p it930x-firmware.bin /lib/firmware/
$ cd ..
- dkms の仕組みを利用して kernel バージョンに合わせたドラ...
-- 非公式ドライバーを展開した場所にある ''dkms.conf'' と...
. ./dkms.conf
cp -a `pwd` /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
dkms add -m $PACKAGE_NAME -v $PACKAGE_VERSION
dkms build -m $PACKAGE_NAME -v $PACKAGE_VERSION
dkms install -m $PACKAGE_NAME -v $PACKAGE_VERSION
-- 上で作成した dkms のインストールスクリプトを実行
$ sudo bash dkms.install
-- カーネルロードモジュールの確認
[MUMIT] munakata:$ lsmod | grep -e ^px4_drv
px4_drv 172032 0
-- マシンの再起動で ''/dev/pxmlt8videoN'' というドライバ...
[MUMIT] munakata:~$ ls -l /dev/px*
crw-rw-r-- 1 root video 511, 0 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 1 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 2 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 3 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 4 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 5 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 6 1月 26 11:26 /dev/pxmlt8...
crw-rw-r-- 1 root video 511, 7 1月 26 11:26 /dev/pxmlt8...
-- dkms を使ったドライバーアンインストール用のスクリプト ...
. ./dkms.conf
dkms remove -m $PACKAGE_NAME -v $PACKAGE_VERSION --all
rm -vrf /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
-- ドライバーのアップデート
$ git pull
$ sudo bash dkms.uninstall
$ sudo bash dkms.install
** 録画コマンド ''recpt1'' のビルドと録画テスト [#g61b315b]
- 録画コマンドは、PLEX 公式ドライバ付属の recpt1 を利用する
$ wget http://plex-net.co.jp/download/linux/Linux_Driver...
$ unzip Linux_Driver.zip
$ cd Linux_Driver/MyRecpt1/MyRecpt1/recpt1
- デバイス名を公式ドライバの記述から非公式のものに置き換...
$ sed -i".org" 's/-DTV/video/g' pt1_dev.h
- ''疑問:''
-- 上記の sed コマンドは ''/dev/px4ーDTV0'' となっているデ...
-- 今回のカードのドライバー名は ''/dev/px4-video0'' では...
-- 実際に存在するデバイス名を記載しなければ実行時にカード...
-- 更に実際に存在しないカード(pt1/2/3 とか)をヘッダーか...
-- このファイルは 地デジ と BS/CS にチャンネルを明示的に...
- 実際に使った ''pt1_dev.h'' ファイル(先頭部分)
[MUMIT] munakata:~/plex/Linux_Driver/MyRecpt1/MyRecpt1/r...
/* -*- tab-width: 4; indent-tabs-mode: nil -*- */
#ifndef _PT1_DEV_H_
#define _PT1_DEV_H_
//****************************************************
//*********** Jacky Han Modification Start ***********
//****************************************************
char *bsdev[NUM_BSDEV] = {
"/dev/pxmlt8video0",
"/dev/pxmlt8video1",
"/dev/pxmlt8video4",
"/dev/pxmlt8video5",
"/dev/pxmlt8video8",
"/dev/pxmlt8video9",
"/dev/pxmlt8video12",
"/dev/pxmlt8video13",
"/dev/pxmlt8video16",
"/dev/pxmlt8video17",
"/dev/pxmlt8video20",
"/dev/pxmlt8video21",
"/dev/pxmlt8video24",
"/dev/pxmlt8video25",
"/dev/pxmlt8video28",
"/dev/pxmlt8video29"
};
char *isdb_t_dev[NUM_ISDB_T_DEV] = {
"/dev/pxmlt8video2",
"/dev/pxmlt8video3",
"/dev/pxmlt8video6",
"/dev/pxmlt8video7",
"/dev/pxmlt8video10",
"/dev/pxmlt8video11",
"/dev/pxmlt8video14",
"/dev/pxmlt8video15",
"/dev/pxmlt8video18",
"/dev/pxmlt8video19",
"/dev/pxmlt8video22",
"/dev/pxmlt8video23",
"/dev/pxmlt8video26",
"/dev/pxmlt8video27",
"/dev/pxmlt8video30",
"/dev/pxmlt8video31"
};
//****************************************************
//************ Jacky Han Modification End ************
//****************************************************
(以下、変更なし)
- pt1/2/3 系のコマンドを区別できるように ''Makefile.in'' ...
$ vi Makefile.in
変更前) ※7行目以降
TARGET = recpt1
TARGET2 = recpt1ctl
TARGET3 = checksignal
変更後)
TARGET = recpt1_px4
TARGET2 = recpt1ctl_px4
TARGET3 = checksignal_px4
- recpt1_px4 のビルド
[MUMIT] munakata:~/plex/offcial/Linux_Driver/MyRecpt1/My...
gcc -MM recpt1.c decoder.c mkpath.c tssplitter_lite.c re...
rm -f recpt1.o decoder.o mkpath.o tssplitter_lite.o recp...
recpt1core.o asicen_dtv.o recpt1 recpt1ctl checksignal ...
[MUMIT] munakata:~/plex/offcial/Linux_Driver/MyRecpt1/My...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for create_arib_std_b25 in -larib25... yes
checking for log10 in -lm... yes
checking for pthread_kill in -lpthread... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
[MUMIT] munakata:~/plex/offcial/Linux_Driver/MyRecpt1/My...
-- make を実行すると多数のワーニング ''warning: braces ar...
--- make の結果 ---> &ref(make_log.txt);
- ワーニングなのでコマンド自体は出来上がり、インストール...
[MUMIT] munakata:~/plex/offcial/Linux_Driver/MyRecpt1/My...
install -m 755 recpt1_px4 recpt1ctl_px4 checksignal_px4 ...
- 受信テスト
[MUMIT] munakata:$ recpt1_px4 --b25 --strip 27 30 ~/test...
[MUMIT] munakata:$ recpt1_px4 --b25 --strip BS15_0 30 ~/...
* Runtime 関係 [#bbaea76e]
** [[Mirakurun:https://github.com/Chinachu/Mirakurun]] [#...
- [[Remarks for Platform Support:https://github.com/China...
-- ''Node.js ^14.17.0 || ^16 needed''
*** node 16.x インストール [#hc10e2dc]
[MUMIT] munakata:~$ curl -sL https://deb.nodesource.com/...
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
[MUMIT] munakata:~$ sudo apt-get install -y nodejs
[MUMIT] munakata:~$ node -v
v16.19.0
*** Mirakurunのインストール [#c7d78dfd]
- Mirakurun はデバイスを触るサービスなので root でインス...
- # PM2 (Process Manager)
[MUMIT] munakata:~$ sudo npm install pm2 -g
- Mirakurun インストール
[MUMIT] munakata:~$ sudo npm install mirakurun -g --unsa...
[MUMIT] munakata:~$ sudo npm install rivarun -g
[MUMIT] munakata:~$ sudo npm install arib-b25-stream-tes...
-- &ref(launched.jpg);
*** Tuner 設定 [#b14b28f1]
- &color(red){''Tuner 設定[PT3 x2]''};(デフォルトは PT...
-- ''BS/CS = channel 0/1/4/5''
-- ''GR(地デジ) = channel 2/3/6/7''
-- &ref(tuners.yml);
[KGB2] munakata:~$ cat tuners.yml
- name: PT3-S1
types:
- BS
- CS
command: recpt1 --device /dev/pt3video0 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-S2
types:
- BS
- CS
command: recpt1 --device /dev/pt3video1 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-S3
types:
- BS
- CS
command: recpt1 --device /dev/pt3video4 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-S4
types:
- BS
- CS
command: recpt1 --device /dev/pt3video5 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-T1
types:
- GR
command: recpt1 --device /dev/pt3video2 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-T2
types:
- GR
command: recpt1 --device /dev/pt3video3 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-T4
types:
- GR
command: recpt1 --device /dev/pt3videoi6 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: PT3-T4
types:
- GR
command: recpt1 --device /dev/pt3video7 <channel> - -
decoder: arib-b25-stream-test
isDisabled: false
- name: TBS6922
types:
- SKY
command: szap-s2j -c /usr/local/etc/szap-s2j.conf -l <...
dvbDevicePath: /dev/dvb/adapter0/dvr0
decoder: arib-b1-stream-test
isDisabled: true
- &color(red){''Tuner 設定[PLEX MLT8PE]''};(デフォルト...
-- BS/CS = channel 0/1/4/5 (たぶん PLEX はどのチャンネル...
-- GR = channel 2/3/6/7
-- &ref(tuners_plex.yml);
[MUMIT] munakata:~/plex$ sudo mirakurun config tuners
- name: PXMLT8-S1
types:
- BS
- CS
command: recpt1_px4 --device /dev/pxmlt8video0 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-S2
types:
- BS
- CS
command: recpt1_px4 --device /dev/pxmlt8video1 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT8-S3
types:
- BS
- CS
command: recpt1_px4 --device /dev/pxmlt8video4 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-S4
types:
- BS
- CS
command: recpt1_px4 --device /dev/pxmlt8video5 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-T1
types:
- GR
command: recpt1_px4 --device /dev/pxmlt8video2 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-T2
types:
- GR
command: recpt1_px4 --device /dev/pxmlt8video3 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-T3
types:
- GR
command: recpt1_px4 --device /dev/pxmlt8video6 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: PXMLT-T4
types:
- GR
command: recpt1_px4 --device /dev/pxmlt8video7 <channe...
decoder: arib-b25-stream-test
isDisabled: false
- name: TBS6922
types:
- SKY
command: szap-s2j -c /usr/local/etc/szap-s2j.conf -l <...
dvbDevicePath: /dev/dvb/adapter0/dvr0
decoder: arib-b1-stream-test
isDisabled: false
*** チャンネル設定 [#w032d3a0]
- Mirakurun 3.9-rc2 では GR/BS ともに自動登録できるようだ...
-- &ref(channels.yml);
*** mirakurun-server の再始動 [#kd50a43c]
[MUMIT] munakata:~/plex$ sudo pm2 stop mirakurun-server
[MUMIT] munakata:~/plex$ sudo pm2 start mirakurun-server
- log rotation の設定
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 install pm2-...
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 list
- &ref(all_active.jpg);
-- log_rotation 設定ファイル ( etc/logrotate.d/mirakurun )
/usr/local/var/log/mirakurun.stdout.log
/usr/local/var/log/mirakurun.stderr.log
/{
daily
compress
rotate 7
missingok
notifempty
}
- channel の設定
-- コマンド
[KGB2] munakata:~$ sudo mirakurun config channels
-- ファイルの場所
[KGB2] munakata:~$ ls -l /usr/local/etc/mirakurun/channe...
-rw-r--r-- 1 root root 2394 3月 14 06:11 /usr/local/etc...
-- %%''&color(red){TVK (GR 17) が取得できない、テレビでは...
** [[EPGStation:https://github.com/l3tnun/EPGStation]] [#...
- [[Linux / macOS 用セットアップマニュアル:https://github...
- インストール要件の確認
[MUMIT] munakata:~$ node --version
v16.19.0
[MUMIT] munakata:~$ curl -o - http://localhost:40772/api...
{"current":"3.9.0-rc.2","latest":"3.9.0-rc.2"}
[MUMIT] munakata:~$ python --version
Python 2.7.18
[MUMIT] munakata:~$ gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
[MUMIT] munakata:~$ ffmpeg -version
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000...
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22...
--enable-librsvg --enable-libmfx --enable-libdc1394 --en...
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[MUMIT] munakata:$ cd git
[MUMIT] munakata:/git$ git clone https://github.com/l3tn...
[MUMIT] munakata:~/git$ cd EPGStation/
[MUMIT] munakata:~/git/EPGStation$ npm run all-install
[MUMIT] munakata:~/git/EPGStation$ npm run build
- snap は /home 以外の名前のディレクトリで実行するとエラ...
- [[詳細設定:https://github.com/l3tnun/EPGStation/blob/ma...
//- 起動時に EPGSTATION が起動していない場合には
// $ pm2 start dist/index.js --name "epgstation"
- 設定ファイルの作成
$ cp config/config.yml.template config/config.yml
$ cp config/operatorLogConfig.sample.yml config/operator...
$ cp config/epgUpdaterLogConfig.sample.yml config/epgUpd...
$ cp config/serviceLogConfig.sample.yml config/serviceLo...
$ cp config/enc.js.template config/enc.js
-- FFmpeg/FFprobe についてデフォルトでは ''/usr/local/bin...
-- Ubuntu では ''/usr/bin'' に ffmpeg/ffprobe があるので...
- 起動時に EPGSTATION が自動起動しない理由を解析した結果...
$ sudo pm2 start dist/index.js --name "epgstation"
$ sudo pm2 save
* 運用 [#l713f224]
** node program manager (pm2) [#qaf17b54]
** 管理画面(Web インターフェース) [#ff090014]
|サービス|機能|アドレス|確認ポイント|h
|mirakurun|録画チューナーサーバー|https://<インストール対...
|~|~|~|チューナー登録状況|
|epgstation|ユーザーインターフェース|http://<インストール...
|~|~|~|予約録画出来るか|
|~|~|~|チューナー数分録画出来るか|
|~|~|~|キーワード予約録画出来るか|
** アップデート [#pbb9575b]
*** EPGStatrion のアップデート [#w96739e4]
- EPGStatrion は github 上で開発されており、git pull でコ...
- バージョンアップ実施時には Mirakurun を一時停止し、アッ...
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 stop epgatat...
-&ref(EPG_update_stop.png);
[MUMIT] munakata:~/git/EPGStation$ git pull
-&ref(EPG_update_git.png);
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 start epgsta...
-&ref(EPG_update_start.png);
*** mirakurun のアップデート [#k67cc9e9]
- npm コマンドを使ってパッケージを更新する
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 start miraku...
[MUMIT] munakata:~/git/EPGStation$ sudo npm install mira...
-&ref(mrakurun_update_npm.png);
[MUMIT] munakata:~/git/EPGStation$ sudo pm2 start miraku...
*** node js パッケージのインストール [#hc850956]
- ncu コマンド(更新確認)
[KGB2] munakata:~/git/EPGStation$ ncu
Checking /raid_vol/home/munakata/git/EPGStation/package....
[====================] 47/47 100%
@types/lodash 4.17.0 → 4.17.5
@types/multer 1.4.9 → 1.4.11
@types/node 18.11.9 → 20.14.2
@typescript-eslint/eslint-plugin 7.8.0 → 7.13.0
@typescript-eslint/parser 7.8.0 → 7.13.0
axios 1.6.8 → 1.7.2
eslint 8.57.0 → 9.5.0
eslint-config-prettier 8.10.0 → 9.1.0
file-type 16.5.4 → 19.0.0
prettier 3.2.5 → 3.3.2
swagger-ui-dist 5.17.2 → 5.17.14
url-join 4.0.1 → 5.0.0
Run ncu -u to upgrade package.json
- ncu -u (アップデート)
[KGB2] munakata:~/git/EPGStation$ ncu -u
Upgrading /raid_vol/home/munakata/git/EPGStation/package...
[====================] 47/47 100%
@types/lodash 4.17.0 → 4.17.5
@types/multer 1.4.9 → 1.4.11
@types/node 18.11.9 → 20.14.2
@typescript-eslint/eslint-plugin 7.8.0 → 7.13.0
@typescript-eslint/parser 7.8.0 → 7.13.0
axios 1.6.8 → 1.7.2
eslint 8.57.0 → 9.5.0
eslint-config-prettier 8.10.0 → 9.1.0
file-type 16.5.4 → 19.0.0
prettier 3.2.5 → 3.3.2
swagger-ui-dist 5.17.2 → 5.17.14
url-join 4.0.1 → 5.0.0
Run npm install to install new versions.
- npm install (更新版のインストール)
[KGB2] munakata:~/git/EPGStation$ npm install
npm notice
npm notice New major version of npm available! 8.19.4 ->...
npm notice Changelog: https://github.com/npm/cli/release...
npm notice Run npm install -g npm@10.8.1 to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: epgstation@2.9.1
npm ERR! Found: eslint@9.5.0
npm ERR! node_modules/eslint
npm ERR! dev eslint@"9.5.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^8.56.0" from @typescript-eslint/p...
npm ERR! node_modules/@typescript-eslint/parser
npm ERR! dev @typescript-eslint/parser@"7.13.0" from t...
npm ERR! peer @typescript-eslint/parser@"^7.0.0" from ...
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR! dev @typescript-eslint/eslint-plugin@"7.13....
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken)...
npm ERR!
npm ERR! See /raid_vol/home/munakata/.npm/eresolve-repor...
npm ERR! A complete log of this run can be found in:
npm ERR! /raid_vol/home/munakata/.npm/_logs/2024-06-...
- 上記エラーは n を使って node を最新の LTS バージョンに...
[KGB2] munakata:~/git/EPGStation$ sudo npm install n -g
[KGB2] munakata:~/git/EPGStation$ sudo n lts
[KGB2] munakata:~/git/EPGStation$ node -v
v20.14.0
* 障害解析 [#s9471eb6]
*** 録画に失敗する問題 ⇒ Mirakurun とのソケット通信に失敗...
- EPGStation/logs/Service$ sudo ''vi stream.log''
[2024-06-16T06:11:25.984] [INFO] stream - start stream: 0
[2024-06-16T06:11:25.984] [INFO] stream - get mirakurun ...
[2024-06-16T06:11:40.987] [ERROR] stream - start stream ...
[2024-06-16T06:11:40.987] [ERROR] stream - Error: socket...
at connResetException (node:internal/errors:705:14)
at Socket.socketOnEnd (node:_http_client:518:23)
at Socket.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:135...
at processTicksAndRejections (node:internal/process/...
code: 'ECONNRESET'
}
[2024-06-16T06:11:40.988] [INFO] stream - stop stream 0
* 参考 URL [#qefc32f9]
- [[PLEX社製TVチューナーの非公式Linuxドライバインストール...
- [[Mirakurunのインストール手順(Ubuntu・Debian・CentOS)...
- [[Ubuntu22.04とPLEX社製チューナーで構築するMirakurun最...
- [[EPGStation-PLEX tuner-Ubuntu 22.04-自宅録画サーバー:h...
- [[PX-W3PE4チューナー+非公式版ドライバー (20.04 ベース)...
- [[LinuxでPX-W3U4を使う(2019年1月版) (18.04 ベース):http...
- [[WinUSB版px4_drvの使い方:https://enctools.com/px4-drv-...
- [[【完全解説】LinuxとPX-W3U4でEPGStation v2を構築する方...
- [[Mirakurunを手動でチャンネル設定:https://qiita.com/yur...
- [[地上波(GR)のチャンネルスキャンを追加:https://horaku...
- [[チャンネルスキャンの実行方法。(MirakurunxEPGStation):...
ページ名: