Ubuntu †
epgrecのgetepg.phpがSegmentation faultして番組表が更新されない †
sudo -u www-data /var/www/epgrec/getepg.php
...
Segmentation fault (core dumped)
recpt1 †
recpt1
--sid
all
,hd
,sd1
,sd2
,sd3
,1seg
epgrecのテーブル †
リモコン番号を表示 †
- リモコン番号を表示したい場合、Recorder_channelTbl.nameを書き換えれば良い。しかし、1日毎に番組表が更新される時、チャンネル名も更新されるので戻ってしまう
mysql> set names utf8;
mysql> select channel,name from Recorder_channelTbl order by id;
+---------+-----------------------------+
| channel | name |
+---------+-----------------------------+
| 27 | NHK総合1・東京 |
| 26 | NHKEテレ1東京 |
| 25 | 日テレ1 |
| 22 | TBS1 |
| 21 | フジテレビ |
| 24 | テレビ朝日 |
| 23 | テレビ東京1 |
| 20 | TOKYO MX1 |
+---------+-----------------------------+
epgrecのアップグレード †
※まだ途中
- 事前にバックアップ
- 最新ソースを取得
sudo apt-get install git
cd /tmp
git clone git://git.sourceforge.jp/gitroot/epgrec/epgrec.git
epgrecのバックアップ †
定期的、バージョンアップ前はやったほうが良い
epgrec「録画ファイルも削除する」にデフォルトでチェック †
tsファイルの分離tssplitter_lite †
- PT2で録画したMPEG2-TSファイルには、ワンセグやその他の情報が多重化して入っているため、サイズが大きい。
- 分離することで、15分のニュース番組で300MB程小さくなる事を確認
- ffmpegで分離対象のProgram IDを検出
ffmpeg -i test.ts
- epgrec
vi /var/www/epgrec/config.php
----
$RECORD_MODE = array(
// ※ 0は必須で、変更不可です。
0 => array(
'name' => 'Full TS', // モードの表示名
'suffix' => '.ts', // ファイル名のサフィックス
),
1 => array(
'name' => 'HD split',
'suffix' => '_hd.ts',
),
2 => array(
'name' => 'Smartphone',
'suffix' => '.ts',
),
3 => array(
'name' => 'Auto Encode Test',
'suffix' => '.ts',
),
4 => array(
'name' => 'TS split',
'suffix' => '.ts',
),
);
----
録画tsファイルを自動エンコード †
- epgrecの設定変更 環境設定 > システム設定へ > ffmpegのパス
- /usr/local/bin/ffmpeg
- epgrecのconfig.phpにスマートフォンと、自動エンコード用設定を追加
cd /var/www/epgrec/
vim config.php
----
$RECORD_MODE = array(
// ※ 0は必須で、変更不可です。
0 => array(
'name' => 'Full TS', // モードの表示名
'suffix' => '.ts', // ファイル名のサフィックス
),
1 => array(
'name' => 'HD split',
'suffix' => '_hd.ts',
),
2 => array(
'name' => 'Smartphone',
'suffix' => '.ts',
),
3 => array(
'name' => 'Auto Encode Test',
'suffix' => '.ts',
),
);
----
epgrec「Error未実行の予約です」を強制削除 †
- 2010年3月22日版 + パッチ1 + パッチ2
- 録画済一覧 > 録画済みファイルを削除で「Error未実行の予約です」とダイアログが出て消せない場合に強制的に削除する
- 削除したいタイトル等のURLを見て「http://192.168.1.x/epgrec/viewer.php?reserve_id=id」のid部分をメモ
- 以下コマンドを実行
/var/www/epgrec/recomplete.php id
XBMCのインストール †
Memo/XBMC/Ubuntu
sambaでtsファイル共有 †
- samba設定
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
sudo su -c "cat > /etc/samba/smb.conf << 'EOS'
[global]
smb ports = 139
debug level = 0
dos charset = CP932
unix charset = UTF-8
display charset = UTF-8
server string = MediaCenter
passdb backend = tdbsam
obey pam restrictions = yes
load printers = No
disable spoolss = Yes
ldap ssl = no
hosts allow = 192.168.1., 127.
printing = bsd
cups options = raw
print command = lpr -r -P'%p' %s
lpq command = lpq -P'%p'
lprm command = lprm -P'%p' %j
map archive = no
create mask = 0664
force create mode = 0600
directory mask = 0775
force directory mode = 0700
workgroup = WORKGROUP
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[homes]
comment = Home Directories
path = %H
read only = No
browseable = No
vfs objects = recycle
recycle:repository = .recycle
recycle:keeptree = no
recycle:versions = yes
recycle:touch = no
recycle:maxsize = 0
recycle:exclude = *.tmp ~$*
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
guest ok = no
read only = yes
create mask = 0700
[pt2]
comment = pt2
path = /var/www/epgrec/video
read only = No
guest ok = no
vfs objects = recycle
recycle:repository = .recycle
recycle:keeptree = no
recycle:versions = yes
recycle:touch = no
recycle:maxsize = 0
recycle:exclude = *.tmp ~$*
EOS"
sudo service smbd restart
sudo sysv-rc-conf smbd on
mediatombでDLNAクライアントと連携 †

