transcode core modes:
This chapter gives a short introduction on the various basic operation modes transcode has to offer for MPEG video sources.
directory mode
transcode offers two possibilities to encode a collection of files located in a directory in the order the files are listed with the "ls" command. This feature is restricted to sources that share both video and audio import module. Calling tcprobe with the name of the directory gives information on the first file. For directories containing single video frames read on here.

import supported directory mode: (no extra options)
Raw streams which can be concatenated without any further intervention are supported. Currently MPEG program streams (VOB) and raw Digital Video (DV) streams are supported in this mode. The sources are treated as a logical input stream and piped into the decoder. This way, most navigation options can be applied.

option supported directory mode: (--dir_mode base [--no_split])
Source files that can not simply be concatenated with "cat", like AVI-files, can be processed in a row using the option "--dir_mode base" resulting in a sequence of output-files named:

base-000.avi, base-001.avi, ...

This is identical with calling each file separatly. However, for two-pass encoding or merging the resulting files on-the-fly, the additional option "--no_split" is required. This will result in one file named "base".

DVD chapter mode
Documentation not finished.
more information here
Cluster batch encoding modes
Documentation not finished.
more information here
VOB program stream unit mode
This new core mode is for NTSC sources that otherwise fail to transcode with other strategies and yield bad audio/video synchronization results. It also only works with MPEG program streams in connection with import module "-x vob".

In general, it's a good idea to move the various chunks of the big program stream, we previously ripped from a DVD, into a directory, we denote 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_dirclean 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 movie --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 junk trailers or film company/distributor intro logos and can be skipped with the additional option:

--psu_chunks 2-4

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, latest 0.6.0pre5 snapshots provide 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.

Last modified: Fri Dec 6 15:55:51 Europe/Berlin 2002