1 // cssdec.1.txt - manual page documenting the program cssdec
2 // Copyright © 2012 Géraud Meyer
3 // This file is part of cssdec.
5 // This file is released under the same licensing terms as the source code of
6 // the program which it documents; see the header of the file cssdec.c.
15 cssdec - simple CSS descrambler using libdvdcss
22 *cssdec* ['options'] [*--*] 'target' ['start_sector' ['end_sector']]
23 *cssdec* *-k* ['options'] [*--*] 'target' ['start_sector']
28 `cssdec` is a command line program to decrypt sectors of CSS scrambled VOB
29 files. The processed data is output on stdout.
31 `cssdec` uses libdvdcss directly, and passes it 'target' as is. 'target' can
32 be a drive device file or a normal file.
34 The chosen block to be decrypted should be a VOB stream encrypted with a single
35 key; it can be a whole video file copied as is from a mounted DVD disc, or a
36 range of sectors of a DVD disc (or of an image thereof) containing a single
37 title (or menu). The sector numbers are computed from the command line
38 arguments by the function strtol(3).
40 The title key used to decrypt the VOB stream is obtained by libdvdcss.
46 Print the version information and exit.
49 Increase or decrease the level of verbosity of messages printed to stderr.
50 The default level is 1, at which only error messages are printed. At level
51 0 nothing is printed. At level 2, a summary as well as some additional
52 messages for noticeable events are printed. At level 3, information about
53 every processed sector is printed.
56 Modify the exit status as if a read error occured when EOF is reached
57 before the end of the given sector range.
60 Write to the given file instead of the standard output.
63 Open the output file in append mode.
66 Key only mode: exit right after libdvdcss has tried to obtain the title key.
72 libdvdcss' environment variables.
73 Setting `DVDCSS_VERBOSE=2` in the environment will make libdvdcss print the
80 libdvdcss' default cache directory for the title keys. The cache is used
81 only if the input 'target' is a DVD Video disc (or image file). Setting
82 `DVDCSS_CACHE=off` in the environment disables the use of the cache.
87 To be interpreted as a bitmask, where each bit set indicates a failure.
88 Because a usage error always sets all the other bits, the values between 128
89 and 254 remain unused; they constitute a range often used by shells (e.g. bash
90 or older versions of ksh) to indicate an abnormal process termination (killed
97 Usage error (invalid option or wrong number of arguments).
100 Failure while opening the 'target' or the 'output_file'.
103 I/O error, while reading or writing.
106 The title key could not be obtained.
109 Some sectors could be read but not decrypted. The data corresponding to
110 these sectors is output, but its content is unknown.
115 Decrypt a scrambled video file:
118 cp /media/dvd/VIDEO_TS/VTS_01_1.VOB scrambled.VOB
119 sectors=$( echo $(ls -l scrambled.VOB |cut -d' ' -f5) / 2048 | bc )
120 cssdec -ev scrambled.VOB 0 $sectors >descrambled.VOB
122 Decrypt a DVD Video title:
125 for file in /media/cdrom/VIDEO_TS/VTS_01_[1-9].VOB; do
126 cssdec $file >> title1.vob
129 Only print the title key:
132 DVDCSS_VERBOSE=2 cssdec -kv scrambled.VOB
137 If the file size is not a multiple of the sector size (2048 bytes), the last
138 partial sector is silently ignored.
140 See also the CDimg|tools distribution file 'BUGS'.
145 cssdec was written by G.raud Meyer.
150 efdtt(1), vobcopy(1), dvdbackup(1), linkpage:dvdimgdecss[1], strtol(3)