506
|
1 DVD support in MPlayer!
|
|
2 ~~~~~~~~~~~~~~~~~~~~~~~
|
|
3
|
|
4 Read file 'DVD-FAQ' as well (and try to avoid recursion by the redirector
|
|
5 message there :).
|
|
6
|
|
7 IMPORTANT NOTE: please _DO_NOT_ require further features for DVD playback. This
|
|
8 is extremly experimental hack. Maybe it won't work for you. If you're
|
|
9 capable of helping us do it now! First we would like to fix existing problems.
|
|
10 Then we can start implementing advanced DVD playback functions of course.
|
|
11
|
|
12 This means current DVD functions are mainly for developers and not for users!
|
|
13
|
|
14 Building MPlayer with libcss support
|
|
15 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
16 First, you must compile and install libcss on your system.
|
|
17 Second, you must call ./configure script of MPlayer with these options:
|
|
18
|
|
19 ./configure --enable-css --withcsslibdir=/usr/local/lib --withcssincidr=/usr/local/include
|
|
20
|
|
21 (of course you can append your favourite options as well)
|
|
22
|
|
23 --withcsslibdir=/usr/local/lib
|
|
24 Directory contains libcss.so shared library. This directory should
|
|
25 be in your /etc/ld.so.conf as well.
|
|
26
|
|
27 --withcssindfir=/usr/local/include
|
|
28 Directory contains header file 'css.h' of libcss.
|
|
29
|
522
|
30 NOTE: Currently there is no autodetection for libcss! You MUST specify it with
|
506
|
31 configure options.
|
|
32
|
|
33 Viewing VOB files directly from DVD
|
|
34 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
35 mplayer -dvd /dev/dvd /mnt/cdrom/video_ts/vts_01_1.vob
|
|
36
|
|
37 where,
|
|
38
|
522
|
39 '-dvd /dev/dvd' tells MPlayer the device name of your DVD drive.
|
506
|
40 it's used in disc authentication process
|
|
41
|
|
42 the filename is simply a VOB file path on the disc
|
|
43
|
522
|
44 Note that according to my experiences, disc authentication requires root
|
|
45 privileges so you must run MPlayer as root! (see section 'Problems').
|
506
|
46
|
|
47 NOTE about the sound:
|
522
|
48 It seems that MPlayer sometimes fails to find the first audio stream.
|
|
49 You can specify it with the '-aid 128' option, for example.
|
506
|
50 Please experience with 128,129 and similar values. See section
|
|
51 'Problems'.
|
|
52
|
|
53
|
|
54 New source files
|
|
55 ~~~~~~~~~~~~~~~~
|
|
56 dvdauth.c
|
522
|
57 Issues DVD disc and title authentication and fills key_disc and
|
|
58 key_title arraies.
|
506
|
59
|
|
60 dvdauth.h
|
|
61 header file
|
|
62
|
522
|
63 These files are embedded inside an '#ifdef ... #endif' block, so if libcss
|
506
|
64 support was not requested, they do not produce any code and of course
|
522
|
65 libcss is not linked against MPlayer either.
|
506
|
66
|
|
67
|
|
68 Modifications in the source
|
|
69 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
70 * (stream.c) STREAM_BUFFER_SIZE is set to 2048
|
|
71 * (demux_mpg.c) the old message of 'encrypted VOB file is not supported'
|
|
72 was changed to set a flag to 1. After parsing the header, if this
|
|
73 flag is set, we call descramble function of libcss for decrypt.
|
|
74 * (stream.c) on several points where the old 4096 length STREAM_BUFFER_SIZE was
|
|
75 hardcoded into the source, it was replaced with 'STREAM_BUFFER_SIZE'
|
|
76 * (mplayer.c) calling dvd disc and title authentication and seek to sector
|
|
77 boundaries on seeking for mpegs
|
|
78
|
|
79
|
|
80 Performance
|
|
81 ~~~~~~~~~~~
|
|
82 On my AMD K6-2 with using hw scaling and colorspace conversion
|
|
83 capability of my G400 it's possible to watch DVD with about 70%
|
|
84 CPU usage with '-nosound'. Unfortunately with sound my machine is
|
|
85 not enough :( Maybe it can be improved somewhat ...
|
522
|
86 Guess, it's not so bad ... According to reports from my friends
|
|
87 xine uses 80-90% CPU to play DVD on much more powerful machines
|
506
|
88 like 1GHz Athlon systems (as far as I know, it's said that about
|
|
89 300MHz celeron is the minimum to watch DVDs ... using windows
|
|
90 DVD viewers).
|
|
91
|
|
92 Hint: I commented out downmix fountions from libac3 (of course in this way I
|
|
93 can't get sound) and audio decoding CPU usage became 11% instead of 24 on
|
|
94 my machine. This clearly indicates that we should optimize downmix functions
|
|
95 (KNI code is no use for my k6-2).
|
|
96
|
|
97
|
|
98 Problems (TODO)
|
|
99 ~~~~~~~~~~~~~~~
|
|
100 * disc authentication (the FIBMAP ioctl) requires root privilegies.
|
|
101 this is strange since OMS can do it as user too.
|
522
|
102 * sound. I'm using my only DVD disc (The Matrix) to test MPlayer.
|
|
103 some VOB file have English sound, some have Spanish and some have
|
506
|
104 no sound at all.
|
|
105 IT SEEMS that if I give '-aid 128' everything works with English sound ...
|
522
|
106 * strange effects but only with SOME vob files (it looks like some interlacing
|
|
107 effect, eg: every 2nd line on the screen is from the last frame).
|
506
|
108
|
|
109
|
|
110 feature TODO
|
|
111 ~~~~~~~~~~~~
|
|
112 * chapter scanner
|
|
113 * audio stream scanner and allow to select one on runtime as well
|
|
114 (in stage#1 it would be enough to select one on the startup, see
|
|
115 'Problems' above)
|
|
116 * DVD menu
|
|
117 I found (at least on disc 'The Matrix') the menu VOB but I don't
|
|
118 know how can it be used.
|
|
119 (after some eyeballing on the source of OMS, it seems we would have to
|
|
120 parse *.ifo files)
|
|
121 * subtitle support
|
|
122 * OSD/GUI (?) support for select chapter, subtitle and audio stream
|
|
123 * getting some documentation on DVD format, eg: which is the 'root' VOB
|
|
124 file on the disc in video_ts directory, which is the menu and so on.
|
|
125 * improve performance (see 'Performance' above)
|
|
126
|
|
127
|
|
128 No sound problem (from Matrix DVD, the menu VOB)
|
|
129 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
130 End of packet while searching for PCM header
|
|
131
|
|
132 DEMUXER: Too many (2048 in 4131540 bytes) video packets in the buffer!
|
|
133 (maybe you play a non-interleaved stream/file or video codec failed)
|
|
134 MPEG: No Audio stream found... ->nosound
|
|
135
|
|
136 However this does not occur if you specify '-aid 128'.
|