- PS3/REGZA Z1等のDLNAクライアントから閲覧できるようにする。トランスコード機能があるので画面の小さいAndroid/iPhone等でも閲覧できる
- 記事
- mediatomb 0.12.1 管理画面の対応状況
- △IE8(アラートが表示できるが使える)
- ○Firefox 3.6
- ○Google Chrome 15
- ×Opera 11.52 ファイル一覧が表示されない
- 設定ファイルコピー。添付zipを展開してコピーする
- http://192.168.1.x:49152/ にブラウザでアクセス
- [Filesystem]タブをクリック
- /Filesystem/var/www/epgrec/video/ までクリックし、"add as autoscan dir"アイコンをクリック。コンテンツが追加されるたびに「Database」タブに追加されるようになる
- Scan Mode: Inotify
- Initial Scan: Basic
- Recursive: チェック
- [Database]タブをクリックし、/Database/Video/Directories/video/ まで移動して動画が追加されているか確認
EPG対応録画フロントエンド epgrecのインストール †

- epgrec
- リポジトリ
- インターネットにそのまま公開しないように。スキャンが頻繁にあり、古いバージョンではファイルが流出する場合があります。
- ipアドレスの確認。:192.168.1.xをメモ
ifconfig
- epgrecのインストール。チャンネル番号は 地上デジタル放送 チャンネル一覧表 - マスプロ電工|MASPRO 参照
cd /var/www/epgrec/
cp config.php.sample config.php
cp --archive do-record.sh.pt1 do-record.sh
sudo vi config.php
----
$GR_CHANNEL_MAP = array(
"GR27" => "27", // NHK 総合
"GR26" => "26", // NHK Eテレ
"GR25" => "25", // 日本テレビ
"GR24" => "24", // テレビ朝日
"GR22" => "22", // TBS
"GR23" => "23", // テレビ東京
"GR21" => "21", // フジテレビ
"GR20" => "20", // 東京MX
// "GR18" => "18", // テレ神
// "GR30" => "30", // 千葉
// "GR32" => "32", // テレ玉
// "GR28" => "28", // 大学
);
----
cd /var/www/epgrec/
cat > .htaccess << 'EOS'
Options Indexes
EOS
PT2インストール †
- ハードウェア構成
- ケース SA76G2 V2
- 電源 250W (ベアボーン付属)
- マザーボード Shuttle SA76(ベアボーン付属)
- CPU AMD Phenom II X4 905e 65W
- MEMORY 4.0GB DDR2-800
- HDD1 HGST HDS721010CLA332(1TB SATA/300)
- HDD2 WESTERN DIGITAL WD20EARS (2TB SATA300)
- DVD Sony Optiarc AD-7260S-0B/BK(SATA)
- PCI1 PT2 Rev.A
- T=Terrestrial=地上波
- S=Satellite=衛星波(BS/CS)
- B-CASカードリーダー
- B-CASカード
- PC内部にB-CASカードリーダーを内蔵する場合に。マザーボードのUSBピンヘッダ -> USBポート変換
- 上海問屋で昔購入した「FAPU2」余っていたので使用。左右のネジ固定部がPT2と干渉したので若干カット
- ソフトウェア構成
- Ubuntu Server 10.10 64bit
- デバイスができているか確認
ls -l /dev/pt1*
crw-rw-rw- 1 root video 250, 0 2011-02-27 17:44 /dev/pt1video0
crw-rw-rw- 1 root video 250, 1 2011-02-27 17:44 /dev/pt1video1
crw-rw-rw- 1 root video 250, 2 2011-02-27 17:44 /dev/pt1video2
crw-rw-rw- 1 root video 250, 3 2011-02-27 17:44 /dev/pt1video3
- bcasカードリーダー確認
pcsc_scan
PC/SC device scanner
V 1.4.16 (c) 2001-2009, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.5.3
Scanning present readers...
0: SCM SCR 3310 NTTCom 00 00
... 中略
Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B F0 12 00 FF 91 81 B1 7C 45 1F 03 99
B-CAS
... CTRL+Cで中断
Ubuntuのインストール †
Memo/Ubuntu#ld3a2ef5
|
|