Hi - > From: Robert Kesterson <[EMAIL PROTECTED]> > I've been happily converting VHS tapes to DVD for archiving and everything > is coming out *great*. I just have two problems:
*only* two? :) > 1) I can't predict how big the result will be so I sometimes encode too > high a bitrate for a single DVD and have to do it over. This wouldn't be Hmmm, using the default "-q 8" has never resulted in a movie that wouldn't fit on a single DVD - most of the time, especially when coming from VHS, "-q 6" isn't even close to pushing the limits (so I move to "-q 4"). > 2) The process is horrifically slow. To encode a two-hour video takes > just about 24 hours on my Athlon XP 2100+, with very little else on the > machine. Yikes! Hmmm, I did two full length movies yesterday (one 79 minutes, the other 87 minutes) in about 16 hours yesterday (and that includes the 'makedvd' and burn time). What you really really need when running the denoiser is a dual cpu machine. I've found that 'yuvdenoise' will take up almost all of one cpu and the mpeg2enc process almost all of the 2nd cpu. It's fascinating to see a dual P4/Xeon system pegged for most of a day :) > So, my two questions, obviously, are (a) how can I know what's a good > bitrate to get the best quality and still fit two hours on a single DVD? > and (b) how can I speed this up without sacrificing quality? For ~2hrs you need to hold to about 5000Kb/s. If I remember the chart on the back of some brands of media the "HQ" (1hr) setting corresponds to ~10Mb/s, the "SP" (2hr) mode to 5Mb/s, and "LP" to about 3.5Mb/s > (NOTE: My source material for the moment is very clean -- original > purchased VHS tapes and home-recorded SVHS tapes.) still, VHS is such a low quality medium (inherently noisy) i would recommend using moderate ("-l 2"0 denoising. ALSO - you're not blacking out the crud that VCRs generate! Grab a frame with something like: smil2yuv -f 1 -o 5600 INPUT.dv | y4mtoppm > foo gimp foo zoom in and look at the edges (the left edge in particular) and the bottom. See all the headswitching and tape edge noise? That costs a ton of bits to encode. When I do a capture from VHS (via the Canopus box) I see that the 704 data pixels are not necessarily centered inside the 720 pixels of a DV frame. To fix that I use the utility 'y4mshift' (included in the cvs version of mjpegtools). Use the border capability of yuvdenoise: yuvdenoise -b 14,4,692,468 In my case, from a tape yesterday, I needed to shift the data 2 pixels to the right to create equal borders. The pipeline looks like this: smil2yuv -a foo.wav ../foo.smil | \ y4mshift -n 2 | \ yuvdenoise -S 0 -r 16 -t 5 -l 3 -b 14,4,692,468 | \ yuvscaler -M BICUBIC -I USE_704x476+8+0 -O SIZE_704x480 | \ bfr -b 10m | \ mpeg2enc -M 2 -f 8 -q 4 -4 2 -2 1 -N -o $N.m2v and the resulting movie came out around ~4000Kb/s which would be enough for ~2.5 hours I estimate. Yes, you're cropping 6 pixels from each edge and 8 from the bottom but those are trash - at least they are (especially the bottom 8) on every VHS tape I've ever dealt with. The (small) scaling done is to create equal top/bottom borders of 4 pixels each rather than 4 at top and 8 at the bottom - I doubt a ~1% scaling will be noticeable to the eye. You don't see the edges going black when playing on a TV due to TV sets overscanning - you'll see 'em when playing on a computer of course. Two other tips: 1) use 704x480 instead of 720x480 - saves ~2% of the size, and 2) use "-S 0" to the denoiser to avoid increasing the bitnoise which sharpening tends to add. For cleaner material (SVHS) reducing "-l 3" to "-l 2" or even "-l 1" might be possible. I've seen "-l 1" be quite effective with DV material (the very slight smoothing does wonders for the average bitrate!). Have Fun! Cheers, Steven Schultz [EMAIL PROTECTED] ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Mjpeg-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mjpeg-users