ナマケモノの家

ナマケモノ

はじめに

ここでは、raspirec のオプション機能で、Ver1.2.0 から導入された raspirecTV について説明します。

raspirecTV とは

raspirecTV とは、独立した GUIで、指定した放送局を recpt1/recdvb を使ってチューニングし、mpv と連携させ番組を視聴するするものです。
特徴として、チューナーが接続されたヘッドレスの SBC 上で実行し、 デスクトップ側で mpv を実行し表示する事が出来ます。
なお、プログラムは独立ですが DB は raspirec のものを参照するので、 raspirec が、正常に稼働している必要があります。

main画面 と mpv画面

実行に必要な環境

実行に必要なパッケージのインストール

% sudo apt install ruby-gtk2    # raspirec 側
% sudo apt install mpv          # mpv を実行する側
% sudo apt install socat        # mpv を実行する側

設定

通常の場合の config.rb の記述例

MPMonitor       = true          # mpv モニタ機能を有効に
#
DevAutoDetection =  true        # 自動検出するか ( true = する )
DeviceList_GR   = []            # 地デジ チューナー デバイスファイル 
DeviceList_BSCS = []            # BS/CS                  〃
DeviceList_GBC  = []            # 三波共用(地デジ/BS/CS) 〃
#
Mpv_cmd     = "/usr/bin/mpv"
Mpv_opt     = %W( --deinterlace=yes --autofit=640x360 --quiet )
#
RemoteMonitor   = false         # チューナーと表示が別マシンの場合に ture
UDPbasePort     = 12345         # UDP port 
Lsof_cmd        = "/usr/bin/lsof"
#
#   raspirecTV 
#
Browser_cmd     = "/usr/bin/firefox"
RaspirecTV_font = "Sans 10"
RaspirecTV_GEO  = "50+50"

リモート(表示と、チューナーが別のマシン)の場合の設定

MPMonitor       = true          # mpv モニタ機能を有効に
#
DevAutoDetection =  true        # 自動検出するか ( true = する )
DeviceList_GR   = []            # 地デジ チューナー デバイスファイル 
DeviceList_BSCS = []            # BS/CS                  〃
DeviceList_GBC  = []            # 三波共用(地デジ/BS/CS) 〃
#
Mpv_cmd     = "/usr/bin/mpv"
Mpv_opt     = %W( --deinterlace=yes --autofit=640x360 --quiet )
#
RemoteMonitor   = true          # チューナーと表示が別マシンの場合に ture
UDPbasePort     = 12345         # UDP port 
Lsof_cmd        = "/usr/bin/lsof"
#
#   raspirecTV 
#
Browser_cmd     = "/usr/bin/firefox"
RaspirecTV_font = "Sans 10"
RaspirecTV_GEO  = "50+50"
#
XServerName     = "desktop"           # mpv を実行するマシン名
RecHostName     = "raspi"             # raspirec,recpt1 を実行するマシン名
RaspirecTV_SOCAT = "/usr/bin/socat"   # RemoteMonitor == true の時のみ

実行方法

raspirec をインストールしたディレクトリに PATH を通したあと

% raspirecTV.rb

Memo

フォントの指定方法

リンク