Viewing encrypted movies

How to get your DVD drive to work for YOU

By Floor Anthoni (July 2007) 
www.seafriends.org.nz/linux/dvd_css.htm
The threat from movie companies and the recording industry has now made it impossible to watch copy protected movies in Xandros and Linux. How can you make your DVD drive read CSS-protected and encrypted files? How can you watch movies on your computer? How can you back up your own movies?
.

 back to contents page Seafriends home page   feedback   Rev:070706,


introduction

It is not only Microsoft who bullies manufacturers into submission. In this game the movie and music recording industries excel to the same extent. In their war against illegal copying, these giants also cross the line of decency, as they are themselves to blame if people resort to what they define as illegal copies.

But when it comes to prohibiting or blocking people from viewing the movies they bought or rented from the video shop, on their own computers, then the anti-copy rage has clearly overstepped the boundary of decency. Let's mince no words here. Have you noticed that the cost of hardware (which is difficult to duplicate) has gone down and down, and the cost of blank DVDs and CDs also, isn't it ironic then that the cost of Microsoft software and movie DVDs and music CDs (which are easy to duplicate) has remained high, and even increased? Why?

Quite bluntly put: if the giant monopolies of software, film and music stopped their criminal behaviour of bullying others and fixing prices, their problem of illegal copying would almost disappear. For now their posturing and blaming innocent people like you and me is just propaganda and brainwashing to draw attention away from their own criminal behaviour. One could even say that (illegal) copying has become a social obligation to break the power of monopolies that unleash terror on the community, for the sake of greed.

So why would one wish to make (legal) copies?

Within the Linux world, copying the work of others is the done thing, because others have made their work available for free. Yet breaking copy protection to even view a movie, is shunned because of bullying by extremely powerful hegemons (autocratic rulers). It is no surprise then for Xandros users to discover that they cannot even PLAY copy-protected movies. They find that their precious DVD writer is unusable. How could that be justified?

So on this page you'll find the instructions to regain the functionality of your DVD drive.


changing the file system table

In the chapter about drive mapping, we have detailed how to change the fstab table. Please read this first. More changes are needed to regain functionality of the DVD drive.
The line about the cdrom drive needs to turn read/write on (rw) and a mysterious option unhide must be removed. This option serves to make hidden files visible, but has been hi-jacked to make encrypted files invisible, but this is not documented. The file system must be set to auto because the DVD can have more formats than just music CD ISO9660. The nouser option is unimportant.
 
/dev/hdc   /media/cdrom0    iso9660   ro,nosuid,nodev,exec,user,noauto,async,unhide 0 0
must become:
/dev/hdc   /media/cdrom0      auto    rw,nosuid,nodev,exec,nouser,noauto,async      0 0

Now the DVD should work, but oh dear, Xandros won't mount it in /media/cdrom0, but mounts it in /var/autofs/cdrom.1/cdrom.1 with ownership to root. It also mounts it in /disks/Removable/cdrom.1
I may sound paranoic but by mapping the DVD this way, no application will ever find it. Notice the Removable folder spelled with a capital-R? This is a Linux no-no. So we need to do some re-mounting.
 


re-mounting the DVD

Because Xandros does not heed the mount settings in the file system table, we need to re-mount the dvd drive in a different way.
It so happens that the mount command in Linux is one of the most confusing commands, hard to understand and very hard to memorise. But I have found a way around it with the Xandros File Manager.

Navigate to /var/autofs/cdrom/cdrom.1. It shows as a folder, but a strange one at that. It is the true mount point. Right-click properties. It shows that the owner is root, so we need to switch user and log  in as root.
Navigate to /disks/Removable/cdrom.1 and it has a different symbol. This is a link to the true mount point.

As administrator, drag the cdrom.1 from /disks/Removable/ to /media/cdrom/ which puts a copy there.
In /media there is already a cdrom0 mounted and there are two links to it. Delete cdrom0; two links disappear too. Rename cdrom.1 to cdrom0. The two other links reappear. Now packages can find the dvd.
For reasons explained in the CrossOver Office chapter, I also drop a copy of cdrom.1 in /disks and rename it dvd.

Place a protected movie in the dvd drive. Use XFM to look at it. All protected files are now visible but your DVD player still won't work and copying these files fails. You must see the dvd through /disks/dvd and /media/cdrom/cdrom0


playing movies

Xandros offers various movie players, of which Xine and Mplayer (mediaplayer) are the most favourite. However, I find Xine bugsy and big. Then I happened upon ogle and ogle-mmx which makes use of some common display-accelerating hardware (MMX) if your box supports that. So ogle-mmx is now my favourite compact and fast movie player. To give you an idea, it uses only 20% processor time (AMD Athlon 1.8MHz) playing a protected movie in 160KB. So it should play well on a 600MHz CPU.
All these players need a decryption library called libdvdcss2 which Xandros-Networks will obligingly install without problems. Now the three movie players will work fine. Enjoy!


copying files

Even though we've broken protected access restrictions, it is still not possible to copy protected files to the hard drive, a protection mechanism not just in XFM but more deeply rooted in the kernel. So how do we get around that?
The solution is unexpectedly simple, and ogle is your key. Run the movie for a few seconds with ogle, and close it. Now the kernel's copy protection is broken, and XFM and the copy command cp work as normal. What's more, when copying the protected files, they are being decrypted as well.

The breaking of copy protection follows an evolutionary process: as a defence is broken, nature comes up with stronger defences, until predators break these too, and so on. One of the latest and simplest and nastiest copy protections is the inclusion of bad blocks on the DVD. These are sometimes made mechanically to the DVD master, or electronically by writing wrong checksums. The DVD player does not see these because the program that guides it (.IFO), skirts around the bad sectors. But copy programs work on a file by file basis, and they hit the bad blocks head-on. So how does one get around this?

