back to ripmake homepage
ripmake Introduction
The Beginning
The idea of ripmake is to write a tool which automatically (i.e. with as few
user interaction as possible) selects the best parameters for a given ripping
task. It should inspect the source (e.g. a DVD or an AVI file), extract all
important information, calculate the missing parameters and generate a parameter
set for transcode that will create an output file of high quality.
First I thought of a tool that performs all the necessary steps itself and
calls transcode for the real work. But I soon found out that often a bit of
manual intervention is required to achieve the best results. So a different
approach came to my mind: Why not write a tool that generates a makefile for
the rip and that embeds all automatic options as parameters in it. You can then
call different rules for different rip tasks (e.g. render a sample, render whole
movie...) and you can overwrite the parameters by redefining the make variables.
So here it is: ripmake - A makefile generator for your ripping tasks.
The first version was quite alpha and simply tried to prove the concept. The
current version is an almost complete rewrite of the first version and is quite
useful.
Current Status
Supported Sources:
- DVD disc or image
- AVI file (DIVX, MJPEG tested)
Supported Targets/Flavors:
- AVI MPEG4 (XviD, Divx4/5)
- VCD (PAL tested)
- SVCD (PAL tested)
Some Technical Detail
The following steps are performed by ripmake:
- Analyse input with tcprobe (a companion of transcode)
- extract: frame size, aspect, total frames, fps, audio channel info
- Do some bit calculations
- calc bits available on one, two or more CDs
- determine available video bitrate for each number of CDs and the bits
available per frame.
- Find clipping window
- pick some sample frames from input stream
- DVD: pick the 32nd frame of each title VOB
- AVI: pick frame 1000, 1100, 1200
- run pgmfindclip on the image sequence
- Determine target frame size
- VCD, SVCD: easy - size and aspect are predefined and fixed
- AVI: we have to search size but know the aspect and assume a square
pixel display
- AVI: build a list with all suitable target resolutions
- build list of possible frame widths (with modulo 16 for encoder!)
- calc the aspect corrected height for each width
- only select those frame dimensions with an aspect error below 2 percent
- Determine number of CDs
- VCD: find the smallest set of CDs whose videorate is higher than the fixed
maximum bitrate
- SVCD: find the largest set of CDs whose videorate is lower than the allowed
maximum bitrate
- AVI: calc the avg. bits per pixel for each size and number of CDs and
pick a suitable combination
- The source material is split onto the chosen set of CDs
- DVD input: call chaplin and split chapters
into "number of CDs" parts and encode an exact chapter range
on each disc. For SVCD mastering create a XML vcdimager
mastering description with chapter navigation.
- AVI input: the input is divided up equally. no special navigation is
available here.
- Calculate frame transformation
- given: (clipped) input size, aspect and output size, aspect
- find: efficient set of transcode commands (e.g. -B, -X)
- Write a makefile
- first a variable section is written. All determined values are assigned
to make variable and thus can be changed easily.
- the rule section follows. The first block contains rules for the generation
of a sample movie with a duration of one second. Ripmake chooses a chapter
in the middle of the movie if the input comes from a DVD. Otherwise the
beginning of the movie is selected. The sample rule is always called as
default rule.
- the rest of the rule section contains the main ripping rules. You can
always start the ripping task by calling the "rip" rule.