LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-27-2004, 03:58 PM   #1
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
render times with DVD::RIP


now that i finnaly am starting to figure out DVD::RIP, s-video for linux and a handful of other tools to make my media box more effective i have some questions for those who have used DVD:RIP to transcode their DVDs into single files vs the 30+ chapters you get when you rip a DVD to your HD.

i own several kids movies like shrek, finding nemo and so forth that my kids love to watch over and over and well. you get the point.. id love to keep the DVDs viewable as long as possible. so my goal is to put as many of them to HD as i can.

i am currently useing DVD::RIP to transcode shrek into an avi file with xdivx (think that is the codec i picked) and im already past 5hrs on this project and it looks like i have at least an other 5hrs to go...

without losing to much quality what can i do to speed things up?

system specs are roughly:

1.1G Athlon socketA (first gen t-bird)
1G pc133 ram
7200rpm HDs
debian sarge
kde
kaffeine
dvd::rip

if you need more let me know.

thanks for the help.
 
Old 10-27-2004, 04:11 PM   #2
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
If I remember your last post , you are using xvid. I also noticed dvd::rip is slow. If you have two computers you can easily use dvd::rips cluster mode to cut the time in half.

I think acidrip seems to do it a little faster, but you will need to install mplayer. I know you mentioned it cause major problems in a priotr instalation. It may have been a coincidence.
 
Old 10-27-2004, 04:27 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
hmmm ok... maybe i will talk to you even if you won't use acidrip.

divx quality can become a slightly complicated area. the more you go into encoding styles and such you find that there are totally different optimal settings for say, cartoons, compared to actino films, compared to slow drama's... all about color maps and dynamism of the images... but....

if it's not too abstract place to start, you want to look at things in terms of bits per pixel, i.e. how much data is on average given to each single dot of an image. for a decent divx you want to hit about 0.18 to 0.22 bits per pixel. this script below is from the MPLayer tools, and will tell you the bits per pixel for your intended image:
Code:
#!/usr/bin/perl -w

use POSIX;

sub round {
  my $v = shift;
  
  return floor($v + 0.5) != floor($v) ?
    floor($v + 0.5) :
    floor($v);
}

$raw_aspect = 720/576;

if (scalar(@ARGV) < 4) {
  print("Please provide a) the cropped but unscaled resolution (e.g. " .
        "716x524), b) the aspect ratio (either 4/3 or 16/9 for most DVDs), " .
        "c) the video bitrate in kbps (e.g. 800) and d) the movie's fps.\n");
  print("If your DVD is not encoded at 720x576 then change the \$raw_aspect" .
        "variable at the beginning of this script.\n");
  exit(1);
}

