CD/CD writer/DVD

From The World according to Vissie
Jump to navigation Jump to search

DVD player

  • The DVD player worked straight away, but did not play DVDs fast enough - the pictures were jerky and disjointed. I made several changes to get this to work. I was using mplayer to play DVDs. I had to create the following symbolic link:
ln -s /dev/hdc /dev/dvd
  • Add the USE flags mmx and sse to /etc/make.conf. I had to re-build mplayer and libmpeg2 after changing the USE flags so that they would make use of the processor extensions. This made a big difference to the speed at which the software ran.
  • The hard-drive and DVD drive settings can be optimised via the hdparm command. The hdparm settings can be included in /etc/conf.d/hdparm. I simply added the following line to this file:
all_args="-d1 -c3 -m16 -X66"

The flags are as follows:
   * -d1 enable DMA - for some reason this does not seem to work.
   * -c3 use 32-bit transfer mode
   * -m16 allow multiple sector mode
   * -X66 use Ultra DMA transfer mode
    • The all_args parameter applies these settings to both the hard-drive and the DVD drive. Those that are not applicable are simply ignored. This gives around a 2x speed-up in data transfer times for both the hard-drive and DVD. To apply these settings at boot time, start the hdparm daemon as follows:
rc-update add hdparm default
    • The combined effect of these changes allowed DVDs to be played in real-time without any problems.
To play:
 mplayer dvd://1
To eject:
 eject /dev/dvd
    • hdparm benchmark results
[ #? 73G SCSI ]
root@ [~]# more /var/log/dmesg
Vendor: FUJITSU   Model: MAP3735NP         Rev: 0106
Type:   Direct-Access                      ANSI SCSI revision: 03
SCSI device sda: 143571316 512-byte hdwr sectors (73509 MB)
root@ [~]# hdparm -tT /dev/sda
Timing buffer-cache reads:   1180 MB in  2.00 seconds = 590.00 MB/sec
Timing buffered disk reads:  152 MB in  3.01 seconds =  50.50 MB/sec

CD writer

  • The 2.6 kernel removes the need for SCSI emulation to talk to CD writers. The drive's parameters can be seen with:
cdrecord dev=ATAPI -scanbus
  • Which showed me that the writer's bus parameters are 0,0,0 so the burn command is
cdrecord dev=ATAPI:0,0,0 -v speed=12 -data filename.iso