<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BW-LOG &#187; Linux</title>
	<atom:link href="http://blog.bit-works.net/archives/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.bit-works.net</link>
	<description>(株)BitWorksのブログです.</description>
	<lastBuildDate>Fri, 16 Apr 2010 02:18:52 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>XawtvとFFMpegでハードディスクレコーダーを作る時のまとめ</title>
		<link>http://blog.bit-works.net/archives/146</link>
		<comments>http://blog.bit-works.net/archives/146#comments</comments>
		<pubDate>Tue, 11 Aug 2009 14:13:26 +0000</pubDate>
		<dc:creator>tuti</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.bit-works.net/?p=146</guid>
		<description><![CDATA[IOデータのTVチューナー&#38;ビデオキャプチャボードGV-BCTV4/PCIを使用して、DebianでHDレコーダーを作った時のまとめ
テレビキャプチャボードのモジュールを読み込み
vi /etc/modutils [...]]]></description>
			<content:encoded><![CDATA[<p>IOデータのTVチューナー&amp;ビデオキャプチャボード<a href="http://www.iodata.co.jp/feature/video/gvbctv4/index.htm">GV-BCTV4/PCI</a>を使用して、DebianでHDレコーダーを作った時のまとめ</p>
<p><strong>テレビキャプチャボードのモジュールを読み込み</strong></p>
<p>vi /etc/modutils/bttv</p>
<p>alias char-major-81 bttv<br />
pre-install bttv modprobe -k tuner<br />
options bttv card=81<br />
options tuner type=2</p>
<p>update-modules</p>
<p><strong>Xawtvのインストール<span id="more-146"></span></strong><br />
apt-get install xawtv<br />
xawtv &amp; //起動して初期設定する</p>
<p>再設定する場合は、<br />
dpkg-reconfigure xawtv</p>
<p><strong>シンボリックリンクの作成</strong><br />
ln -s /dev/vbi0 /dev/video<br />
ln -s /dev/vbi0 /dev/video0</p>
<p><strong>ハードウェアの確認</strong><br />
Xawtv -hwscan<br />
This is xawtv-3.95.dfsg.1, running on Linux/i686  (2.6.18-6-686)<br />
looking for available devices<br />
/dev/video0: OK                         [ -device  /dev/video0 ]<br />
type : v4l2<br />
name : BT848A video ( *** UNKNOWN/GENE<br />
flags: overlay capture tuner</p>
<p>/dev/video1: OK                         [ -device  /dev/video1 ]<br />
type : v4l2<br />
name : BT878 video (IODATA GV-BCTV5/PC<br />
flags: overlay capture tuner</p>
<p><strong>デバイスを指定して実行</strong><br />
xawtv -c /dev/video1<br />
（この実行方法で２枚差しもできますね。）<br />
<strong><br />
Xawtvの設定ファイルの作成</strong><br />
vi ./xawtv</p>
<pre class="brush: plain;">
[global]
freqtab = japan-bcast   &lt;--日本の放送を指定
fullscreen = 640 x 480  &lt;--フルスクリーン時のサイズ
mixer = cd              &lt;--ミキサによるボリュームコントロール
[launch]
XMixer = Ctrl+A, gmix   &lt;--CTL+AでGNOMEミキサを起動
[defaults]
source  = television    &lt;--日本の放送を指定
norm    = ntsc          &lt;--放送形式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
</pre>
<p><strong>FFMpegのインストール</strong><br />
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</p>
<p><strong>FFMpeg,Xawtvを利用して録画</strong></p>
<p>// アドマチック天国<br />
59 20 * * 6 v4lctl -c /dev/video1 setchannel 12<br />
00 21 * * 6 ffmpeg -y -vd /dev/video1 -t 3300 -s 640&#215;480 -r 30 -b 2000 -ab 224 -ac 2 -f  avi -vcodec mpeg4 adomache.avi</p>
<p>// エンタの神様<br />
59 21 * * 6 v4lctl -c /dev/video1 setchannel 4<br />
00 22 * * 6 ffmpeg -y -vd /dev/video1 -t 3480 -s 640&#215;480 -r 30 -b 2000 -ab 224 -ac 2 -f  avi -vcodec mpeg4 enta.avi</p>
<p>// レッドカーペット<br />
59 21 * * 6 v4lctl -c /dev/video1 setchannel 8<br />
00 22 * * 6 ffmpeg -y -vd /dev/video1 -t 3300 -s 640&#215;480 -r 30 -b 2000 -ab 224 -ac 2 -f  avi -vcodec mpeg4 redcarpet.avi</p>
<p>Cronとかで予約しておく。</p>
<p>そのうちハードウェアエンコードできるボードで作りたい。</p>
<p>いまは<a title="MythTV" href="http://www.mythtv.org/" target="_blank"><strong>MythTV</strong></a>でやった方が楽かもw</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bit-works.net/archives/146/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu8.04 on Thinkpadでパームレストの発熱</title>
		<link>http://blog.bit-works.net/archives/125</link>
		<comments>http://blog.bit-works.net/archives/125#comments</comments>
		<pubDate>Wed, 22 Jul 2009 07:31:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.bit-works.net/?p=125</guid>
		<description><![CDATA[メインPCのThinkpadX61にubuntu8.04を入れて使用しています。
1月からの試みでありましたが業務使用で不便なところはありませんでした。
Vistaよりかはるかに使いやすいです。
Anthyが賢く無いみた [...]]]></description>
			<content:encoded><![CDATA[<p>メインPCのThinkpadX61にubuntu8.04を入れて使用しています。</p>
<p>1月からの試みでありましたが業務使用で不便なところはありませんでした。<br />
Vistaよりかはるかに使いやすいです。</p>
<p>Anthyが賢く無いみたいで日本語変換が少し不便さもあります。<br />
<a href="http://www.justsystems.com/jp/products/atok_linux/" target="_blank">Atok for Linux</a>がほしくなりました。</p>
<p>もう一点不満をいえば、発熱が激しいです。<br />
これはThinkpad X61との相性のようです。X31では発熱はあまり感じません。</p>
<p><a href="https://forums.ubuntulinux.jp/viewtopic.php?pid=15680" target="_blank">こちら</a>と<a href="http://www.ai.cs.scitec.kobe-u.ac.jp/~kitamura/index.php?UNIX%A5%E1%A5%E2%2FUbuntu%A1%A6ThinkPad#x0929fb2" target="_blank">こちら</a>を参考にFanコントロール、無線LANの省電力設定を施しました。</p>
<p>// 無線LANに省電力設定<br />
sudo echo 5 > /sys/bus/pci/drivers/iwl4965/*/power_level</p>
<p>// Fan Controll<br />
sudo vi /etc/modprobe.d/options<br />
 options thinkpad_acpi fan_control=1 //追記</p>
<p>echo level 7 > /proc/acpi/ibm/fan</p>
<p>結果、多少発熱が低くなった気がします。。</p>
<p>アルミボディのMacBookProに惹かれています。</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2395691642029212";
/* 728x15, 作成済み 09/06/30 */
google_ad_slot = "5513976068";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bit-works.net/archives/125/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk (PBX)</title>
		<link>http://blog.bit-works.net/archives/62</link>
		<comments>http://blog.bit-works.net/archives/62#comments</comments>
		<pubDate>Thu, 25 Jun 2009 07:13:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[まとめ]]></category>

		<guid isPermaLink="false">http://blog.bit-works.net/?p=62</guid>
		<description><![CDATA[AsteriskとはオープンソースのIP-PBXのソフトウェアです。
色々とAsteriskを研究中です。
ボイスメールとかモーニングコールのサービスとして使えるか検証中です。
防備録としてまとめておきます。
環境
Ce [...]]]></description>
			<content:encoded><![CDATA[<p>AsteriskとはオープンソースのIP-PBXのソフトウェアです。</p>
<p>色々とAsteriskを研究中です。</p>
<p>ボイスメールとかモーニングコールのサービスとして使えるか検証中です。</p>
<p>防備録としてまとめておきます。</p>
<p><strong>環境</strong><br />
CentOS5.2<br />
Asterisk1.4系（1.6の方がいいのかな？）</p>
<p><strong>インストール</strong></p>
<p>・必要パッケージのインストール<br />
yum install gcc-c++ kernel-devel ncurses-devel openssl-devel kernel-devel</p>
<p>・DAHDIのコンパイルとインストール<br />
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux-2.2.0.tar.gz<br />
tar zxvf dahdi-linux-2.2.0.tar.gz<br />
cd dahdi-linux-2.2.0<br />
make<br />
make install<br />
###################################################<br />
###<br />
### DAHDI installed successfully.<br />
### If you have not done so before, install the package<br />
### dahdi-tools.<br />
###<br />
###################################################</p>
<p>・DAHDI Toolsのコンパイルとインストール<br />
wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.2.0.tar.gz<br />
tar zxvf dahdi-tools-2.2.0.tar.gz<br />
cd dahdi-tools-2.2.0<br />
./configure<br />
make<br />
make config<br />
make install<br />
###################################################<br />
###<br />
### DAHDI tools installed successfully.<br />
### If you have not done so before, install init scripts with:<br />
###<br />
###   make config<br />
###<br />
###################################################</p>
<p>・Asteriskのコンパイルとインストール</p>
<p>wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.1.tar.gz<br />
tar zxvf asterisk-1.4.1.tar.gz<br />
./configure<br />
make</p>
<p> +&#8212;&#8212;&#8212; Asterisk Build Complete &#8212;&#8212;&#8212;+<br />
 + Asterisk has successfully been built, and +<br />
 + can be installed by running:              +<br />
 +                                           +<br />
 +               make install                +<br />
 +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+</p>
<p>make install<br />
make sample<br />
make config</p>
<p>make config で起動時に自動起動するようになります。</p>
<p>・汎用パッチの適用<br />
wget ftp://ftp.voip-info.jp/asterisk/patch/scripts/ja_autopatch.sh<br />
chmod 755 ja_autopatch.sh<br />
./ja_autopatch.sh</p>
<p>・RT-200NE対応パッチ</p>
<p>http://voip-info.jp/index.php/RT-200NE%E5%AF%BE%E5%BF%9C%E3%83%91%E3%83%83%E3%83%81</p>
<p>wget http://ftp.voip-info.jp/asterisk/patch/local/1.4/channels/chan_sip.c.rt200ne.070417-01.patch<br />
patch -p0 < chan_sip.c.rt200ne.070417-01.patch</p>
<p>・日本語パッチの適応<br />
wget ftp://ftp.voip-info.jp/asterisk/sounds/1_4/asterisk-sound-jp_14_beta.tar.gz<br />
/var/lib/asterisk/soundsの下に展開すればjp/で全ての日本語音声が展開されます。<br />
tar zxvf asterisk-sound-jp_14_beta.tar.gz<br />
mv jp /var/lib/asterisk/sounds</p>
<p>・サンプル設定ファイル<br />
cd /etc<br />
mv asterisk asterisk.bak<br />
mkdir asterisk<br />
cd asteriskmkdir asterisk<br />
wget http://ftp.voip-info.jp/asterisk/conf/conf-sample-1.4_01.tar.gz<br />
tar zxvf conf-sample-1.4_01.tar.gz</p>
<p>パッチを適用した後は再度、make、make installを行います。</p>
<p>・Asteriskの起動<br />
asterisk -vvvvc<br />
コンソールが白っぽくなってメッセージがずらずらとでます。</p>
<p>func_strings.so => (String handling dialplan functions)<br />
  == Manager registered action PlayDTMF<br />
  == Registered application &#8216;SendDTMF&#8217;<br />
app_senddtmf.so => (Send DTMF digits Application)<br />
  == Registered application &#8216;Log&#8217;<br />
  == Registered application &#8216;Verbose&#8217;<br />
app_verbose.so => (Send verbose output)<br />
  == Registered application &#8216;DeadAGI&#8217;<br />
  == Registered application &#8216;EAGI&#8217;<br />
  == Registered application &#8216;AGI&#8217;<br />
res_agi.so => (Asterisk Gateway Interface (AGI))<br />
  == Registered application &#8216;TrySystem&#8217;<br />
  == Registered application &#8216;System&#8217;<br />
app_system.so => (Generic System() application)<br />
Asterisk Ready.<br />
*CLI> </p>
<p>・Asteriskの終了</p>
<p>*CLI> stop gracefully<br />
それでも止まらないような場合<br />
*CLI> stop now</p>
<p>設定が細かくて大変そうです。<br />
外線を利用し、Webでのインターフェースを作ったらいろいろ使えそうです。</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2395691642029212";
/* 728x15, 作成済み 09/06/30 */
google_ad_slot = "5513976068";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bit-works.net/archives/62/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WindowsからUbuntuへリプレイス（覚書）</title>
		<link>http://blog.bit-works.net/archives/11</link>
		<comments>http://blog.bit-works.net/archives/11#comments</comments>
		<pubDate>Wed, 17 Sep 2008 04:59:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[未分類]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.bit-works.net/?p=11</guid>
		<description><![CDATA[Ubuntu
■ThinkPad X31にUbuntu8.04をインストール
・LAMP On Ubuntu
sudo apt-get install apache2
sudo apt-get install php5  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ubuntulinux.jp/" target="_blank">Ubuntu</a></p>
<p>■<strong>ThinkPad X31にUbuntu8.04をインストール</strong></p>
<p>・<strong>LAMP On Ubuntu</strong></p>
<p>sudo apt-get install apache2<br />
sudo apt-get install php5 libapache2-mod-php5<br />
sudo apt-get mysql-server<br />
sudo /etc/init.d/apache2 restart</p>
<p>・<strong>PHP,Apacheの動作確認</strong><br />
sudo vi /var/www/test.php<br />
&lt;?php phpinfo(); ?&gt;</p>
<p>http://localhost/test.php</p>
<p>・<strong>X31の中ボタンを有効にする</strong></p>
<p>sudo vi /etc/X11/xorg.conf</p>
<p>Configured Mouse</p>
<p>Option &#8220;EmulateWheel&#8221; &#8220;true&#8221;<br />
Option &#8220;EmulateWheelButton&#8221; &#8220;2&#8243;<br />
Option &#8220;EmulateWheelTimeOut&#8221; &#8220;200&#8243;<br />
Option &#8220;XAxisMapping&#8221; &#8220;6 7&#8243;<br />
Option &#8220;YAxisMapping&#8221; &#8220;4 5&#8243;</p>
<p>・<strong>SSH</strong><br />
apt-get install ssh</p>
<p>・<strong>streamtuner　ネットラジオ</strong></p>
<p>sudo apt-get install streamtuner streamripper realplayer</p>
<p>以下からxmmsをダウンロード（レポジトリにないので）</p>
<p>https://launchpad.net/ubuntu/hardy/i386/xmms/1:1.2.10+20070601-1build2</p>
<p>Downloadable files<br />
xmms_1.2.10+20070601-1build2_i386.deb</p>
<p>パッケージマネージャーでインストール</p>
<p>・<strong>VLC　動画ビューアー</strong></p>
<p>sudo apt-get install vlc</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bit-works.net/archives/11/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
