commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
For DVD: dd if=/dev/cdrom of=cd.iso
An easy method to generate ISOs from CD/DVD media.
Alternative, imho better, using the concat protocol
This command works at least in 9.04+
To rip DVD movie to ogg format using ffmpeg, follow these steps.
1) find the vob files on the mounted video DVD in VIDEO_TS that stores the movie itself. There would be a few other VOB files that stores splash screen or special features, the vob files for the movie itself can be identified by its superior size. You can verify these vob files by playing them directly with a player (e.g. mplayer)
2) concatenate all such vob files, pipe to ffmpeg
3) calculate the video size and crop size. The ogg video size must be multiple of 16 on both width and height, this is inherit limitation of theora codec. In my case I took 512x384.
The -vcodec parameter is necessary because ffmpeg doesn't support theora by itself. -acodec is necessary otherwise ffmpeg uses flac by default.
Rips DVD to lossless encoded video file. Reencodes audio to CBR MP3 for correct audio to video syncing. Be sure to have enough free disk space.
Rip DVD to YouTube ready AVI file, using MPEG-4 video codec and MP3 audio codec. Resizes to 320x240 and deinterlaces as needed.
You can use this to directly dump from machine A (with dvd drive) to machine B (without dvd drive) . I used this to copy dvd using my friend's machine to my netbook. Above command is to be issued on machine B.
1) No wasting time dumping first to machine A and then copying to Machine B.
2) You dont need to use space on Machine A. In fact, this will work even when Machine A doesnt have enough hdd space to dump the DVD.
Use -C ssh option on slow networks (enables compression).
you can replace "dd if=/dev/dvd" with any ripping command as long as it spews the iso to stdout.
A dear friend of mine asked me how do I copy a DVD to your hard drive? If you want to make a copy of the ISO image that was burned to a CD or DVD, insert that medium into your CD/DVD drive and (assuming /dev/cdrom is associated with your computer?s CD drive) type the following command
Substitute whatever track number you want into the "dvd://1" parameter. The "-aid 128" is to select the English language.