Using a cache with a DVD
Usually encode2mpeg needs to read several times the source video:
- multipass video access
- multiaudio audio access
- chapters reading
- subtitles reading
If the source video is on a DVD disk, encode2mpeg requires a
significative amount of
time just for disk access.
For example a transfer of a DVD to a DVD with chapters, video copy, 2
audio channels copy and 1 subtitles like:
encode2mpeg -o NOCACHE -dvd dvd://1 -ac3 copy -mpeg -encode 0:0:1 -multiaudio 128,129 -addchapter copy -addsub 0 -imageonly
requires about 1h56m.
The same transfer with cache support:
encode2mpeg -o ADDCACHE -dvd dvd://1 -ac3 copy -mpeg -encode 0:0:1 -multiaudio 128,129 -addchapter copy -addsub 0 -imageonly -cache /var/tmp/cache /media/cdrecorder
takes instead 1h23m. There is a 25% time reduction. The time gain is
not always the same, it depends of the options. Under certain
conditions, you could increase the time required instead of reducing it.
However the BIG advantage is in successive transfer. Once the DVD is
cached, a new transfer will proceed as fast as possible:
encode2mpeg -o USECACHE -dvd dvd://1 -ac3 copy -mpeg -encode 0:0:1 -multiaudio 128,129 -addchapter copy -addsub 0 -imageonly -dvd-device /var/tmp/cache/<TITLE>
takes now 0h51m. The time reduction now is 55%. Again, with certain
options, the time gain could be irrelevant.
Cache options
To cache a DVD on the hard disk add:
-cache <cache dir> <dvd mount point>
Once you have cached the dvd on the disk, you can use the cache content
for succesive run adding the option:
-dvd-device <cache dir>/<DVDTITLE>
You can save the content of the cache to a DVD disk with:
-savecache
or,
if you want to create only an iso image, use:
-savecache iso
In order to remove the cache content from the disk at the end of a run,
add,
together with -cache or -dvd-device, the option:
-removecache
If you want to execute only cache operations (create/save/remove cache)
add:
-cacheonly
Example
encode2mpeg -o DISK -cache /var/tmp/cache /media/cdrecorder -savecache -removecache -cacheonly
will do only a verbatim copy of a DVD