transcode -i vob_dir --psu_mode movie --nav_seek nav_log ...|
transcode -i vob_dir --psu_mode --nav_seek nav_log ...|
In general, it's a good idea to move the various chunks of the previously ripped program stream into a directory. This directory will be denoted as vob_dir. Please see the DVD backup guide for details. We will need to put the *.VOB files into this extra directory to make the directory mode of tccat and transcode work. Please keep the vob_dir clean of other files.
Restrictions: Options -c / -M3 / -M4 / -L / -S do not work for this mode because transcode sets some of the parameters internally for navigation.
The first step is to create the navigation logfile nav_log containing the frame and related group of picture (GOP) list with file offsets:
tccat -i vob_dir | tcdemux -W > nav_log
A typical output of the command looks as follows:
Sisko:cluster>tccat -i vob_dir | tcdemux -W > nav_log
(seqinfo.c) 284 video frame(s) in unit 0 detected
(seqinfo.c) 413 video frame(s) in unit 1 detected
(seqinfo.c) 3506 video frame(s) in unit 2 detected
(seqinfo.c) 150662 video frame(s) in unit 3 detected
This result shows, that the entire stream is made up of 4 program stream units (PSU), that are defined by a reset of the presentation time stamp (PTS) in the stream pack header. This situation may require a re-synchronization at the beginning of each PSU, which transcode can only handle in this new core mode. This trick is to restart import at every PSU. We need to provide only two flags (long options) to make it work:
transcode -i vob_dir --psu_mode --nav_seek nav_log ...
This will eventually produce the 4 output files: movie-psu00.avi, movie-psu01.avi, movie-psu02.avi, movie-psu03.avi.
transcode does not switch off the audio or video encoder. However, a video keyframe is forced at the beginning of each output file so each file played individually. This will make the chunks perfect candidates for avimerge. The above example shows small units before the main movie. In most cases, these are junk trailers or film company/distributor intro logos and can be skipped with the additional option:
Simlar to the -c option, only units 2 and 3 but not 4 are encoded.
Other movies are even more complicated and have a chapter-like/episodes superstructure imposed with a large number of PSUs. In this case, you will need to use this new core mode. If you prefer 2-pass encoding, there is another long option
that will generate only a single output file movie-psu.avi for proper 2-pass bitrate estimation, valid for the entire movie.
Notes:I have noticed that some frames are dropped at the end of a unit, which does not break AV sync but lead to a jump in the audio track. I will try to improve this issue, but somehow audio is short in frames.