($unscaled_width, $unscaled_height) = split('x', $ARGV[0]);
$encoded_at = $ARGV[1];
if ($encoded_at =~ /\//) {
  my @a = split(/\//, $encoded_at);
  $encoded_at = $a[0] / $a[1];
}
$scaled_width = $unscaled_width * ($encoded_at / ($raw_aspect));
$scaled_height = $unscaled_height;
$picture_ar = $scaled_width / $scaled_height;
($bps, $fps) = @ARGV[2, 3];

printf("Prescaled picture: %dx%d, AR %.2f\n", $scaled_width, $scaled_height,
       $picture_ar);
for ($width = 720; $width >= 320; $width -= 16) {
  $height = 16 * round($width / $picture_ar / 16);
  $diff = round($width / $picture_ar - $height);
  $new_ar = $width / $height;
  $picture_ar_error = abs(100 - $picture_ar / $new_ar * 100);
  printf("${width}x${height}, diff % 3d, new AR %.2f, AR error %.2f%% " .
         "scale=%d:%d bpp: %.3f\n", $diff, $new_ar, $picture_ar_error, $width,
         $height, ($bps * 1000) / ($width * $height * $fps));
}
it's really useful. if you want to go that far. (of course.. my acidrip program calculates this on the fly for you... )

more simple point and shoot tips are probably what you're after though.... so ok... firstly make your image smaller. making your output say, 30% smalelr in both dimensions will probably double your encoding speed. and while on speed... FIVE HOURS?!?!?!?! christ, that's pathetic. you should be able to encode to AT LEAST realtime on a box like that. my XP2600+ could (before i blew it up) render high quality divx at upto 70 frames a second. Your experiences might come from a number of places though... and this is where you could seriosuly benefit from recompiling stuff for your system. Often rpm packages or whatever will be built for a lowest common denominator, whatever that is deemed to be, and consequently this often means leaving out support for chipset functions like sse, 3dnow and other extentions you have inside your tbird waiting to be let out. I once forgot to include these features, and after recompiling mplayer i did see my average fps plummet to abuot 10fps just from these features being ignored. normally you'll just maybe notice a small delay occasionally loading KDE etc... but video encoding is one place where the local optimizations really DO matter.

other "tip", which essentially still harks back to the BPP issue is the bitrate overall. logically the smalelr the X/Y values, the lower the bitrate. if you go higher, past say... 1000kbps for a 640x480 image, those bits will do nothing, divx will have no data to put in there... so bring that down a little bit too.

no disrespect to your kids also, but you can lower the quality substantially and they'll really never notice i expect. i'd say try encoding at erm... 320x240 at about 400kbps and it'll probably look great when it's scaled back up running full screen. a feature length cartoon is what... 80 mins? that would probably pop out the other end at about 450mb.

You also have lots of additional processing options.. all those.. it's your call if you think the results are worth it.
 
Old 10-27-2004, 05:22 PM   #4
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
ok ill try to figure out what you said there

here are some of the settings i am currently running and the speed it is rendering:

xvid with a vid frame rate of just under 24fps (23.976)

2-pass recording diamond is sunk in. dont know if that means it is selected or not.

no deinterlacing

video bitrate calculator
2x700MB
target size = 1400MB


if you need more ill get what you need. it is running at only 5.5fps currently. so very very slow.
 
Old 10-27-2004, 06:33 PM   #5
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
if its interlaces, think about delacing it ... (interlace gets ugly)

and encoding times for me are about 10-12 hours of computer time ... but i go a bit longer and use lavc (suposedly better quality, at least there more options for fine tuning)

for me its:
*crop out black border (use mplayers cropdetect to get crop numbers), copy audio, encode video using lavc for mpeg4 , vqmin=1 vqmax=1
*scale down image, choose -sws option (man pages say "2" is good quality, but theres lots of options), but keep aspect ratio close to original, and x,y must be a multiple of 16, again copy audio, and use lavc, mpeg4 , vqmin=1 vqmax=1 (need to encode video so filters take effect, vqmin/max setting of 1 makes sure the video is not compresses (compression uses 16x16 macro blocks, thus why we need a multiple of 16 for window size, so compressing now is a bad idea, just in case)
*OPTION STEP: apply video (if any) encasements (special effects), rip out audio to fix that, then put it back in, etc , etc, anything you want to add, heres the good spot, cause next we start compression
*encode audio, but not video (generate the frameno.avi file ..use frameno for -ovc)
*encode video with pass 1, vqmin=2 (3-4 means much lower file size, but at the expense you get a higher blocky effect, keep it at 1 if you want good very good quality, very very good), vqmax=31 (this is the standard default, it wont hurt quality, but will allow the file size to shrink), vbritrate (set this to whatever, recommendation for this value come from the previous encoding ... but 1000 or lower is still good, i know i don't notice a difference, but i don't know what to look for), v4mv mbd=2 trell cmp=3 subcmp=3 mbcmp=3 (these are supposed to increase quality .... at expense of computing time) ... copy audio, use "-o /dev/null" as this step is just to get a log file
*same as previous step, but this time set vpass=2, and output a audio file

.... guess its no wonder why it takes so long for me
 
Old 10-27-2004, 08:38 PM   #6
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
well it looks like it finished at about 8pm after roughly 8hrs. it started as an 8G set of vob files, and is not a 1G avi file.

ill check the quality when i get home and see how well it came out.
 
Old 10-27-2004, 10:00 PM   #7
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
1 gig avi file?,... that sounds pretty big, normally it would just be around 700mb (even thats a bit big for about 2 hours)
 
Old 10-27-2004, 11:11 PM   #8
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
Quote:
Originally posted by Lleb_KCir
well it looks like it finished at about 8pm after roughly 8hrs. it started as an 8G set of vob files, and is not a 1G avi file.

ill check the quality when i get home and see how well it came out.
are you compressing the whole dvd, or just the movie? The movies usually average 4 to 5 GB and the rest is usually only extras.
 
Old 10-28-2004, 12:18 AM   #9
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
well i did rip the entire DVD to HD and eneded up with the full 8G and IIRC 46 chapters. that is what i made the avi file out of, i did check it out and the quality was almost DVD quality, and more then good enough for the kids.
 
Old 10-28-2004, 04:43 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
2x700mb is just daft for Finding Nemo or whatever.

2pass encoding is possibly worth the while if you do want to wring out a little more quality in the same bitrate, but it will literally double the encoding time.

Seriously 8 hours is obscene. you should not be happy with enything less that real time encoding (exluding the doubling of time for 2 pass of course as *EVERYTHING* will bacislly be done twice.)

also you're ripping from dvd seperately to the encoding?? that's a real waste of time. you should be able to go straight from a dvd title on disc to a finished avi file with no writing inbetween. Acidrip can do this, i'm sure dvd::rip can too.
 
Old 10-28-2004, 05:25 AM   #11
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
2pass=no, clip and zoom- use small and fast resize-be sure to click apply preset values after selecting it, and video codec- use ffmpeg, target size 700 megs.

and acidrip is a lot faster.

Last edited by whansard; 10-28-2004 at 06:04 AM.
 
Old 10-28-2004, 03:31 PM   #12
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
i think i found a portion of the problem. the last thing i had to do to get my media box working (this system we are talking about) we recompile my kernel for the SIS5513 MB chipset. then i had to hdparm -d /dev/hdc /dev/hdd (my cdrom and dvd player), but it looks like we forgot to hit hda and hdb. i did that last night after Shrek finished.

about 15min ago i started ripping Nemo to HD directly from the DVD in vob chapter form. i am now ripping at roughly 250fps.

after this is done, ill check and see what kind of fps i can get when i transcode it to avi.

*crosses fingers* that this was the issue all along.
 
Old 10-28-2004, 05:59 PM   #13
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
i am now in the proccess of transcoding nemo into an avi at roughly 4x the fps that i was yesterday...

so im thinking that the DMA was a large portion of the slow speed i had yesterday.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DVD AVI rip to DVD mooreted Mandriva 4 02-20-2005 08:57 AM
Dvd::rip ??? Lleb_KCir Linux - Software 14 10-28-2004 01:01 AM
DVD::Rip and Burning to DVD lapthorn Linux - Software 4 10-19-2004 01:19 PM
DVD::RIP help please Giallo998 Linux - Software 3 11-25-2003 12:28 PM
Can't rip DVDs with dvd::rip Hammett Linux - Software 2 10-27-2003 08:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration