2001-04-18 19:07:41 +00:00
|
|
|
DVD support in MPlayer!
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Read file 'DVD-FAQ' as well (and try to avoid recursion by the redirector
|
|
|
|
message there :).
|
|
|
|
|
|
|
|
IMPORTANT NOTE: please _DO_NOT_ require further features for DVD playback. This
|
|
|
|
is extremly experimental hack. Maybe it won't work for you. If you're
|
|
|
|
capable of helping us do it now! First we would like to fix existing problems.
|
|
|
|
Then we can start implementing advanced DVD playback functions of course.
|
|
|
|
|
|
|
|
This means current DVD functions are mainly for developers and not for users!
|
|
|
|
|
|
|
|
Building MPlayer with libcss support
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
First, you must compile and install libcss on your system.
|
2001-05-18 19:50:42 +00:00
|
|
|
Second, you have to recompile MPlayer with libcss support. There is
|
|
|
|
autodetection of libcss, but if it fails, see below :
|
2001-04-18 19:07:41 +00:00
|
|
|
|
2001-05-18 19:50:42 +00:00
|
|
|
Call ./configure script of MPlayer with these options:
|
|
|
|
|
|
|
|
./configure --enable-css --withcsslibdir=/usr/local/lib --withcssincdir=/usr/local/include
|
2001-04-18 19:07:41 +00:00
|
|
|
|
|
|
|
(of course you can append your favourite options as well)
|
|
|
|
|
2001-05-18 19:50:42 +00:00
|
|
|
--with-csslibdir=/usr/local/lib
|
2001-04-18 19:07:41 +00:00
|
|
|
Directory contains libcss.so shared library. This directory should
|
|
|
|
be in your /etc/ld.so.conf as well.
|
|
|
|
|
2001-05-18 19:50:42 +00:00
|
|
|
--with-cssincdir=/usr/local/include
|
2001-04-18 19:07:41 +00:00
|
|
|
Directory contains header file 'css.h' of libcss.
|
|
|
|
|
|
|
|
Viewing VOB files directly from DVD
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2001-06-05 03:09:54 +00:00
|
|
|
mplayer -dvdauth /dev/dvd /mnt/cdrom/video_ts/vts_01_1.vob
|
2001-04-18 19:07:41 +00:00
|
|
|
|
|
|
|
where,
|
|
|
|
|
2001-06-05 03:09:54 +00:00
|
|
|
'-dvdauth /dev/dvd' tells MPlayer the device name of your DVD drive.
|
2001-04-18 19:07:41 +00:00
|
|
|
it's used in disc authentication process
|
|
|
|
|
|
|
|
the filename is simply a VOB file path on the disc
|
|
|
|
|
2001-04-19 12:10:18 +00:00
|
|
|
Note that according to my experiences, disc authentication requires root
|
|
|
|
privileges so you must run MPlayer as root! (see section 'Problems').
|
2001-04-18 19:07:41 +00:00
|
|
|
|
|
|
|
NOTE about the sound:
|
2001-04-19 12:10:18 +00:00
|
|
|
It seems that MPlayer sometimes fails to find the first audio stream.
|
|
|
|
You can specify it with the '-aid 128' option, for example.
|
2001-04-18 19:07:41 +00:00
|
|
|
Please experience with 128,129 and similar values. See section
|
|
|
|
'Problems'.
|
|
|
|
|
|
|
|
|
|
|
|
New source files
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
dvdauth.c
|
2001-04-19 12:10:18 +00:00
|
|
|
Issues DVD disc and title authentication and fills key_disc and
|
|
|
|
key_title arraies.
|
2001-04-18 19:07:41 +00:00
|
|
|
|
|
|
|
dvdauth.h
|
|
|
|
header file
|
|
|
|
|
2001-04-19 12:10:18 +00:00
|
|
|
These files are embedded inside an '#ifdef ... #endif' block, so if libcss
|
2001-04-18 19:07:41 +00:00
|
|
|
support was not requested, they do not produce any code and of course
|
2001-04-19 12:10:18 +00:00
|
|
|
libcss is not linked against MPlayer either.
|
2001-04-18 19:07:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
Modifications in the source
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
* (stream.c) STREAM_BUFFER_SIZE is set to 2048
|
|
|
|
* (demux_mpg.c) the old message of 'encrypted VOB file is not supported'
|
|
|
|
was changed to set a flag to 1. After parsing the header, if this
|
|
|
|
flag is set, we call descramble function of libcss for decrypt.
|
|
|
|
* (stream.c) on several points where the old 4096 length STREAM_BUFFER_SIZE was
|
|
|
|
hardcoded into the source, it was replaced with 'STREAM_BUFFER_SIZE'
|
|
|
|
* (mplayer.c) calling dvd disc and title authentication and seek to sector
|
|
|
|
boundaries on seeking for mpegs
|
|
|
|
|
|
|
|
|
|
|
|
Performance
|
|
|
|
~~~~~~~~~~~
|
|
|
|
On my AMD K6-2 with using hw scaling and colorspace conversion
|
|
|
|
capability of my G400 it's possible to watch DVD with about 70%
|
|
|
|
CPU usage with '-nosound'. Unfortunately with sound my machine is
|
|
|
|
not enough :( Maybe it can be improved somewhat ...
|
2001-04-19 12:10:18 +00:00
|
|
|
Guess, it's not so bad ... According to reports from my friends
|
|
|
|
xine uses 80-90% CPU to play DVD on much more powerful machines
|
2001-04-18 19:07:41 +00:00
|
|
|
like 1GHz Athlon systems (as far as I know, it's said that about
|
|
|
|
300MHz celeron is the minimum to watch DVDs ... using windows
|
|
|
|
DVD viewers).
|
|
|
|
|
2001-05-10 14:12:22 +00:00
|
|
|
Hint: I commented out downmix functions from libac3 (of course in this way I
|
2001-04-18 19:07:41 +00:00
|
|
|
can't get sound) and audio decoding CPU usage became 11% instead of 24 on
|
|
|
|
my machine. This clearly indicates that we should optimize downmix functions
|
|
|
|
(KNI code is no use for my k6-2).
|
|
|
|
|
2001-06-05 03:09:54 +00:00
|
|
|
HOT NEWZ:
|
|
|
|
We have got 3Dnow optimized libac3. Wow ;-)
|
|
|
|
|
2001-04-18 19:07:41 +00:00
|
|
|
|
|
|
|
Problems (TODO)
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
* disc authentication (the FIBMAP ioctl) requires root privilegies.
|
|
|
|
this is strange since OMS can do it as user too.
|
2001-04-19 12:10:18 +00:00
|
|
|
* sound. I'm using my only DVD disc (The Matrix) to test MPlayer.
|
|
|
|
some VOB file have English sound, some have Spanish and some have
|
2001-04-18 19:07:41 +00:00
|
|
|
no sound at all.
|
|
|
|
IT SEEMS that if I give '-aid 128' everything works with English sound ...
|
2001-04-19 12:10:18 +00:00
|
|
|
* strange effects but only with SOME vob files (it looks like some interlacing
|
|
|
|
effect, eg: every 2nd line on the screen is from the last frame).
|
2001-04-18 19:07:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
feature TODO
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
* chapter scanner
|
|
|
|
* audio stream scanner and allow to select one on runtime as well
|
|
|
|
(in stage#1 it would be enough to select one on the startup, see
|
|
|
|
'Problems' above)
|
|
|
|
* DVD menu
|
|
|
|
I found (at least on disc 'The Matrix') the menu VOB but I don't
|
|
|
|
know how can it be used.
|
|
|
|
(after some eyeballing on the source of OMS, it seems we would have to
|
|
|
|
parse *.ifo files)
|
|
|
|
* subtitle support
|
|
|
|
* OSD/GUI (?) support for select chapter, subtitle and audio stream
|
|
|
|
* getting some documentation on DVD format, eg: which is the 'root' VOB
|
|
|
|
file on the disc in video_ts directory, which is the menu and so on.
|
|
|
|
* improve performance (see 'Performance' above)
|
|
|
|
|
|
|
|
|
|
|
|
No sound problem (from Matrix DVD, the menu VOB)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
End of packet while searching for PCM header
|
|
|
|
|
|
|
|
DEMUXER: Too many (2048 in 4131540 bytes) video packets in the buffer!
|
|
|
|
(maybe you play a non-interleaved stream/file or video codec failed)
|
|
|
|
MPEG: No Audio stream found... ->nosound
|
|
|
|
|
|
|
|
However this does not occur if you specify '-aid 128'.
|