Saturday, December 09, 2006

DV-2-XviD 0.8.2 and IrDA Socket extension for Python 2.5

Roger found 2 bugs in DV-2-XviD 0.8.1 again!! Download DV-2-XviD here.

I have upgraded my python envirment to 2.5. Today I rebuild irda extension. download it

Monday, November 27, 2006

DV-2-XviD 0.8.1

0.8.1 is a bugfix version. Thank the bug reporter, Roger. Now DV-2-XviD support avi clips that were captured by "Scenalyzer Live".

Download

Wednesday, November 22, 2006

Friday, October 27, 2006

DV-2-XviD's new feature will be delayed

Nobody is able to handle two things well concurrently. DV-2-XviD 0.8 has achieved my target in some ways, so I'll delay new feature developing in next days and continue my MobileSync project.

I'll still listen feedback from user and I should release new bugfix version if critical bug was found. Don't worry about it. I am a DV user so that I must do my best to improve it. It's just delay, not finish.

Monday, October 23, 2006

DV-2-XviD 0.8 release!

With rewriting lots of codes, DV-2-XviD 0.8 is released now!

This version includes many significant updates.
  1. remove the ugly DOS prompt window
  2. pack into one DV-2-XviD.exe
  3. add a log frame in main window.
  4. application now has a cute app-icon.
  5. not depends AutoGK anymore. it only require XviD and Avisynth
  6. add aspect radio auto detection. (16:9 or 4:3)
I also have set up a new homepage, and have created a svn repository in google codes.

Binary download:
http://projects.dup2.org/project_files/DV-2-XviD_0.8.zip

DV-2-XviD 0.8 support auto-detecting aspect radio of DV AVI stream!

Although OpenDML has defined "vprp" header to save aspect radio information. But in DV AVI file, it doesn't store vprp info. Fortunately DV has itself AR definition format.

When I began coding DV-2-XviD and tried to get datetime from DV avi, this great article was a important reference. Now I found it also describes AR-definition bit . But it doesn't point howto analyse it.

Then I found a detail algorithm in libavformat/dv.c (a part of ffmpeg) and merged it into DV-2-XviD. It works well. :)

Tuesday, October 17, 2006

A wonderful disk partition recover tool, TestDisk

My laptop is Thinkpad R51E and it had a 5GB HPA partition. I recently installed ubuntu in it with splitting the hidden partition to a ext3 partition and a linux swap partition by gparted tool that was used in ubuntu installation procedure. Then I used gparted to decrease size of original C:, then created a extended partition and created 3 logical partitions in it, including a FAT32 partition and two NTFS partitions.

Monday I tried to reinstall WindowsXP on the laptop. But it seemed that GRUB can't recognized the XP's boot record. I has to clear GRUB by FreeDOS "fdisk /mbr" command. Then disaster came. I lost the second partition and the third partition.

Fortunately I could boot into XP. I downloaded a popular recovery tool "Partition Table Doctor" to resolve the disaster. It found my lost partitions soon but after I applied the recovery operation I got another terrible disaster -- these partitions was not be recovered and my two Linux partitions were disappeared!

(After the disaster I found a reason that maybe cause "PTD" recovery failed. WinXP recognizes my hard disk as 240 Heads , but Ubuntu, include FreeDOS fdisk perhaps, recognizes it as 16 Heads).

At last I found TestDisk. It hasn't a cool GUI front end but it is powerful. TestDisk scan all possible boot sectors and display all recovery options and let user to choose the right partition operation. Finally I recovered all partitions under ubuntu Live CD environment.

Tips: Teskdisk doesn't scan all sectors in the default analyse process. Maybe you wouldn't get all lost partition information after the default process end. Then you should execute "[Search! ]" option to scan all sectors.

Besides it save my data successfully twice(I recovered a FreeBSD system last year with it), TestDisk is a opensource software and it support many OSs and filesytems. I recommend TeskDisk as the first recovery tool of partition damage.

DV-2-XviD 0.7 can't support 16:9 resolution

Thanks for Magnus's bug report. I'll fix it in future version. Now I need some sample clips to test it. May anyone give me?

Wednesday, October 11, 2006

Win32 Bluetooth Support Sucks

As a part of my PyMobileSync, I need developing over bluetooth. These days I found programming for Bluetooth device under win32 platform was a nightmare!

I followed the guide from MSDN only support Windows . But I got 10047 error "Address family not supported by protocol family" when I tried to create a BTH socket. I searched google, then I found MSSDKXP native Bluetooth stack and it don't support my Bluetooth dongle device (ISSC chip).

Before Windows XP SP1, Microsoft hasn't added native Bluetooth support. So IVT and Widcomm developed their bluetooth stack on Win32 platform and now bluetooth software developer must program with three SDKs if they want their application could to be accepted most widely.

Jon Cellini wrote a article that described how to make a Bluetooth device that was not supported officially by microsoft work under native stack. Somebody reported their ISSC device could work this way and others reported failure, and indeed my device failed.

