[MPlayer-dev-eng] Performance of libdvdread/libdvdcss

Vicente Sendra visenri at yahoo.es
Fri Aug 31 21:28:37 CEST 2012


I'm new to mplayer developers mailing list, i hope this is the right place to talk about this.

Firs of all, i am compiling for Win32 with mingw, and testing on my windows xp laptop, but i think all this is ok for all other platforms.

I've been developing a new system for double frame rate output (for filters like yadif and tfields) that solves 3 problems with mplayer:

1-You get exact double framerate timing, old system did 2 continuous page flips, resulting in two frames very close in time, depending on your video card refresh rate.

2-New system always pushes filter frames to queue and gets them in mplayer.c main loop with vf_output_queued_frame, so they can be framedropped if needed.

3-New framedrop system for framerates > video card refresh rate, that resulted in 100% cpu usage with vsync activated, because page flip gets blocked with full buffer until next video card refresh. New system checks page flip time and if it gets too big, it starts dropping interpolated frames, if no interpolated frames or if dropping them is not enougth, only then full frames are dropped, this problem is very old but now it's very annoying because most lcd monitors can't go > 60hz (my old CRT was set to 75Hz, so no problem here).

http://forum.doom9.org/showthread.php?p=1333149
http://www.nvnews.net/vbulletin/showthread.php?t=106409

I've got this system working with r34401 (i was getting compile errors from las r35119), but debugging this system has shown me the low performance of cache system when using "Win2K API" for dvd access (vs "libc" acess).

Cache doesn't fill fast enough, even if there is cpu time available and, of course, media is fast enough.

Cache works ok with libc and same settings, double frame rate and same dvd.

To test it i'm using this command line options:

for win32k:
mplayer.exe -ao dsound:device=0 -vf-add yadif=1  -dvd-device K:\ -dvdangle 1 -msglevel all=9

for libc:
mplayer.exe -ao dsound:device=0 -vf-add yadif=1  -dvd-device K:\VIDEO_TS -dvdangle 1 -msglevel all=9

(i set DVDCSS_VERBOSE environment variable to 2 to see more info about css)

DVD activity led performs very different with the two access methods, win32k blinks a lot, indicating a lot of activity, when in fact it fills cache at a lower speed, with libc, it barely lights up but it fills cache pretty quickly.

Any ideas on how can i improve reading with win32k.

How can libc be used with scrambled DVDs?, it reports:
 Device K:\VIDEO_TS inaccessible, CSS authentication not available
 (see following logs).


Here are the logs of libdvdcss:

########## win32k #########

libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdcss debug: opening target `K:'
libdvdcss debug: using Win2K API for access
libdvdcss debug: disc reports copyright information 0x0
libdvdcss debug: drive region mask 0xfd, RPC-II, region code set

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Found 3 VTS's
libdvdread: Elapsed time 0

######### libc: #######

libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdcss debug: opening target `K:\VIDEO_TS'
libdvdcss debug: using libc for access
libdvdcss debug: cannot open K:\VIDEO_TS (Permission denied)
libdvdcss error: failed to open device
libdvdread: Could not open K:\VIDEO_TS with libdvdcss.
libdvdread: Can't open K:\VIDEO_TS for reading
libdvdread: Device K:\VIDEO_TS inaccessible, CSS authentication not available.
libdvdcss debug: opening target `K:\VIDEO_TS/VIDEO_TS.IFO'
libdvdcss debug: using libc for access
libdvdcss debug: opening target `K:\VIDEO_TS/VTS_01_0.IFO'
libdvdcss debug: using libc for access
libdvdcss debug: opening target `K:\VIDEO_TS/VTS_01_1.VOB'
libdvdcss debug: using libc for access
libdvdcss debug: cracking title key at block 0
libdvdcss debug: end of title reached
libdvdcss debug: successful attempts 0/0, scrambled blocks 0/2000
libdvdcss debug: no scrambled sectors found
libdvdcss debug: title key is 00:00:00:00:00
libdvdcss debug: unencrypted title





More information about the MPlayer-dev-eng mailing list