[mplayer] Re: libcss support in mplayer

Arpi arpi at thot.banki.hu
Sat Feb 24 06:36:48 CET 2001


Hi,

> just found libcss [1] today. should not be a big problem
> to integrate that. i thougt to do it myself.. but my
> free time is too limited... maybe one of you got enough
> time to do it.
> 
> [1] http://www.linuxvideo.org/user/dl.html

I'm already working on that, but it's not so simple.
It's very silly:
DVD files are sector-oriented (2048 bytes/sector), and the
sectors are encrypted (except the first 128 bytes of each sector),
but the encryption flags are stored inside of mpeg2 PS packages.
So, I have to start parsing input file as bytes, and if I found
a package with encryption bits set, I have to callback to the
input streamer code, and ask it to decode the sector i'm reading.
It's a bit hard to implement with current design of mplayer.
MPlayer has byte-oriented input streaming, but DeCSS needs sector-
oriented input!
So I have some options:
- decss everything in the input layer. it has some problems:
  - i don't need all the packages (think of a 15-language file
    but we need only one audio track at same time) so decoding
    everything eats our cpu without any use...
  - maybe there are tracks not coded (free music :))
- hack some callback into the parser/input code. ugly!
- write a new mpeg parser designed for DVD files, with decss.
  it will be sector-oriented, but we must keep the old parser for
  mpeg1 and not-dvd mpeg2 files too...

When I choose the best option, I'll begin to implement it.
I think, the first one is impossible because of big performance loss.
The second one is simpler but very ugly, the third needs many code
changes and still ugly (but more stable)


A'rpi / Astral & ESP-team

--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu





More information about the MPlayer-users mailing list