Showing posts with label DVD. Show all posts
Showing posts with label DVD. Show all posts

Wednesday, January 9, 2013

Rip, copy a CD/DVD to ISO format.

Rip a CD/DVD to ISO format.

$ dd if=/dev/cdrom of=~/cdrom_image.iso

Rip a CD/DVD to ISO format.
An easy method to generate ISOs from CD/DVD media.

Alternatives

There are 2 alternatives

$ readom dev=/dev/scd0 f=/path/to/image.iso

Create a CD/DVD ISO image from disk.
Many like to use 'dd' for creating CD/DVD iso images. This is bad. Very bad. The reason this is, is 'dd' doesn't have any built-in error checking. So, you don't know if you got all the bits or not. As such, it is not the right tool for the job. Instead, 'reaom' (read optical media) from the wodim package is what you should be using. It has built-in error checking. Similarly, if you want to burn your newly creating ISO, stay away from 'dd', and use:

wodim -v -eject /path/to/image.iso
$ readcd dev= f=foo.iso

The only problem here is that there is no error checking or correction. The cdrecord package includes a command line tool called readcd that rips CDs to iso files quite nicely
 

Monday, November 17, 2008

Linux Create / convert AVI file to DVD format ~ Create video DVDs

Create DVD from command line

Following tools get installed with devede:

  1. mencoder : MPlayer’s Movie Encoder) is a simple movie encoder
  2. ffmpeg : FFmpeg video converter
  3. dvdauthor : assembles multiple mpeg program streams into a suitable DVD filesystem

So if you are a pro command line user, type the following commands to convert file1.avi fille2.avi to DVD format (if you are not comfortable with command line use devede GUI software and just skip following commands) :


$ cat file1.avi file2.avi > ccmovie.avi


Now run movie encoder to create out.avi from ccmovie.avi (option -ovc and -oac sets no encoding, just streamcopy)


$ mencoder -o out.avi -noidx -oac copy -ovc copy ccmovie.avi


Next run FFmpeg video converter to set aspect ratio, ntsc dvd television standard etc:


$ ffmpeg -i out.avi -y -target ntsc-dvd -sameq -aspect 16:9 out.mpg


At a high level, a DVD is a collection of menus and titles. Conceptually, a menu contains buttons which can be assigned actions and provides a list of choices to the end user, while a title contains the main content of the DVD. However, in reality many of the features available in menus (including buttons, pausing, and looping) are also available in titles. Use dvdauthor assembles multiple mpeg program streams into a suitable DVD filesystem. You should see DVD filesytem in dvd directory:


$ dvdauthor --title -o dvd -f out.mpg


Creates the table of contents file instead of a titleset:

$ dvdauthor -o dvd -T


Create dvd.iso:

$ mkisofs -dvd-video -o dvd.iso dvd/


Burn dvd.iso to DVD disk:



$
growisofs -dvd-compat -dvd-video -speed=4 -Z /dev/dvdrw=dvd.iso

Using MEncoder to create VCD/SVCD/DVD-compliant files:

This section shows some complete commands for creating VCD/SVCD/DVD compliant videos.

1. PAL DVD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
-vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=15:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 \
-o movie.mpg movie.avi

2. NTSC DVD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
-vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 \
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=18:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 30000/1001 \
-o movie.mpg movie.avi

3. PAL AVI Containing AC-3 Audio to DVD

If the source already has AC-3 audio, use -oac copy instead of re-encoding it.

mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
-vf scale=720:576,harddup -ofps 25 \
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=15:vstrict=0:aspect=16/9 -o movie.mpg movie.avi

4. NTSC AVI Containing AC-3 Audio to DVD

If the source already has AC-3 audio, and is NTSC @ 24000/1001 fps:

mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf:telecine \
-vf scale=720:480,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:\
vrc_maxrate=9800:vbitrate=5000:keyint=15:vstrict=0:aspect=16/9 -ofps 24000/1001 \
-o movie.mpg movie.avi

5. PAL SVCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \
scale=480:576,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg2video:mbd=2:keyint=15:vrc_buf_size=917:vrc_minrate=600:\
vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 25 \
-o movie.mpg movie.avi

6. NTSC SVCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd  -vf \
scale=480:480,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg2video:mbd=2:keyint=18:vrc_buf_size=917:vrc_minrate=600:\
vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 30000/1001 \
-o movie.mpg movie.avi

7. PAL VCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:\
vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 \
-o movie.mpg movie.avi

8. NTSC VCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:\
vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 30000/1001 \
-o movie.mpg movie.avi

Using MEncoder to create VCD/SVCD/DVD-compliant files:

This section shows some complete commands for creating VCD/SVCD/DVD compliant videos.

1. PAL DVD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
-vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=15:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 \
-o movie.mpg movie.avi

2. NTSC DVD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
-vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 \
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=18:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 30000/1001 \
-o movie.mpg movie.avi

3. PAL AVI Containing AC-3 Audio to DVD

If the source already has AC-3 audio, use -oac copy instead of re-encoding it.

mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
-vf scale=720:576,harddup -ofps 25 \
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=15:vstrict=0:aspect=16/9 -o movie.mpg movie.avi

4. NTSC AVI Containing AC-3 Audio to DVD

If the source already has AC-3 audio, and is NTSC @ 24000/1001 fps:

mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf:telecine \
-vf scale=720:480,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:\
vrc_maxrate=9800:vbitrate=5000:keyint=15:vstrict=0:aspect=16/9 -ofps 24000/1001 \
-o movie.mpg movie.avi

5. PAL SVCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \
scale=480:576,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg2video:mbd=2:keyint=15:vrc_buf_size=917:vrc_minrate=600:\
vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 25 \
-o movie.mpg movie.avi

6. NTSC SVCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd  -vf \
scale=480:480,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg2video:mbd=2:keyint=18:vrc_buf_size=917:vrc_minrate=600:\
vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 30000/1001 \
-o movie.mpg movie.avi

7. PAL VCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:\
vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 \
-o movie.mpg movie.avi

8. NTSC VCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:\
vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 30000/1001 \
-o movie.mpg movie.avi