fix ati flgrx 8.40.4 signal 11 problem on FC7 x86_64

October 12th, 2007
cd /usr/lib64/xorg/modules/drivers/

mv fglrx_drv.so fglrx_drv.so.orig

cat fglrx.drv.orig
| sed "s/xe8x61x2cxfexff/x90x90x90x90x90/g"
> fglrx_drv.so

aticonfig --initial
Share

How to set up a DNS server for your home office

September 24th, 2007

A home office DNS server basically is a full feature DNS server with two specials:

  • It resolve the local domain name which is only used internally, pretty much like: main.home and bedroom.home.
  • For the public domain name, it prefer to be just as a forwarder of your ISP’s DNS.

First, you will install the DNS server software. It is quite easy on Fedora:

yum install bind
yum install bind-chroot
/sbin/chkconfig named on
/sbin/service named start

Then, create a DNS config file under /var/named/chroot/etc :

options {
    directory "/var/named";
    query-source address * port 53;
    allow-query { localnets; };
    forward first;
    forwarders {
        // put your ISP's DNS here.
        // the forward DNS of your router won't work
	64.70.22.12;
    };
};

include "/etc/named.rfc1912.zones";

zone "home" {
    type master;
    file "home.zone";
};

zone "6.168.192.in-addr.arpa" {
    type master;
    file "6.168.192.in-addr.zone";
};

include "/etc/rndc.key";

Then, you will create your local .home domain zone file and its reverse resolve file under /var/named/chroot/var/named.

I give my example here, the main.home (192.168.6.20) is the DNS server of local network, the jeff.home (192.168.6.33) is the work station.

home.zone:

$TTL	3600
$ORIGIN	home.

home.	IN SOA	main root (
	20070924	; Serial
	10800		; Refresh
	3600		; Retry
	604800		; Expire
	86400 )		; Minimum TTL

@	IN NS	main

main	IN A	192.168.6.20
jeff	IN A	192.168.6.33
@	IN A	192.168.6.20

6.168.192.in-addr.zone:

$TTL	3600

6.168.192.in-addr.arpa. IN SOA	main.home root (
	20070924	; Serial
	10800		; Refresh
	3600		; Retry
	604800		; Expire
	86400 )		; Minimum TTL

@	IN NS	main.home.

20	IN PTR	main.home.
33	IN PTR	jeff.home.
Share

About video file scale

September 24th, 2007

It seems like while you want to scale the movie to new resolution, the new resolution has to be multiple of 16, otherwise the scale will be fail.

Also, another problem is most DVD player can not play horizon resolution higher than 800, so it is very important to test and scale down the movies.

I would suggest you convert one minute and try playing back on your DVD player before you do the time consuming convert procedure.

The command might like:

mencoder input.rm -o output.avi
-oac mp3lame
-ovc xvid -xvidencopts bitrate=800
-vf scale=720:480
-endpos 1:00
Share

More on video convert

September 21st, 2007

Convert rm to flv, good for most of video upload website:

mencoder input.rm -o output.flv
-oac mp3lame -lameopts abr:br=56 -srate 22050
-ovc lavc
-lavcopts vcodec=
flv:vbitrate=300:mbd=2:mv0:trell:v4mv:cbp:last_pred=3
-of lavf
-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames
-vf scale=352:288

Convert rm to home threater DVD player playable:

mencoder input.rm -o output.avi
-oac mp3lame -lameopts vbr=2:q=3
-ovc xvid -xvidencopts bitrate=800

Common video resolution:

Profile Resolution
VCD 352×288
Legacy TV 512×384
DVD 720×480
Wide screen TV 624×352
1080P HDTV 1920×1080
Share

How to convert rm/rmvb to DVD player friendly format

September 17th, 2007

Sometimes, we just want to play the real media video on our home theater system. Unfortunately, most of the DVD player won’t recognize rm/rmvb format, so we have to convert it to some other format, like avi file with xvid video encode.

To do this, we can use free tools like mencoder, which is a program comes with mplayer project.

I choose to convert it on Windows platform, since it is easier and likely to be faster for handling rm files.

First, we will download mplayer from: http://www.mplayerhq.hu/design7/dload.html. You should choose the Windows Xming version. Don’t download the GUI version, since it doesn’t come with the mencoder.exe we need.

The installation is quite simple, just unzip it to any place you like. You may want to add it to the PATH environment setting later.

