CDxfs
Linux Notes: CD Ripping, Recording, and Mastering
Audio CDs
Ripping
To rip audio tracks, use cdparanoia
- To query the table of contents: cdparanoia -Q
- To copy a track to hard drive: cdparanoia n [filename.wav]
where "n" is the track number, and output is to a .wav file. - Copy tracks n through m: cdparanoia –batch n-m [filename.wav]
- Use -d [device] to specify something other than /dev/cdrom. My Plextor drive is /dev/cdrom.
Reading the cdparanoia animated output: spaces and happy faces are good, a dash is acceptable.
To rip an entire ISO filesystem from a CD-ROM:
dd if=/dev/cdrom of=my_cdrom.iso
Warning!
General Hints
- Enable "BURN-Proof".
- Run cdrecord in "dummy" mode first.
- For repeatability, put the recording commands into a shell script.
- Practice writing to a CD-RW before committing to CD-R.
Media Write Speeds
Media speeds for my CD writer, Plextor 16/10/40A:
Imation CD-R 24x speed=16 Memorex CD-RW 4x speed=4
Burning a Data CD
- Assemble data into a single directory tree.
- Create an ISO image with:
mkisofs -o cd.iso -R -J -r dir
Other options:
-f Follow symbolic links - Verify/browse ISO image with:
isoinfo -i cd.iso -f -R -J | less
Or mount as a read-only file system with:
mount cd.iso /mnt/dir -t iso9660 -o ro,loop
(if you get a complaint about "loop unknown", try running modprobe loop; see Gentoo Kernel, Block Devices). - Write CD with:
cdrecord -v speed=16 dev=0,0,0 -data cd.iso
Use:
Run cdrecord -scanbus to determine the CD drive device parameters.
Use the "-dummy" option to test the settings.
For DVDs, see Writing to DVD media.
A script fragment to help manage ISO contents (where "cd" is the directory with the contents):
if [ ! -e mixed_mode.iso -o -n "`find cd -newer mixed_mode.iso`" ]; then echo "Cleaning..." find cd \( -name '*~' -o -name '*.bak' -o -type d -name '.*' -prune \) \ -print -exec rm -rf '{}' \; echo echo "Link check..." html_link_check -start cd/READ-ME.html echo echo "Building ISO image..." mkisofs -o mixed_mode.iso -R -J -r cd echo echo "Contents:" isoinfo -i mixed_mode.iso -f -R -J echofi
Reading non-iso9660 CDs
- Copy the raw CD contents to the hard disk:
dd if=/dev/cdrom of=cd.iso
- Mount as a loopback device:
mount cd.iso /mnt/dir -t hfs -o ro,loop
Downloading and Burning ISO images from RedHat
RedHat distributes OS as ISO images that can be directly written to CD-R.
- Download the ISO images. These are available from one of the RedHat mirror sites. Use NcFTP for best results.
- Verify the integrity of each image with "md5sum iso-image" and compare with the MD5 sum posted on the FTP site.
- Write each CD with:
cdrecord -v speed=16 dev=0,0,0 -data iso-image
Burning an Audio CD
- Tracks may be .wav or .au files.
- .wav files must be 2 channel (not mono). Convert from mono to stereo with:
sox mono.wav -c 2 stereo.wav - Burn the CD with:
cdrecord -v speed=12 dev=0,0,0 driveropts=burnproof \
-audio -pad -eject \
[files…]
- Use -shorttrack before tracks shorter than 4 seconds.
- Use the -dao option to eliminate the 2 second gap between tracks. DAO = Disk-At-Once. The default is TAO = Track-At-Once. TAO necessitates a 2 second gap between tracks. DAO is not supported on all CD writers, but it is on mine, and probably most modern ones.
On-The-Fly Copying
On-the-fly copying means that the two CD drives are operating at the same time: the first one reads the source, and the second one writes onto the blank.
- X-CD-Roast will do on-the-fly copying for data CDs, but not for audio CDs.
- cdrdao will do on-the-fly copying for audio CDs.
- If both CD drives are on the same ATAPI (IDE) interface, forget about on-the-fly copying. It causes too much traffic on one ATAPI interface. My Plextor with BurnProof was able to handle it, but the transfer buffer was approximately 3% full most of the time — not where you want to be.
cdrdao copy –device 0,0,0 –source-device 0,1,0 \ –source-driver generic-mmc \ –eject –reload -v 1 -n \ –datafile /media/tmp/cdrdao.bin
Burning a Mixed-mode CD
To create a mixed-mode CD, create an ISO image as for Burning a Data CD, and collect the audio tracks. Run cdrecord with the like this:
cdrecord "$@" speed=$SPEED dev=0,0,0 driveropts=burnproof -eject \ -data \ mixed_mode.iso \ -pad -audio \ song1.wav \ song2.wav \ (etc.)
Burning an Enhanced CD (A.K.A CD-Plus, or CD-ROM XA mode 2)
Similar to a mixed-mode CD, an enhanced CD also has both data and audio, and is a multi-session CD. The audio is written in the first session, and the data is written in the second session. Most CD players can only see tracks in the first session, effectively hiding the data track. The drawback to enhanced format is that some CD players cannot read multi-session CDs at all. See this entry in the CD-Writing HOW-TO on creating multi-session CDs.
To create an enhanced CD, arrange the data for an ISO image as for Burning a Data CD, and collect the audio tracks.
1. Write the audio tracks. Be sure to specify the -multi flag:
cdrecord "$@" speed=$SPEED dev=0,0,0 driveropts=burnproof \ -multi -audio -pad \ song1.wav \ song2.wav
2. Determine where the free space on the CD begins with:
NEXT_TRACK=`cdrecord -msinfo`
3. Create an ISO image using the two numbers returned in step 2:
mkisofs -o cd_plus.iso -R -J -C $NEXT_TRACK -r cd
4. Verify the ISO image with:
isoinfo -i cd_plus.iso -f -R -J -N ${NEXT_TRACK/*,}
5. Write the data track:
cdrecord "$@" speed=$SPEED dev=0,0,0 driveropts=burnproof -eject \ -data -pad \ cd_plus.iso
Here is a script to help manage ISO contents (where "cd" is the directory with the contents):
# Default speedSPEED=10
# Process arguments. Identify speed and "blank" directives.SESSION_1_ARGS=SESSION_2_ARGS=for A in "$@"; do if [ "blank=" = "${A:0:6}" ]; then # Erase only before first session. SESSION_1_ARGS="$SESSION_1_ARGS $A" elif [ "speed=" = "${A:0:6}" ]; then SPEED=${A#speed=} else SESSION_1_ARGS="$SESSION_1_ARGS $A" SESSION_2_ARGS="$SESSION_2_ARGS $A" fidone
# Audio session.cdrecord $SESSION_1_ARGS speed=$SPEED dev=0,0,0 driveropts=burnproof \ -multi -audio -pad \ cd/song1.wav \ cd/song2.wav
# Figure out if the ISO image should be remade.# Note that audio files are stored inside the 'cd' directory.if [ ! -e cd_plus.iso -o -n "`find cd -newer cd_plus.iso`" ]; then echo "Cleaning..." find cd \( -name '*~' -o -name '*.bak' -o -type d -name '.*' -prune \) \ -print -exec rm -rf '{}' \; echo echo "Link check..." html_link_check -start cd/READ-ME.html echo echo "Building ISO image..." NEXT_TRACK=`cdrecord -msinfo` echo $NEXT_TRACK > cd_plus_msinfo mkisofs -o cd_plus.iso -R -J -C $NEXT_TRACK -r cd echo echo "Contents:" isoinfo -i cd_plus.iso -f -R -J -N ${NEXT_TRACK/*,} echofi
# Data session.cdrecord $SESSION_2_ARGS speed=$SPEED dev=0,0,0 driveropts=burnproof -eject \ -data -pad \ cd_plus.iso
Recording Live Audio
- Use Gnome Sound Recorder () or Audacity to record. With Sound Recorder, record in stereo, not mono (it messes up mono recording). Use 16-bit PCM, 44.1 KHz, stereo mode.
- Convert to mono with sox:
for F in `*.st.wav`; do
G=${F%.st.wav};
echo $G;
sox $F -c 1 $G.wav;
done - Edit waveform using Audacity waveform editor. Export to .wav format.
Converting to MP3
Use lame to convert to mp3 format with:
lame -h –vbr-new -p –strictly-enforce-ISO \ –tt ‘track title’ –tn <track-number> \ –ta ‘author’ \ –tl ‘album title’ \ –ty <year-of-issue> –tc <comment> \ file.wav file.mp3
- <year-of-issue> is 1 to 9999.
- I have been using the comment field for the date on which I converted the file.
Troubleshooting
cdrecord: (CHECK CONDITION)
A complete failure of cdrecord of the form:
Drive light on, but nobody’s home
-
As root, run cdrecord dev=/dev/hdc -prcap
Expect to see a long list of device capabilities. - As non-root user, try the commands shown above.
Permission denied: check device permissions. You may not be in the correct access group. Check with the groups command. Add yourself and login again.
udev may have assigned incorrect permissions.
Linux Notes: Video Editing
Video Editing Process
- Import video to hard disk.
- Editing video.
- Write out to Quicktime file, DVD, or video tape.
Importing Video
Disk Space Estimates
- 1 hour of DV requires 13 GB (or 217 Mb/minute or 3.6 Mb/second)
- 5 minutes of AVI can require 2 GB (or 400 Mb/minute or 6.7 Mb/second)
- 30 minutes of DV requires 9.1 GB (or 303 Mb/minute or 5.1 Mb/second)
My actual experience with Canon GL-1 (format: digital video), record mode: SP, audio mode: 16 bit:
Kernel 2.6.11.11 Hot plug
# For IEEE-1394 (Firewire) bus.raw1394ohci1394
mknod -m 666 /dev/raw1394 c 171 0
lsbus ieee1394 shows camera GUID.
Import video with Kino
Importing video with dvgrab
dvgrab is recommended for capture from IEEE-1394 (Firewire). Made by the Kino people (http://kino.schirmacher.de), dvgrab is a command line utility. These instructions also apply to Kino.
Normally, you can just insert a tape in your camera and start dvgrab. It will find your camera and control the playback.
Here’s what worked with my camera:
-
Connect camera to computer with Firewire cable. Turn camera on in VCR mode. Insert tape and position at beginning of segment.
-
Use lsbus ieee1394 to find the camera’s GUID. The Canon GL-1’s is "0×00008500001426B6".Use dvgrab 1.8 with the "–guid 0×00008500001426B6" option. Might work fine with other cameras without this option. Earlier versions do not work well with automatic camera control (AV/C), so also use the "–noavc" option. The minimum version of dvgrab which worked with this camera was 1.4.
-
For recording longer than 4m40s (~1 Gb), use the "–autosplit" option. It will split the input files at around 1 Gb and also when the recording was stopped and restarted (nice!).
-
Supply a base name of the form: "summer-vacation-" (note trailing hyphen).
-
Start dvgrab with these options.
-
Later versions of dvgrab will automatically start the camera playback. If not, start the camera (from stop, not pause). dvgrab will detect that the camera has started playing and will begin capturing.When done, stop dvgrab with Ctrl-C (dvgrab won’t stop if you stop the camera, though will not store blank frames on disk).
dvgrab produces AVI files. These may be used directly by either Kino or Cinelerra, and may be viewed with mplayer.
Importing video with dvconnect
Determining file type
Pre-processing
Transcode is good for batch pre-processing before the editing begins. However, it’s a pain to figure out. Here are some recipies.
Cut/Splice AVI Files
Editing Video with Cinelerra
I use Cinelerra to edit video. It allows multiple video and audio tracks, and separation of video from audio. Kino does not (which may be an advantage sometimes).
My system was too slow for this software (933 Mhz P-III with IDE drives). For example, I suffered video drop-outs while playing an unaltered movie in the compositor while tracking in the navigator window. Playing multiple or masked tracks was out of the question. Playback hung while stepping forward by one frame.
So I upgraded my hardware. Cinelerra always hungs after play-then-stop, and I had to kill it. I found the solution in a bug on their Sourceforge site. To avoid this bug, run:
LD_ASSUME_KERNEL=2.2.5 cinelerra
(Prefixing an executable with environment variable assignments is a bash shell feature.) This doesn’t seem to be a problem with version 1.1.7 package from Gentoo or with the 2.6 kernel.
dvgrab is recommended for capture from IEEE-1394 (Firewire).
Building and Maintaining Cinelerra
Output Dimensions
Know your output dimensions before you start. If you need to crop after editing, you’ll be sorry.
Use Clips
- When you have something worth saving, select it with the in/out brackets and save it as a "clip".
- Only armed tracks are saved to new clips!
- Before clearing the editing area, review your new clip with the Viewer. If you messed up the in/out points or forgot to arm a track, it’s better to find out before you delete your work.
- Once saved as a clip, you can clear the editing window and reload the clip again later by dragging it into the editing window. If a clip requires more tracks than are currently available in the editing window, the clip tracks are merged together. You probably don’t want this.
- You cannot modify or save over an existing clip. When you load a clip into the editing window, you are loading a editable copy. You can only make new clips and delete old ones.
- Clips take very little disk space (compared with media files).
Fragmented AVI files
- View Resources, select "media".
- Identify short sequential segments that belong together.
- Starting with the first one, append together in the main window.
- Adjust In and Out points.
- Click the "Clip" icon and name it. Unlike media, comments may be added to clips (version 1.1.7).
- After saving as a clip, the fragments can be removed from the main window.
It is best to join together fragments into clips before actual editing begins.
Subtitles and Credits
For advanced titles, create a PNG image with The Gimp and import into Cinelerra as a resource. Tips:
- The DV frame is 720 x 480 pixels. Stay away from the edges.
- Subtitles with a semitransparent surrounding region improve legibility by limiting visual interference. The PNG image format supports variable transparency. Feather the edges to avoid flicker on interlaced displays.
- For long scrolling credits, construct a tall PNG image and configure camera keyframes to smoothly scroll over the entire image (I haven’t actually tried this, and understand there may be a bug which prevents smooth panning over images this large). Try laying out the text with OpenOffice, exporting to Postscript, and then importing into The Gimp to resize to the frame width.
Other Cinelerra Tips
- Use labels to mark interesting spots.
- Use labels to break a large output file into smaller files. Use the rendering option "Create new file at each label."
- When cutting/pasting into audio/video tracks, it’s useful to have enabled. It will prevent the audio track from becoming misaligned relative to the video track. (If editing audio only, it’s probably best to disable it.)
- Even with a fast processor, output can be jerky with many effects. Have Cinelerra render these complex effects in the background so they are ready at full frame rate when you want to preview them by enabling . (Haven’t used this yet.)
Producing Quicktime Movies
Cinelerra supports "Quicktime for Linux", which apparently is not exactly the same as Apple’s Quicktime. Files that Xine or MPlayer can read may not be readable by Apple’s Quicktime. I installed Apple’s Quicktime for Windows using wine.
These codec combinations worked for both the Xine and Quicktime players. And, they were recommended by Cinelerra.
Audio:
- Two’s complement. Does not compress. Recommended.
- IMA-4: Works.
Video:
- Motion JPEG-A. Creates huge files. Recommended.
To do: Experiment with the ffmpeg h263+ encoder for producing Quicktime movies.
Also See: Cinelerra Community Center, Cinelerra Tutorial, Cinelerra TWiki On-line Manual, Kino
Producing AVI Movies
Cinelerra doesn’t do a good job creating AVI files. Create output as for Quicktime and then convert to AVI with (also see Transcode Recipes):
transcode -i file.mov -y ffmpeg -F wmv2 -o file.avi
Actually, sometimes Transcode doesn’t do such a great job, either. Last time I used it, it filled my audio track with static. Couldn’t figure out how to get rid of it, so I used mencoder instead, and it worked great:
mencoder -o file.avi -ovc lavc -oac lavc
-lavcopts acodec=mp3:vcodec=msmpeg4vs:vbitrate=6000
-srate 48000 file.mov
Syncing Audio
Background music from a CD player is an ideal audio source because accurate digital clocks insure distortion free audio. The CD audio can be ripped and then easily inserted into the movie editor and aligned with the recorded audio. You’d think so, anyway. In practice, I have found 2 minute songs which are synced at the beginning of the song and out of sync at the end. The cause is either a too fast or too slow CD audio player, or a too fast or too slow camcorder, on the order of 0.2%. Solution: stretch or shrink the ripped audio to fit the video recording. Procedure:
- Align the beginning of the audio.
- Near the end of the song, estimate the amount of lead or lag. You might have to realign the audio track and then measure the difference.
- Calculate the percentage the audio track needs to stretch or shrink:
100 * (actual-length + lead)/actual-length - Stretch audio with sox. For example, to shrink by 0.2%:
sox original.wav stretch 0.998 outfile.wav - Insert modified audio and align with recorded audio.
- Locate a clear and sharply rendered feature in the original audio track (e.g. spoken letter "T" or drum beat). Locate the same feature in the music track. Measure the distance, t, between them.
- Save and quit Cinelerra.
- Open project XML file and locate <TRACK> containing <FILE SRC=your-source-file>. Now locate the STARTSOURCE= value of the containing <EDIT> tag.
- If feature occurs later in the music track, the track must be advanced (i.e. started later). Convert t to samples (CD audio sampling rate is 44.1KHz) and add to STARTSOURCE. If stereo, add to both tracks.
- Save file, restart Cinelerra and load the project.
Exporting to Camcorder
Sending Raw DV with dvconnect
- Due to the difficulty in syncronizing equipment, it’s best to include a leader and trailer on your movie, either a solid color or a static image.
- When rendering the final movie, divide the output into segments at most several minutes in length. Do so by inserting labels on the movie timeline and using the renderer’s "Create new file at each label" option. This avoids large files which may crash Cinelerra, and allows you to re-render unsatisfactory portions without having to re-render the entire movie. Name the output file something with two zeros in it, and Cinelerra will replace the "00" with incrementing numbers. ".mov" is the standard suffix for Quicktime files.
- Set the output format to:
- Each segment may be reviewed with either mplayer or Cinelerra.
- Convert each Quicktime file to Raw DV format with:
transcode -i MyMovie-00.dv.mov -y dvraw -o MyMovie-00.dv
Note: Once, transcode crashed on me repeatedly. I ran again with the "-q 7" option, and thereafter did not need to. Probably a threading issue.
- Each segment may be reviewed with playdv. If playdv can’t read it, dvconnect won’t be able to, either.
- Press record on the camera and then run:
dvconnect –send –verbose MyMovie-??.dv
Note: I run this as root for high scheduling priority. If dvconnect complains "open video1394 device: No such device or address", try loading the video1394 kernel module.
Converting to Quicktime
- transcode (something…)
Sending with Cinelerra’s Playback to IEEE-1394
Transcode Recipes
- Try operations on a small file first.
- Read through the man page again, the accompanying docs, and the Transcode Wiki for clues on how to accomplish your goal. The Transcode Wiki has restructured the man page nicely.
- Learn to use the -c option to limit your data set initially — saves time.
- If transcode crashes, the codec may be poorly supported, or one of your shared libraries may have changed. Try rebuilding transcode again.
Convert Quicktime to AVI
transcode -i file.mov -y ffmpeg -F wmv2 -o file.avi
Convert AVI to Quicktime/MPEG-4 and strip audio
Extract audio from AVI to WAV
Extract portion of VOB file to MPEG and strip audio
transcode -i file.vob -c 0:08:16-0:14:07 –export_prof dvd -y ffmpeg,null -o file
Downsampling video by dropping frames
transcode -i file.mov -y mov -F ffmpeg_mpg4 -o out.mov -J fps=299.7:29.97
Media Comparison
| VCD | 352×240 |
| SVCD | 480×480 |
| DVD | 720×480 |
| DV (Digital Video) | 720×480 |
Set the the video editor to match the output dimensions early in the editing process. Otherwise, the output may be clipped unexpectedly if the dimensions are changed later, or are altered with transcode in batch mode.
Video CDs (VCD) and Super Video CDs (SVCD)
Super Video CDs have better resolution and capacity than VCDs (thanks to better compression). See:
Super Video CD resolutions and limits (from above):
- 480 x 480 @ 29.97 Hz, NTSC
- Video MPEG-2, maximum 2.6 Mbit/sec
- Audio must be MPEG-1 Layer 2, bit rate 32-384 Kbit/sec.
Usefulness of SVCDs: Not too. Although Linux knows how to play them, Windows and Macs do not have built-in SVCD support. SVCDs are not a genericly supported distribution medium. DVDs are much more widely supported.
Procedure for SVCD production
- Edit movie in Cinelerra with resolution set to:
Audio Sample Rate: 44100
Channels: 2
Frame Rate: 29.97
Width: 480
Height: 480
W Ratio: 1
H Ratio: 1
Color model: YUVA-8 bit
Aspect Ratio: 1:1
- Quicktime for Linux with:
Audio: Two’s compliment
Video: Motion JPEG-A, high quality (75) - Convert to SVCD-compatible MPEG-2 with mjpegtools:
lav2yuv quicktime.mov | mpeg2enc -f 4 -q 7 -I 1 -V 200 -M 2 -o video.m2v
Notes:
-f 4 Sets format to standard SVCD
-q 7 Sets quantization to 7 (decent)
-I 1 Specifies interlaced source material. True if it comes from a consumer
video camera and was not deinterlaced in Cinelerra.
-V 200 Specifies target video decoder buffer size as 400 Kb
-M 2 Indicates dual processor system - Skip if rendering to Quicktime. Render audio as MPEG-1, Layer 2. Sampling rate should be 44.1KHz.
(Two exports are necessary because transcode is currently broken on my system.) - Extract audio and convert to MPEG-1 Layer 2 with mjpegtools:
lav2wav quicktime.mov | mp2enc -V -o audio.mp2
- Merge video and audio streams together with mplex:
mplex -f 4 -b 300 -r 2750 audio.mpeg video.mpeg -o svcd_out.mpeg
mplex will fail if the combined bitrate of the video and audio streams is significantly greater than 2.75 Mbit/sec.
Hey! The MJPEG Tools documentation is inconsistent! In one place it says to use "-f 4" and in another place says to use "-f 3". - Verify merged output with xine.
- Create an ISO image with vcdimager:
vcdimager –type=svcd –iso-volume-label="MY_TEST_CD" scvd_out.mpeg - Fix warnings ("no scan information" warnings may be safely ignored). Verify output with vcddebug:
vcddebug –bin-file=videocd.bin - Burn a CD with cdrdao:
cdrdao write –device 0,0,0 –speed 16 videocd.cue
DVD Authoring
Notes from the above:
- Export audio at 48KHz. Standard encodings are Dolby Digital/AC3 (DD), Uncompressed (PCM), or MPEG-1 Layer 2. One track must have DD or PCM.
- Export MPEG-2. Encoding limits: upto 9.8 Mbit/sec MPEG-2 or upto 1.856 Mbit/sec MPEG-1 video. 4000 Kbit/sec looks OK on normal television, but shows significant pixelation on a computer monitor.
Producing output from Cinelerra for DVD Author & friends:
- Try rendering video to MPEG (format: MPEG-2, file suffix: .m2v) and audio to AC3 (suffix: .ac3).
- Ran mplex manually to create multiplexed stream:
mplex -f 8 -o file.mpg file.m2v file.ac3
If it complains about stream overrun, check whether it was lying with mplayer. - That looked coarse. Try converting from AVI/Quicktime output according to How to author AVI -> DVD. No good: resulted in a green screen.
Writing to DVD media
cdrecord won’t do it. It will complain with the message "Data will not fit on any disk." Instead, use cdrecord-ProDVD (or cdrecord-wrapper.sh in the app-cdr/cdrecord-prodvd package).
cdrecord complains that my drive does not support track at once mode. Run it like this:
| Speed | Actual average speed |
| Maximum speed (12x) | 6.3x |
| speed=8 | 7.3x |
This guy has a utility which displays how many errors are encountered on a disc. Only works for recent Plextor drives (which I don’t have). It suggests that faster writing speeds produce more write errors; to generalize, writing at a drive’s maximum speed produces more errors. That was for a Plextor. Not sure how that relates to my drive, if at all. Plextors have a good reputation, though.
TV Tuner/Video Capture Cards
How To: Back up your DVDs in Ubuntu
I wrote a bash script to help you duplicate your DVDs. This may be illegal depending on where you live, but if you use your DVDs regularly you should have backups, to protect your investment. This script will backup the DVD to your hard disk, decrypt it, and create a directory structure that you can burn back to DVD-R. The following assumes that you are using Ubuntu, but I’ve run the script on both Libranet and Mandrake with only minor modifications (see comments within the script for hints.)
- Add universe and multiverse repositories to /etc/apt/sources.list (if you need help doing that, drop me a line via the comments below).
- On the command line: sudo apt-get install libdvdread3-dev mkisofs dvdbackup dvdauthor transcode libdvdcss2 (alternatively select all of the mentioned packages in synaptic, and install)
- Download streamanalyze (mirror) and streamdvd (mirror) from http://www.badabum.de/streamdvd.html
- tar -zxvf streamanalyze-0.4.tar.gz; cd StreamAnalyze; make; sudo make install
- tar -zxvf streamdvd-0.4.tar.gz; cd StreamDVD-0.4; make; sudo make install
- Download my script
- gunzip DVD-Duplicator.gz
- Now, some final configuration is needed; first, you need to work out the file system and mount points of your dvd drive, if you don’t know them already.
- To do this, type: cat /etc/fstab; you should see a table which includes something like the following:
/dev/hda /media/cdrom0 .../dev/hdb /media/cdrom1 .../dev/hdc /media/cdrom2 ...
- Put a DVD into the dvd drive that you want the script to use
- It should automount; in gnome or kde you’ll see a prompt asking you what you want to do. Hit cancel, or ignore.
- To work out which is the drive in question, I did the following:
> ls /media/cdrom0> ls /media/cdrom1> ls /media/cdrom2AUDIO_TS JACKET_P VIDEO_TS
So, in my case, /media/cdrom2 is the drive, and (from the drive table that I got above) I can see that this refers to /dev/hdc filesystem.
- To do this, type: cat /etc/fstab; you should see a table which includes something like the following:
- Use your favorite text editor (vi, gedit, kate, whatever) and edit DVD-Duplicator; you’ll need to change DVDDEV and DVDDRIVE to whatever values you just discovered are appropriate for your system. Save.
- Now you’re ready to make some backups!
To use it, on the command line, type: ./DVD-Duplicator folder-name, where folder-name is the name of the directory that you want the dvd to be backed up to. The directory will be created if it doesn’t exist already. Example, you might type ./DVD-Duplicator thematrix. Once the script finishes, you can now use k3b (or your favorite dvd/cd burning program) to burn the dvd from the AUDIO_TS and VIDEO_TS directories that were created under the directory you specified. (Hint: the script can also generate an iso file for you to burn, if you have the hard disk space to spare; that way, you don’t have to worry about copying the files from AUDIO_TS and VIDEO_TS. To use the script in this way, you might type: ./DVD-Duplicator thematrix thematrix-iso.)




























Paulo Cesar Alvarado