Jump to content

Backup DVD to CD, is it possible?


boatman9
 Share

Recommended Posts

I think you'll probably find it hard trying to shrink 4.2GB to 700MB. What is the actual content on the disks in terms of file types? Some files can compress easily, others not. Any compressed files, if you try to compress them again, they actually get bigger!

Link to comment
Share on other sites

you'd have to split it, but it'd be ugly, and use up a lot of CD-Rs. There is no compression that can do what you want.

 

DVD burners are pretty cheap -- any attempt at splitting is going to take a lot of time and CD-Rs. If you've got a desktop, it might be better to just get a dvd burner.

Link to comment
Share on other sites

Reducing the resulution is indeed a good idea; it won't be linear though (4 times less pixels won't give 4 times smaller files). It would help to know how the DVD is organized, apart from menus and such: is it one main film, or several films of equal importance?

And: is it multi-lingual? If it is, do you intend to keep one language only or all?

 

If I remember correctly, there's a command line tool called "lsdvd" that might give us usefull info.

 

Yves.

Edited by theYinYeti
Link to comment
Share on other sites

The lsdvd command gave the following details:

 

Title: 01, Length: 00:27:40.186 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 01

Title: 02, Length: 00:27:41.176 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 01

Title: 03, Length: 00:27:43.000 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 01

Title: 04, Length: 00:27:43.020 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 01

 

Subpicture is the subtitles that I would like to keep, and it's ok if they become merged into the main video so they are always visible.

 

 

I mounted the iso image of the DVD, here is a list of the files names and thier sizes.

 

-r-xr-xr-x 1 root	  12288 2007-07-30 13:56 video_ts.bup
-r-xr-xr-x 1 root	  12288 2007-07-30 13:56 video_ts.ifo
-r-xr-xr-x 1 root	   8192 2007-07-30 13:56 video_ts.vob
-r-xr-xr-x 1 root	 102400 2007-07-30 13:56 vts_01_0.bup
-r-xr-xr-x 1 root	 102400 2007-07-30 13:56 vts_01_0.ifo
-r-xr-xr-x 1 root	 290816 2007-07-30 13:56 vts_01_0.vob
-r-xr-xr-x 1 root 1073475584 2007-07-30 13:59 vts_01_1.vob
-r-xr-xr-x 1 root 1073666048 2007-07-30 14:03 vts_01_2.vob
-r-xr-xr-x 1 root 1073649664 2007-07-30 14:06 vts_01_3.vob
-r-xr-xr-x 1 root  997795840 2007-07-30 14:08 vts_01_4.vob

I used cmp to learn that the .bup files are identical to the .ifo files of the same name.

 

I used ffmpeg to find the following details on the last vob file:

Input #0, mpeg, from 'vts_01_4.vob':

Duration: 00:26:20.1, start: 84.280633, bitrate: 5051 kb/s

Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 6800 kb/s, 29.97 fps®

Stream #0.1[0x80]: Audio: ac3, 48000 Hz, stereo, 224 kb/s

 

 

By the way, lsdvd also gave this message, which I do not understand:

*** Zero check failed in ifo_read.c:432

for vmgi_mat->zero_3 = 0x00000000010000000000000000000000000000

Edited by boatman9
Link to comment
Share on other sites

You simply don't have a DVD descrambler (libdvdcss or whatever) installed... get one.

I loaded libdvdcss2 when I first installed 2008.0, and the DVD plays well. There must be another reason for the error message. It doesn't seem to be causing any problem, I was just curious about it.

Link to comment
Share on other sites

OK. So you have 4 films of about 30min each, which amounts to 2 hours in total. And you want to keep the subtitles.

 

From my experience, 2 hours are easy to fit on a single CD using ISO MPEG4 (an AVI file; I use mencoder). Else you may use the SVCD format (thus enabling reading in any DVD player), but 2 hours is the maximum length I ever fit on a CD with this format; it all depends on how well compression goes. Either way, you'll have to do a 2-pass compression.

 