One obviously needs a copy program that does not give up at the first bad sector, but carries on. One would have expected this of the cp file copy command, but it can't do it. In Windows the program dvddecrypter can do it, but skipping 400 bad blocks could take over 2 hours - who cares?

Linux has dd_rescue, a command-line-driven program that keeps copying across bad sectors. For instance when copying files over in the normal way, stumbles over the file VTS_01_1.VOB, it can be retrieved as follows (notice the handy use of /disks/dvd):

dd_rescue -A /disks/dvd/VIDEO_TS/VTS_01_1.VOB  /disks/G/TEMP/VIDEO_TS/VTS_01_1.VOB

As dd_rescue does not have man pages, read its instruction manual here: http://www.debianadmin.com/manpages/ddrescuemanpage.txt

Update: the Windows program DVDFAB which runs happily under WINE, copies a movie the way a DVD player would play it, avoiding bad blocks and other traps. The purchased version even shrinks the movie to fit a 4.5GB disc.


shrinking a movie

Nearly all movie DVDs have the dual-layer capacity of 9GB, whereas home DVD writers are limited to 4.5GB. But since the MPEG compaction format is flexible, a movie can be compressed a little more to fit in the available space. So a backup of your disc is not complete without writing it back onto a DVD, and for this, one must be able to shrink the main movie.
A unique program that does this particularly well is dvdshrink, the author of which has had serious threats from the movie moguls, to the extent that we cannot expect new versions after 2.0. To my knowledge, a similar program is not available in Linux, even though xdvdshrink makes similar claims.

The good news is that the Windows version of dvdshrink can be made to run in Crossover Office (XO) and Wine. Since Xandros supports XO, we'll use XO to install dvdshrink. Also read the special chapter on CrossOver Office and how to tweak it.
What we need to know here is that any Windows installation must be done from within XO.
>>launch> applications > Crossover > Install application.

You can safely install dvdshrink in the default win98 bottle but it also runs in a winXP bottle. It pays to take the older version dvdshrink317setup.exe if version 2.0 causes problems. You'll see that it installs in the folder windows applications, and it installs an icon onto the desktop. It has one problem: the preview window does not work, and viewing in large screen format with FK11, does not work either. Neither does it allow you to create a new folder, so create an output folder first with XFM.

Crossover Office has already configured a cd/dvd device as M: linked to /media/cdrom0 and this should make dvdshrink find the dvd device.

Your workflow now looks like this:

  1. in the first instance, run dvdshrink taking input from the dvd and see if it stumbles over bad blocks. Go to point 6. In case of bad blocks, go to 2.
  2. run ogle and open the dvd. Play it and close it.
  3. copy the dvd folder /VIDEO_TS to a temporary folder such as /DVD or /TEMP on the workspace disk.
  4. note whether any files fail to copy
  5. use dd_rescue to copy the bad file.
  6. run dvdshrink to compress the movie as usual to its destination folder, say, /MOVIE where it creates two mandatory folders: /VIDEO_TS and /AUDIO_TS
  7. burn a new dvd (see next chapter)
Links:
http://www.debiantutorials.org/content/view/10/247/  a tutorial on copying DVDs with Linux
http://forum.doom9.org/  a continuing forum about DVD copying.

Latest update: although dvdshrink is no longer supported, an even better program has seen the light, DVDFab. Its authors keep it uptodate to skirt around the latest obstacles presented to it by the film industry. Now the good news is that it also appears to run effortlessly in WINE (and CrossOver?) and that the authors find this important too. So no longer bother about dd_rescue to skip past broken blocks, since DVDFab copies files according to the way the movie runs. I think it always works when you select to copy the main movie only as it then also skirts around 'easter eggs' pointing to broken blocks. Further good news is that the purchased copy of DVDFab also shrinks the movie to fit a 4.5GB burner, which does away with dvdshrink, although it can still be used. Please note that I haven't tried it myself yet in Linux, although it has served me well in Windows. www.dvdfab.com/


burning a dvd

Xandros has an in-built DVD burner, but it has rendered it useless by not being able to burn dvd-compliant discs. You see to what extent these Linux guys go to please the entertainment industry and to annoy their customers?
The good news is that there is now nero-linux, an indispensable tool for burning CDs, music CDs, backups, data DVDs and video-compliant dvds. But it is not as simple as for instance Sonic's record-now for Windows, which does all the thinking for you. Nero-linux downloads and installs like a charm and is not too dear. It also works rightaway, not needing the changes shown on this page. Presumably, it finds the raw dvd device in /dev/ and ignores all Xandros' protection antics.

For full dvd compliance you'll need DVD-R media. Nero will start with a new compilation dialogue, which can be rather annoying when you know how simple it all can be. There is a top left drop-down box to select dvd. First option is DVD-ROM (ISO). File system: iso9660 only. Maximum letters in file names: 11 (8+3). Un-tick all other boxes. Multisession tab: no multisession (this sets Disk At Once). Label tab: manual label of no more than 16 letters, all CAPITAL.
Drag the required VIDEO_TS folder into the compilation window, and AUDIO_TS (not strictly required). It is all very clumsy, and I don't understand why people like the Nero burner. Version 3.0.0 does not even qualify as a beta version, as it is a truly nasty bit of software.

Note that the Xandros' internal DVD burner can burn a DVD which is read by most DVD players, but not by all. For most applications, you would not need Nero. The Xandros DVD burner is part of the Xandros File Manager but as of today (July 2007), is bugsy and unreliable. Yet, if it works, it could be magical as one merely needs to drop files into a 'project'. Faults are: not burning reliably, sometimes leaving a whole disc unburnt or partially burnt; forgetting the settings of the project; being unable to import an existing session, and so on.
 
 


.