annotate DOCS/DVD @ 506:8f741175eb43

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