IT博客 联系 聚合 管理  

Blog Stats

随笔档案


knight

2005年12月6日 #

vobcopy http://vobcopy.org/projects/c/c.shtml

 vobcopy  [-b  size[bkmg] ] [-e size[bkmg] ] [-f] [-F fast_factor ] [-h]       [-i input-dir ] [-l] [-m] [-n title-number ] [-o output-dir ] [-O  sin-       gle_file(s)_to_rip ] [-t name ] [-v [-v]] [-I] [-V] [-1 aux_output_dir1       ] [-2 aux_output_dir2 ] [-3 aux_output_dir3 ] [-4 aux_output_dir4 ]

vobcopy copies DVD .vob files to harddisk, decrypting (if you have libdvdcss installed) them on the way (thanks to libdvdread and libdvdcss) and merges them into file(s) with the name extracted from the DVD.

Normall usage:

Copy main title to DiskName_01.vob: vobcopy

Mirror whole disk to DiskName/VIDEO_TS/: vobcopy -m

(it figures out DiskName and dvd mount point and device itself)


cpdvd http://www.lallafa.de/bp/cpdvd.html

 cpdvd: $Revision: 1.10 $ $Date: 2004/01/31 09:53:41 $ Usage: cpdvd [options] <targetDir>

  -t <num>  copy title <num>    (repeat for more titles/none: whole disc)  -m <mnt>  set DVD mount point (default: DVD_MOUNT or "/dvd")  -d <dev>  set DVD device      (default: DVD_DEV or probe automatically)  -v        use vobcopy for data transfer   (default: cpvts)  -c        use tccat for data transfer  -f        force mount and unmount of dvd device  -i        only fetch info and exit  -n        dummy mode (do not execute copy commands)

Normall usage: You simply give a target directory (will be created automatically) insert a DVD and that's all:

 cpdvd MyMovie

 (doesn't use the DVD's name.)


dvdbackup - http://dvd.chevelless230.com/dvdbackup.html

dvdbackup will create a DVD-Video structure under /my/dvd/backup/dir/TITLE_NAME/VIDEO_TS.

To backup the main feature of the DVD:

 dvdbackup -F -i/dev/dvd -o /my/dvd/backup/dir/

To back up the ENTIRE DVD:

 dvdbackup -M -i/dev/dvd -o/my/dvd/backup/dir/

Note: On some linux distributions, the symbol UDFFindFile is no longer exported from libdvdread, and instead has been made a static function. It seems that the dvdbackup utility needs to link with this function. As a workaround, one can still download the older version 0.9.3 of libdvdread from:

  http://dvd-create.sourceforge.net/libdvdread-0.9.3.tar.gz
One could configure this version of libdvdread to build it in a local directory, using for example:
  ./configure --prefix=$HOME/libdvdread-0.9.3
You could then link dvdbackup with this local version of libdvdread using something like this:
  gcc -o dvdbackup.o -c dvdbackup.c -I$HOME/libdvdread-0.9.3/include  gcc -static -o dvdbackup dvdbackup.o \    $HOME/libdvdread-0.9.3/lib/libdvdread.a -ldl
You may prefer not to use the -static flag, and instead set LD_LIBRARY_PATH to include the local $HOME/libdvdread-0.9.3/lib directory.


StreamDVD http://www.badabum.de/streamdvd.html

StreamDVD is a fast tool to backup Video DVDs 'on the fly', there will be no ripping, demultiplexing, recoding, remultiplexing .... You can select the wanted title, chapters, video, audio and subpicture streams and also a resize factor and StreamDVD will write a 'ready to author' vob file to stdout.

StreamDVD is slower for 'basic' ripping, but is the only one that does simple (fast) requantizing.

Typical use:

First determine a requantizing factor:
streamanalyze -t 1 -i /mnt/dvd Factor : 1.077

If the factor is above about 1.5, use -s to pick streams, or -c to pick chapters.

Use the factor and whatever other options you used (-s, -c) on this line:
dvdauthor -t -o /movies/movie1 -f 'streamdvd -i /dev/dvd -t 1 -f 1.077|'

Then use dvdauthor to reconstruct the dvd menu:
dvdauthor -T -o DiskName/

Technorati :

posted @ 2005-12-06 09:24 knight 阅读(128) | 评论 (0)编辑 收藏

2005年10月14日 #

以delphi为例:
TTest = record
c1: char;
i1: Integer;
c2: char;
c3: Char;
end;
这个结构如果用sizeof取其占用的内存大小,是多少呢,是1+4+1+1=7么,不是,是4*3 = 12; 这是因为32位编译的时候,默认结构会自动内存对齐(32bit = 4byte)。

如果要想让这个结构占用7个字节的话,必须加上packed关键字。如下:
TTest = packed record
c1: char;
i1: Integer;
c2: char;
c3: Char;
end;

c中也有类似的语法,如
#define ATTRIBUTE_PACKED __attribute__((packed))
typedef struct {
...
} ATTRIBUTE_PACKED record_t;
__attribute__ ((packed)); 是说取消结构在编译过程中的优化对齐。
__attribute__ ((aligned (64))); 是说让dummy成员对齐在64-bit自然边界上。


再附两种情况增加理解:
TTest = record
c1: char;
i1: Integer;
end;
//占用8字节

TTest = record
c1: char;
i1: Integer;
c2: char;
end;
//占用12字节
TTest = record
c1: char;
end;
//占用1字节

posted @ 2005-10-14 03:27 knight 阅读(282) | 评论 (0)编辑 收藏

那天下了一个blog客户端,今天打算试验一下好不好使,好使的话以后偶就用客户端写blog了

配置关键
xml-rpc url:
http://www.cnitblog.com/knight/services/metablogapi.aspx

posted @ 2005-10-14 03:11 knight 阅读(168) | 评论 (0)编辑 收藏

仅列出标题