IOデータのTVチューナー&ビデオキャプチャボードGV-BCTV4/PCIを使用して、DebianでHDレコーダーを作った時のまとめ
テレビキャプチャボードのモジュールを読み込み
vi /etc/modutils/bttv
alias char-major-81 bttv
pre-install bttv modprobe -k tuner
options bttv card=81
options tuner type=2
update-modules
Xawtvのインストール
apt-get install xawtv
xawtv & //起動して初期設定する
再設定する場合は、
dpkg-reconfigure xawtv
シンボリックリンクの作成
ln -s /dev/vbi0 /dev/video
ln -s /dev/vbi0 /dev/video0
ハードウェアの確認
Xawtv -hwscan
This is xawtv-3.95.dfsg.1, running on Linux/i686 (2.6.18-6-686)
looking for available devices
/dev/video0: OK [ -device /dev/video0 ]
type : v4l2
name : BT848A video ( *** UNKNOWN/GENE
flags: overlay capture tuner
/dev/video1: OK [ -device /dev/video1 ]
type : v4l2
name : BT878 video (IODATA GV-BCTV5/PC
flags: overlay capture tuner
デバイスを指定して実行
xawtv -c /dev/video1
(この実行方法で2枚差しもできますね。)
Xawtvの設定ファイルの作成
vi ./xawtv
[global] freqtab = japan-bcast <--日本の放送を指定 fullscreen = 640 x 480 <--フルスクリーン時のサイズ mixer = cd <--ミキサによるボリュームコントロール [launch] XMixer = Ctrl+A, gmix <--CTL+AでGNOMEミキサを起動 [defaults] source = television <--日本の放送を指定 norm = ntsc <--放送形式NTSCを指定 # チャンネルの設定。 [NHK] channel = 1 key = F1 [NHK教育] channel = 3 key = F2 [NTV 日本テレビ] channel = 4 key = F3 [TBS] channel = 6 key = F4 [CX フジテレビ] channel = 8 key = F5 [ABC 朝日放送] channel = 10 key = F6 [TX テレビ東京] channel = 12 key = F7 [VIDEO] source = Composite1 key = F8 [SVHS] source = SVideo key = F9
FFMpegのインストール
apt-get install ffmpeg moc-ffmpeg-plugin libpostproc0d libpostproc-dev libavifile-0.7c2 libavformat0d libavformat-dev libavcodec0d libavcodec-dev gstreamer0.8-misc gstreamer0.10-ffmpeg ffmpeg2theora avifile-mjpeg-plugin
FFMpeg,Xawtvを利用して録画
// アドマチック天国
59 20 * * 6 v4lctl -c /dev/video1 setchannel 12
00 21 * * 6 ffmpeg -y -vd /dev/video1 -t 3300 -s 640×480 -r 30 -b 2000 -ab 224 -ac 2 -f avi -vcodec mpeg4 adomache.avi
// エンタの神様
59 21 * * 6 v4lctl -c /dev/video1 setchannel 4
00 22 * * 6 ffmpeg -y -vd /dev/video1 -t 3480 -s 640×480 -r 30 -b 2000 -ab 224 -ac 2 -f avi -vcodec mpeg4 enta.avi
// レッドカーペット
59 21 * * 6 v4lctl -c /dev/video1 setchannel 8
00 22 * * 6 ffmpeg -y -vd /dev/video1 -t 3300 -s 640×480 -r 30 -b 2000 -ab 224 -ac 2 -f avi -vcodec mpeg4 redcarpet.avi
Cronとかで予約しておく。
そのうちハードウェアエンコードできるボードで作りたい。
いまはMythTVでやった方が楽かもw
(0)
(0)
(0)
(0)
Total: 0