At last I spent 6$ to buy a new Bluetooth dongle with CSR BlueCore4-ROM chip that could be detected natively and I found windows xp's Bluetooth management application is toooooo simple. I believe windows native stack will be the winner of three stacks. But it lack a killer application of Bluetooth management now. Will Vista include a new one?

Sunday, October 08, 2006

Extract Install Shield .cab format.

There are two formats of .cab files. One is the standard Microsoft's cab format and these files can be extract by many tools such as 7-zip, winzip, ..., even new Windows Explorer. Another format is "Install Shield" format and these files usually be named as data1.cab, data2.cab .. These files can't be extracted by normal utilities.

SynCE project release a tool 'unshield' under unix environment to extract it. Under Win32 platform, I found a freeware 'i6comp' could extract the InstallShield format.

Good Luck.

Tuesday, October 03, 2006

DV-2-XviD 0.8 coming soon..

These days I rewritten lots of code and redesign UI.

I rename wxPython script's file name from .py to .pyw so that the DOS-Output window disappears. I add a LogMessage window at the application interface's bottom.

"select a temp directory" have been removed. It's a strange option to end-user. Now the program create a directory on where the target file will be placed in with a fixed name 'd2x_tmp'.

Recently I learned some py2exe knowledge from mail-list. Binary distribution will remain only one executable file 'DV-2-XviD.exe' and it have a cute icon, 'BT's FLOWER'.

I also plan to provide a full binary package which include vdubmod and lame so that it do not depends AutoGK and only depends XviD and AviSynth..

Sunday, October 01, 2006

Authentication War

Today I read a news about yahoo's new BBAuth. Like MS's Passport/LiveID and Google Accounts, now these three bigest freemail/webapp vendors have join a authentication war.

When I start to design eyou.com's passport mechanism at 2005. I thought we can deliver a similar API to encourage 3rd-party developers creating their webapp based eyou.com's passport. Even we would extend the passport network to all email servers that were deployed in CERNET campus. Anyway, now eyou have focused on zhanzuo.com service, and I have no chance to implement the crazy idea.

To owner user's authentication data means you taking the charge of saving it safely. You should provide HTTPS connection, recruit high credence employee to maintain the database, defend hackers from everywhere, etc, etc. On the other hand, it is difficult to get a new user to register in your site . So I think Passport/LiveID, Google Account, BBAuth are very important services for startups. They don't care auth/reg problem anymore, and just focus on their core competence.

Before I read the news about BBAuth, I tried create a sample app to use LiveID and Google Account API. It seems that many problems exist. MS maybe release their API(web version) at 2007 and nobody know whether the service is free. (Considering competitors, I think LiveID would be a free service). Google's API is very simple and my test php script passed test last night. But it only support google calendar service by now. If the google account have not registered google calendar service, then I can't fetch it's email address info (I known a google account login my service but I can't identify who is it).

Google Account Service include 2 steps, authentication and authorization. Verifying email/password pair is authentication. Fetching the account's email address info is authorization. It seems that there is only one authorizable service (google calendar) and the support from google is bare.

Welcome to Authentication War, Yahoo!. I wish the action spur ms and google.

Friday, September 29, 2006

DV-2-XviD 0.7 release!

Now it do a comptest before 2pass compress. It will adjust resolution if it find it is necessary.

It also resolve the problem that GUI interface will lose response after began compressing.

The package also add a new english README. I wish it would help you.

Homepage: http://www.dup2.org/en/dv2xvid
Download: http://www.dup2.org/files/dv2xvid-0.7.zip

Tuesday, September 26, 2006

pymobilesync works!

Although it remain pre-alpha stage, I'm glad to announce that I can sync my contact info between Ericsson R520 phone and PC.

Source can be downloaded from http://code.google.com/p/pymobilesync/source

I'll return to improve my DV-2-XviD !

Monday, September 18, 2006

Private time for yourself

Almost all people work for living and family, not personal interesting. When we at home, we need to cook, clean room, go out shopping, read for children, take care of parents, favor spouse, etc, etc.

The time for myself start from 11:30pm and end at 1:30 am everyday. Only 2 hours belong me. It's too bad.. :(

Wednesday, September 13, 2006

Reading Paul's "The Hardest Lessons for Startups to Learn"

Original article is here.

I digest serveral important points:

1. Work hard
Perhaps the most important reason to release early, though, is that it makes you work harder.

2. Keep thinking of improvements
For example, I doubt many people at Yahoo (or Google for that matter) realized how much better web mail could be till Paul Buchheit showed them.

3. Tell vistors what your site is about by showing them
A startup should be able to explain in one or two sentences exactly what it does... if you have something impressive, try to put it on the front page, because that's the only one most visitors will see...

4. Three biggest threat: internal disputes, inertia and ignoring users. The worst is ignoring users.
If you want a recipe for a startup that's going to die, here it is: a couple of founders who have some great idea they know everyone is going to love, and that's what they're going to build, no matter what.

5. Commitment
The only way to convince everyone that you're ready to fight to the death is actually to be ready to.

6. There is always room
The only limit would be the number of people who want to work that hard.