So, you have several options:

- Either you create a SVCD with standard SVCD subtitles (you'll have to be lucky for all to fit on a CD).

- Or you create 4 standard ISO MPEG4 files (readable on any computer), with accompanying text files for the subtitles.

- Or you merge the subtitles into the films, and create the videos this way.

 

Besides, there's another possibility I have less experience with:

- Create DivX-compliant videos, thus enabling reading in DivX-capable DVD players.

 

I have to leave; I'll be back...

 

Yves.

Link to comment
Share on other sites

I have very little experience with subtitles, but you should find what you need here:

http://www.linux.com/feature/125978

 

For converting, this is my bible:

http://www.mplayerhq.hu/DOCS/HTML-single/en/MPlayer.html

 

Based on this doc and mplayer man-page, here is for example a two-pass conversion from DVD to SVCD using mencoder, downmixing 5.1 sound to 2.0 (normal stereo), selecting the French audio channel, and saving the French subtitles:

(actually 2 lines, but each is split for better readability and explanations)

 

mencoder -mc 0 dvd://1

-alang fr -af pan=2:1:0:0:1:1:0:0:1:0.5:0.5:1:1

-vf crop=640:576:40:0,scale=480:448,expand=480:576:0:64,harddup

-of mpeg -mpegopts format=xsvcd:vaspect=4/3

-ovc lavc -lavcopts vcodec=mpeg2video:vpass=1:turbo:aspect=4/3:vrc_buf_size=917:vrc_maxrate=2500:vbitrate=1000:keyint=15:trell:mbd=2:cmp=2:su

bcmp=2

-oac twolame -twolameopts br=64

-ofps 25 -o /dev/null

 

mencoder -mc 0 dvd://1

-alang fr -af pan=2:1:0:0:1:1:0:0:1:0.5:0.5:1:1

-slang fr -vobsubout subtitles

-vf crop=640:576:40:0,scale=480:448,expand=480:576:0:64,harddup

-of mpeg -mpegopts format=xsvcd:vaspect=4/3

-ovc lavc -lavcopts vcodec=mpeg2video:vpass=2:aspect=4/3:vrc_buf_size=917:vrc_maxrate=2500:vbitrate=1000:keyint=15:trell:mbd=2:cmp=2:su

bcmp=2

-oac twolame -twolameopts br=64

-ofps 25 -o output.mpg

 

The brown part is simply mencoder invocation, telling it not to try and be smart (-mc 0), because we know the source is of good quality, and telling it to read the 1st DVD track, as shown by lsdvd. In dark green is the audio selection and down-mixing. With the second pass only (on the first pass it would be CPU spent for nothing), you add the saving of the subtitles (dark blue). In orange are some filters for the video: 1/ crop, that is remove black borders; 2/ scale to the SVCD imposed (strange) ratio; 3/ expand, that is add black borders to fit the SVCD imposed image dimension; 4/ harddup is there for better reliability. The cropped dimension must be carefully chosen so that:

- the useless part of the picture is removed,

- the cropped width and height are even,

- the scaled width and height (non-aggressive numbers rounding is acceptable), are multiple of 16,

- ...without removing too much in the first step... not always easy.

Then the expand part is done so that a multiple of 16 pixels of black border is added on top and on bottom (may need to be un-balanced).

 

Down to the orange line, you specify what you want, and how you transform it in memory, before actual storage.

Then comes the red line that says that you want the SVCD variety of the MPEG container, in 4/3 (only 4/3 and 16/9 are allowed for MPEG). Here the conversion and encoding begin.

 

The pink line is a combination of the SVCD constraints and optimum codec parameters for my input (anime), all found in the documentation. Just notice the part in bold that is different in pass1 and pass2 of the encoding.

The part in light green specifies a SVCD-compatible audio output (MP2)

 

And finally (light blue), you tell mencoder in which file to store the resulting video, and at which frame-rate. Notice (in bold) that in the first pass, you do not store the result, because it is useless (only the computed statistics are usefull).

 

Yves.

Link to comment
Share on other sites

For completeness, here are the two encoding lines I used recently for encoding a movie I recorded from TV:

 

mencoder -mc 0 record.avi -edl record.edl -endpos 1:34:10.60 -vf crop=368:208:8:40,pp=ha/va/dr,hqdn3d,harddup -ovc lavc -lavcopts aspect=1.76923:vbitrate=927:vcodec=mpeg4:vpass=1:turbo:dia=3:cmp=3:subcmp=3:last_pred=2:trell:mbd=2:v4mv -oac mp3lame -lameopts vbr=3:br=64:q=0:aq=0 -ofps 25 -o /dev/null

 

mencoder -mc 0 record.avi -edl record.edl -endpos 1:34:10.60 -vf crop=368:208:8:40,pp=ha/va/dr,hqdn3d,harddup -ovc lavc -lavcopts aspect=1.76923:vbitrate=927:vcodec=mpeg4:vpass=2:dia=3:cmp=3:subcmp=3:last_pred=2:trell:mbd=2:v4mv -oac mp3lame -lameopts vbr=3:br=64:q=0:aq=0 -ofps 25 -o usual_suspects.avi

 

That's for an AVI container (no constraint and any aspect allowed, not only 4/3 and 16/9), but the video inside is ISO MPEG4. This time it is not anime so the optimal parameters (part in bold) are not the same (again, see the doc).

 

In last post, I forgot one important point: how to compute the vbitrate.

Let's take your case: a 28min video. You want to fit 4 such videos on a CD (roughly 700000 kB), so each will have 175000 kB available (and remember a byte (B ) is 8 bits (b )).

Let's assume 64kbps for sound (as in example above) is OK for you (it's not perfect sound, but considering it is VBR -variable bitrate- and MP3, it is not that bad).

