LoginSignup
47
52

More than 5 years have passed since last update.

Chinachu + Mirakurun + TVTest によるリアルタイム視聴&録画機能

Last updated at Posted at 2016-05-29

Bloggerで書いていたが、HTMLで書くのが面倒となったので、Qiitaに引っ越ししました。

[NEW] dockerを使ってみました

Chinachu + Mirakurun をdockerに閉じ込めた話
こちらでChinachu + Mirakurunを動かして、TVTestにBonDriverを入れるのが現時点で自身のベスト環境になってます。

3行纏め

構築環境

Chinachu + Mirakurun.png

root@tvsv:~# uname -a
Linux tvsv 3.10.0-327.4.4.el7.x86_64 #1 SMP Tue Jan 5 16:07:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root@tvsv:~# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
root@tvsv:~#

必要構成

Mirakurun

sudo mirakurun config server

  • ポイントはportを設定し、外部からHTTPアクセスできるようにしておく事
  • firewalld(iptables)も開けておきましょう
path: /var/run/mirakurun.sock

port: 40772
host: ~

logLevel: 2

sudo mirakurun config tuners

  • ここは環境に応じて増減してください
- name: PT3-S0
  types:
    - BS
    - CS
  command: recpt1 --device /dev/pt3video0 <channel> - -
  decoder: arib-b25-stream-test
  isDisabled: false

- name: PT3-S1
  types:
    - BS
    - CS
  command: recpt1 --device /dev/pt3video1 <channel> - -
  decoder: arib-b25-stream-test
  isDisabled: false

- name: PT3-T0
  types:
    - GR
  command: recpt1 --device /dev/pt3video2 <channel> - -
  decoder: arib-b25-stream-test
  isDisabled: false

- name: PT3-T1
  types:
    - GR
  command: recpt1 --device /dev/pt3video3 <channel> - -
  decoder: arib-b25-stream-test
  isDisabled: false

sudo mirakurun config channels

  • CSはトランスポンダ(放送波送信機)単位の設定で十分なので、1個だけserviceIdを記載しておく
- name: THK
  type: GR
  channel: '21'

- name: NHK E
  type: GR
  channel: '13'

- name: NHK G
  type: GR
  channel: '20'

- name: CTV
  type: GR
  channel: '19'

- name: CBC
  type: GR
  channel: '18'

- name: NBN
  type: GR
  channel: '22'

- name: TVA
  type: GR
  channel: '23'

- name: MTV
  type: GR
  channel: '27'

- name: BS Asahi
  type: BS
  channel: 'BS1_0'
  serviceId: 151
  isDisabled: false

- name: ND6
  type: CS
  channel: CS6
  serviceId: 323
  isDisabled: false

- name: ND12
  type: CS
  channel: CS12
  serviceId: 325
  isDisabled: false

- name: ND16
  type: CS
  channel: CS16
  serviceId: 333
  isDisabled: false

- name: ND20
  type: CS
  channel: CS20
  serviceId: 307
  isDisabled: false

Chinachu γ

  • Chinachu γ よりRivarun がなくとも録画が可能となりました
  • またチューナーおよびチャンネル設定も不要となり、設定が大幅に簡素化されました
{
  "recordedDir" : "./recorded/",
  "temporaryDir": "/tmp/",

  "wuiUsers": [
    "akari:bakuhatsu"
  ],
  "wuiAllowCountries": [],

  "wuiPort"        : 10772,
  "wuiHost"        : "::",
  "wuiTlsKeyPath"  : null,
  "wuiTlsCertPath" : null,
  "wuiOpenServer"  : false,
  "wuiOpenPort"    : 20772,
  "wuiXFF"         : false,
  "wuiPreviewer"   : true,
  "wuiStreamer"    : true,
  "wuiFiler"       : true,
  "wuiConfigurator": true,


  "mirakurunPath": "http://unix:/var/run/mirakurun.sock:/",

  "storageLowSpaceAction": "remove"
}

TVTest

  • BonDriver_Mirakurun をビルドして BonDriver_Mirakurun.dll を作成してください
  • 同じ階層に同じ名前のINIファイルを設置し、Mirakurunのホスト/ポート情報を書き込んでください
    BonDriver_Mirakurun v1.0よりMirakurunから自動でチャンネル情報を取得するようになり、チャンネル設定が不要になりンした
  • 起動後TVTestのチャンネルスキャンを実行しましょう(特にCSは必須)
[GLOBAL]
SERVER_HOST="tvsv.hogehoge.moe"
SERVER_PORT=40772

; B25(1=enable)
DECODE_B25=1

; Priority(0=Low Priority)
PRIORITY=0

まとめ

MirakurunとTVTestのおかげで簡易に録画システムとリアルタイム視聴環境ができました
Chinachuもまだまだ改良が進むと思うので、さらに快適な環境が期待できます
BonDriver_Mirakurunは本当はMirakurun APIからチャンネル情報を取得してINIファイルにチ~ャンネル設定を書き込む必要をなくしたいのですが、スキル無くて諦めかけてます

v1.0からチャンネル設定が不要になっているため、削除しました

47
52
4

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
47
52