Now, we will download the “windows all” codecs package from: http://www.mplayerhq.hu/MPlayer/releases/codecs/ . Unzip it into your mplayer software’s codecs folder, and copy the drv*.dll files (This is the decoder extracted from real player I believe) into \Windows\system32\.

Now, if you have a rmvb file like: file.rmvb, you can use the following command to convert it to a xvid avi file named file.avi:

mencoder file.rmvb -oac mp3lame -lameopts preset=128 \
    -ovc lavc -lavcopts vcodec=xvid -ofps 25
    -of avi -o file.avi

After that, you can burn it to a cd or dvd and play it on most of the xvid/divx compatible DVD players.

Share

Why Chinese words change to ??? after upgraded to WP 2.2

September 8th, 2007

I saw a lot of complains about after upgraded to WP 2.2, the display of Chinese display is not correct any more. The reason looks like WP now assume the charset using in database storage is UTF-8, which is usually not true. More over, the scripts of WP creating the database tables will use sweden_ci as default.

So, you have to change the every fields in WP’s database to utf8_unicode_ci to make it handles Chinese characters correctly.

Share

What’s Semantic Web

September 1st, 2007

Semantic Web is a solution towards better tuning web data into web knowledge. The basic idea behind semantic web is add formal descriptive material to each web page, although it is invisible to human, but would make its content easily understood by computers.

According to W3C’ definition: The Semantic Web is about two things. It is about common formats for integration and combination of data drawn from diverse sources, where on the original Web mainly concentrated on the interchange of documents. It is also about language for recording how the data relates to real world objects.

The approach to semantic web includes two technologies suggested by W3C:

  1.  RDF ( Resource Description Framework ) : It is used to represent information and share knowledge in the Web.  Most famous usages of RDF include RSS Feeds, Apple Podcast, Open Directory Project’s data.
  2. OWL ( Web Ontology Language ) : It is used to publish and share sets of terms called ontologies, supporting advanced Web search, software agents and knowledge management. Again, a example is Open Directory Project’s category information.
Share

Categories of Web Data Mining

August 31st, 2007

We talked about data mining for quite a while. Up till now, we begin focusing on web data mining. The research currently focuses on:

  1. Web Structure Mining, which includes: Information Retrieval and Web search, Hyper-link based  ranking.
  2. Web Content Mining, which includes: Clustering, Classification.
  3. Web Usage Mining.

This categorization comes from Z. Markov and D. Larose ‘s excellent book: Data mining the Web -uncovering patterns in web content, structure and usage.

Share

Solution for web pages stop loading in the middle

August 26th, 2007

After upgrade my Linux box to Fedora 7, I found that some web pages will stop loading in the middle. This renders a page only with header or even an empty page. With Wireshark, I can see only one package returned by the server, the rests are lost.

At first, I suspected this is a MTU problem, but with no luck after trying hundreds MTU settings. Finally, I remembered some notes I have took before about Linux’s TCP fix, and it did the magic.

Here is the settings in /etc/sysctl.conf

net.ipv4.tcp_moderate_rcvbuf = 0
net.ipv4.tcp_window_scaling = 0

Also, it is not a bad idea to turn off ipv6 support, add a file includes following to /etc/modproble.d/

alias net-pf-10 off
alias ipv6 off
Share

Browser behavior while sending referrer URL

August 25th, 2007

Some times we need to determine the referrer URL. For example, an online advertising company wants to display special information based on which page its audience is looking at. A common way is checking the referrer URL of the current scripts page then embedded in the publisher’s pages.

However, different browser may have different behavior while sending the referrer URL in HTTP request header. Most of browsers except IE will escape the path and query part to % form, and this is what the standard required. IE will convert the query part to UTF-8 encoding before sending it, while other browsers will just leave it as the current encoding using for display. For Firefox, it will be a little bit more complicated, since it can be configured by the about:config page.

Here are some examples:

  • search.php?q=one two, will be sent as it is by IE, and be sent as search.php?q=one%20two by others.
  • search.php?q=中文, will be sent as it is by IE, however, the Chinese charactes are encoding to UTF-8 no matter what encoding the page is. For other browser, it will be sent as search.php?q=%E4%B8%AD%E6%96%87 if search.php is displayed using UTF-8 or as search.php?q=%D6%D0%CE%C4 if search.php is displayed using GB2312.

I will try to give in depth explanation on this issue in the coming articles. Stay tune!

Share