You have 175000*8 kbits available, for a 28*60=1680 seconds of film. Then you have (175000*8/1680)-64 kbits available for the video; hence your vbitrate would be 769.

 

Don't worry, that's a good vbitrate, especially considering your source is of DVD quality. I have encoded recordings from TV with vbitrates ranging from 550 to 1000+, and that's with mediocre input quality.

 

Yves.

Edited by theYinYeti
Link to comment
Share on other sites

Hi Yves,

 

Thanks for all those excellent details you supplied. I have not yet tried your methods because I was busy trying to use a script called "mencvcd" which can supposedly reduce a DVD to a VCD or SVCD. This script can be found here: http://svn.mplayerhq.hu/mplayer/trunk/TOOLS/mencvcd

 

I ran the script on my ISO file of the DVD (movie.iso). I used the following command line:

mencvcd movie movie.iso -noburn -vfr 4 -vnorm n

 

The mencvcd script ran for almost 3 hours, but did not complete due to some kind of error, message copied below.

mplex: invalid option -- m

 

All I got so far is two files:

movie.mpa - 186300708 bytes

movie.mpv - 156966627 bytes

 

One file is the audio and one file is the video. I guess this is where the process stopped. I had expected to get an ISO file suitable for burning to a CD at a later time. If anyone has successfully used the mencvcd script I would to know details. Now, on to try some of the previously posted methods.

 

Edit: I found some details about this error in a posting which I have condensed below.

 

Fri Dec 12 17:29:38 2003

Subject: [MPlayer-users] About mencvcd

 

On Fri, Dec 12, 2003 at 03:59:57PM +0100, someone wrote:

>

> I'm trying to make a vcd with mencvcd but it returns a mplex error:

>

> mplex: invalid option -- m

>

> Anybody knows where is the problem???

 

It seems that the latest mplex versions does not support the -m

option anymore. (I am running mjpegtools mplex-2 version 1.6.1.92 (2.2.3)).

 

Just edit the mencvcd shell script and remove the -m option from

the mplex command line. It is written in the definition of the

mplexnorm variable (lines 213 and 335). Just the option (together

with its argument).

Edited by boatman9
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...