7. Don't get your hopes up
when you hear someone say the words "we want to invest in you" or "we want to acquire you," I want the following phrase to appear automatically in your head: don't get your hopes up. Just continue running your company as if this deal didn't exist.
The way to succeed in a startup is to focus on the goal of getting lots of users, and keep walking swiftly toward it while investors and acquirers scurry alongside trying to wave money in your face.

8. SPEED!!!
Economically, a startup is best seen not as a way to get rich, but as a way to work faster... What's important about startups is the speed. By compressing the dull but necessary task of making a living into the smallest possible time, you show respect for life, and there is something grand about that.

Monday, September 11, 2006

English project page

I have created DV-2-XviD's English homepage.

You can read document from here... and screenshot !



Enjoy it!

Saturday, September 09, 2006

completion of a translation relate to XviD

It seems that Oversized/Undersized explanations - Doom9's Forum is a vade mecum for the problem. So I translated it to chinese and post it on my chinese blog.

I'll change my DV-2-XviD in next version (0.7) by following its recommendation. Run a comptest first. Then adjust resolutoin to avoid oversize.

Before I read the article, I had no idea of the comptest of AutoGK. Now I realize the reason. Comptest is cool, very cool.

Friday, September 08, 2006

Small beer

Word of today is 'small beer'. Howto use the phrase in this blog entry? I have no idea.

Yes, tonight my drink is draft beer. 'But draft beer is different from small beer obviously' , I think.

The north wind knocked the window of my apartment last night. This morning was cold and my daughter is feverous. Beijing's fall came.

I'll visit SINA's office at Monday. Our team want learn some wise advice from the CTO of SINA, Songbo Li.

Thursday, September 07, 2006

WHEN YOU BELIEVE

I upgrade the blogger.com account to beta. But it seems that there are no evident difference between two version. :(

Besides began the english blog to improve my english skill, I subscribed several english feed, including Dictionary.com's "word of the day". Now I invent a new interesting thing that use the word in my blog of the day. :)

I have chated with Mao last night by gtalk. If you read his blog, maybe you will think he is a passional, straight CEO of a startup. However, I found him was filled of uncertainty and lost the faith of our country, even chinese next genertion.

I am a pervicacious optimist. Though I am not sure if I believe in the God, I am sure that I do believe in sth in my soul. It's hard to explain what it is. But it need my persistence. "When You Believe" is one of my most favorite songs. In fact, Faith itself is a big miracle.

Wednesday, September 06, 2006

release irda-0.1.win32-py2.4.exe

IrDA socket support for Python is a part of another project I created. The traditional way of using IrDA device under python, just is serial/COM port emulation, and is quirky when you want create OBEX communication over it.

It seems to me that python support bluetooth but yet do not support irda. I submited a irda socket patch two months ago, but it must wait for 2.6 because 2.5 has freezed. Then I create the extension for mainstream usage. ( download http://www.dup2.org/files/irda-0.1.win32-py2.4.exe )

Source svn repository is http://pymobilesync.googlecode.com/svn/trunk/irdasocket/ . irsocket.c is released under python license. Documents, python scripts are released under GPLv2.

I build the binary file with free Visual C++ Toolkit 2003. Integrating the toolkit into python distutils package's bdist_wininst system is easy after reading this article.

If you have interest in irda-python programming, you may test my extension with next scripts:
from irda import *
irdaobject = irda()
devicelist = irdaobject.discover()
print devicelist
firstHint(devicelist[0][3])
secondHint(devicelist[0][4])
irdaobject.connect('OBEX')
irdaobject.close()

Monday, September 04, 2006

Computing VirtualDub/VDubMod SetCompData string of XviD

Process of DV-2-XviD is very simple. It generate AVS(AviSynth) script first. The script conjoin video clips, load kerneldeint.dll to DeInterlace, load dvinfo.dll to add datetime code on screen, and LanczosResize the resolution. Then it generate three VCF(VirtualDub/VDubMod) scripts to split PCM audio that will be compressed by LAME-mp3 encoder, run XviD 2-pass compress.

The most difficult step of above is computing SetCompData string. The data structure depend on XviD's build version and must be computed for every special verion if we need control target file exactly. Now I just use a simple, unified function to compute it. It works under XviD 1.03/1.1.0-beat2/1.1.0/1.2.0-dev .

The function use Python's ctype module to load xvidvfw.dll, fetch default config from it. Now I want somebody that was accomplished in XviD compression to help me improving the program.

Sunday, September 03, 2006

DV-2-XviD 0.6

I am pleased to announce that DV-2-XviD 0.6 version is available for download.

DV-2-XviD is my personal project for compress DV to xvid-mpeg4 format. It will conjoin several DV scenes to one file , add datetime code on the screen's bottom-right edge, adjust resolution to 512x384, compress it to original size's 1/10 with XviD/MP3 format.

Now there is only chinese document about it. But I'll write english document soon. Source code was written by Python and release under GPL. The archive with source code can be download from here.

If you have interest in the project, please contact me with gtalk (qiuyingbo [aT] gmail )

Hello, World!

I am a chinese blogger and created my blog 2 years ago. I decided start a english blog to improve my english writing ability...