comparison DOCS/DVD @ 506:8f741175eb43

DVD docs
author lgb
date Wed, 18 Apr 2001 19:07:41 +0000
parents
children b63c485a530d
comparison
equal deleted inserted replaced
505:b015178f60ae 506:8f741175eb43
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
30 NOTE: There is no autodetection for libcss! You must require it with
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
39 '-dvd /dev/dvd' tells mplayer the device name of your DVD drive.
40 it's used in disc authentication process
41
42 the filename is simply a VOB file path on the disc
43
44 Note that according my experiences disc authentication requires root
45 privilegies so you must run mplayer as root! (see section 'Problems').
46
47 NOTE about the sound:
48 It seems that mplayer sometimes fails to find the first audio stream.
49 You can specify it with using the '-aid 128' option, for example.
50 Please experience with 128,129 and similar values. See section
51 'Problems'.
52
53
54 New source files
55 ~~~~~~~~~~~~~~~~
56 dvdauth.c
57 Issues DVD disc and title authentication and fills key_disc and key_title
58 arraies.
59
60 dvdauth.h
61 header file
62
63 These files are embeded inside an '#ifdef ... #endif' block, so if libcss
64 support was not requested, they do not produce any code and of course
65 libcss is not linked against mplayer either.
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 ...
86 Guess, it's not so bad ... According reports from my friends
87 xine uses 80-90% CPU to play DVD on much more powerfull machines
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.
102 * sound. I'm using my only DVD disc (The Matrix) to test mplayer.
103 some VOB file has English sound, some has Spanish and some has
104 no sound at all.
105 IT SEEMS that if I give '-aid 128' everything works with English sound ...
106 * strange effects but only with SOME vob
107 files (it looks like some interlacing effect, eg: every 2nd line
108 on the screen is from the last frame).
109
110
111 feature TODO
112 ~~~~~~~~~~~~
113 * chapter scanner
114 * audio stream scanner and allow to select one on runtime as well
115 (in stage#1 it would be enough to select one on the startup, see
116 'Problems' above)
117 * DVD menu
118 I found (at least on disc 'The Matrix') the menu VOB but I don't
119 know how can it be used.
120 (after some eyeballing on the source of OMS, it seems we would have to
121 parse *.ifo files)
122 * subtitle support
123 * OSD/GUI (?) support for select chapter, subtitle and audio stream
124 * getting some documentation on DVD format, eg: which is the 'root' VOB
125 file on the disc in video_ts directory, which is the menu and so on.
126 * improve performance (see 'Performance' above)
127
128
129 No sound problem (from Matrix DVD, the menu VOB)
130 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131 End of packet while searching for PCM header
132
133 DEMUXER: Too many (2048 in 4131540 bytes) video packets in the buffer!
134 (maybe you play a non-interleaved stream/file or video codec failed)
135 MPEG: No Audio stream found... ->nosound
136
137 However this does not occur if you specify '-aid 128'.