Saturday, July 19, 2003
Audio/Visual Sync Manual Method
Captured an 18 minute clip (720x480 YUV2 PicVideo MJPEG Q19 48kHz stero audio no compression) and I'm getting some slip in the audio (it's just a touch ahead of the video by the end). Looking at my capture info file, I see that I did have some dropped frames, but also that the audio rate isn't quite exactly 48kHz:
Capture Stats
Frames Captured: 34039
Frames Dropped1: 0
Frames Dropped2: 10
Time : 00:18:56
Time Left: 01:02:58
Free Space: 11,895,775,232
Video Bytes: 3,359,814,888
Audio Bytes: 218,194,216
Total Bytes: 3,578,009,104
Video Bytes Sec: 2,956,279
Audio Bytes Sec: 191,987
Total Bytes Sec: 3,148,267
Video Compression: 7.003
Video Rate: 29.976161
Audio Rate: 48003.631317 (0.00756%)
AV Diff: 0.000130
AV Adjust: 0.000000
AV Actual: 0.000000
According to VDub, the video is 1136.146 sec in length, so an estimate that I need to make the audio track 0.00756% longer results in adding 85ms to the length of the audio, making the length 1136.232 sec. The question is, is that going to be close enough of a guess for bigger tasks.
After testing with adding 150ms to the clip, which resulted in the audio lagging the video by a tiny amount, I re-stretched using the 86ms number (1136.232) which should put the stetch spot-on. So using the Audio Rate number as a quick-n-dirty calculation seems to work well (going to try a longer clip and see).
posted by Wuphon's at
12:07 PM
Friday, July 18, 2003
Roxio DVD Creator
Word on the forums is that it (a) re-encodes the video files that you give it and (b) encodes those files at the top-end rate / highest quality bitrate which is 70Mb/min. That means you only get around 70 min of video on a Roxio created DVD-R. Sooo... I'll probably muck with it as a starting point, then switch to TMPGEnc or something else (supposedly, it's possible to build DVDs in a more manual fashion.
Update: Created a quick-n-dirty DVD-RW disk using the Roxio software... not bad results. The only thing I don't like about the software so far is that you can't set your bitrates for your clips (which limits you to ~70min). As expected, the disc didn't work on my old Toshiba DVD (SD-2109) player, but works fine on the newer Sony DVD player. The Toshiba DVD player is pretty old, so it doesn't surprise me much (I should look and see if there is fixes or updates).
posted by Wuphon's at
11:09 PM
Audio/Visual Sync
Well, I'm bugged with the A/V sync issue, that and a 1/1000 dropped frames problem. The dropping 1 in 1000 frames is bugging me because I had gotten to the point where I was getting only 1 in 5000 dropped frames. Virtual VCR offers a dynamic audio resync option, but that drives my frame rate lost up to 1 in 100 (ewwww). Gotta solve the frame drop problem first (yes, I've turned off the AntiVirus software and other background software).
Setup:
Asus A7V266E Motherboard
Athlon XP 1800+ CPU
512Mb PC2100 RAM
FastTrak100 RAID (built-in to motherboard)
(2) IBM DeskStar 7200rpm ATA/100 75Gb drives
(1) IBM DeskStar 7200rpm ATA/100 40Gb drive
ATI All-In-Wonder Radeon 32Mb AGP
Santa Cruz PCI Soundcard
Adaptec AUA-3100LP USB2 PCI controller
(2) 60Gb USB 2.0 drives
The O/S (Windows 2000) is installed on the 75Gb RAID1 mirror. The (2) 60Gb USB 2.0 drives are used to store video captures that I've not yet started to process (or am in the middle of processing). Video capture was being done to the 75Gb RAID1 drive (defragged and mostly empty) but I'm thinking this might be the cause of dropped frames (even though the drive is well within it's performance abilities).
So I dropped the 7200rpm 40Gb drive in, hooked up to the ATA/100 interface on the motherboard. Makes a big difference (not that the Promise FastTrak100 was ever a slouch when it comes to performance) in dropped frames. 0 for 5000 at 3 minutes into a capture instead of my usual 5-25 dropped frames - and that's at 720x480 YUV2 PicVideo MJPEG Q19 (2.6Mb/sec or so).
So... since I got zero dropped frames on a 3 min capture by writing to the 40Gb scratch drive, I went back and turned on A/V sync (dynamic mode) in Virtual VCR. That means that Virtual VCR will add audio samples to the audio stream to make the two match up. That's giving me zero dropped frames as well (low-key woot) so I'm going to go re-cap that 1 hour set of cartoons (VHS tape in LP mode, rather poor source material) and see if the audio stays sync'd up.
Assuming that issue is finally put to bed (I'm 0 for 14,000 frames currently) and the dynamic A/V sync works, my next step is to do a quick-n-dirty transfer to DVD using EasyCD Creator6.
FYI, 54 minutes into a cap now (97,000 frames) with zero dropped. Audio sync problem is fixed, but introduces another problem - "pops" in the audio stream.
posted by Wuphon's at
9:07 PM
Thursday, July 17, 2003
DVD Creation
In addition to Doom9 there's also a site called DVDRHelp.com / VCDHelp.com which has guides and FAQs on creating VCDs, SVCDs and DVD-Rs. There's also this article over on DVD-HQ which discusses using TMPGEnc on the back end when creating the MPEG2 files for placing onto the DVDs.
'course, the only thing I've figured out for sure so far is to capture at 720x480 with 48kHz audio... that gives me the most options. Ordered Roxio's EasyCD Creator 6 which has a DVD creation module, so we'll figure that out this weekend.
posted by Wuphon's at
9:59 PM
PicVideo MJPEG
From the Virtual VCR help forums I found this table of capture sizes by jamesp. These are 1 minute captures, 720x480, 30fps 48kHz audio:
Uncompressed - 956Mb
Huffyuv - 502Mb
MJPEG Q20 - 416Mb
MJPEG Q19 - 164Mb
MJPEG Q18 - 101Mb
MJPEG Q17 - 75Mb
The MJPEG numbers are using the PicVideo MJPEG compressor at various quality settings (Q20 is the highest quality). Most folks encode using Q18 (long movies) or Q19 (near perfect quality). Using these figures, those 10Gb caps that I did yesterday would have only been 3.3 Gb at Q19 (3x smaller then Huffyuv).
My current planned workflow for converting old VHS recordings to DVD is to shoot for the 352x240 MPEG2 DVD format as an initial target (supposedly it's a valid resolution for DVD). Most of the VHS stuff that I have is pretty noisy and won't be worth trying for 720x480. Got a bit more to figure out before I get there though.
640x480, YUV2, no audio compression, PicVideo MJPEG at Q19 resulted in 2.5Mb/sec and rare dropped frames (1 in 4000 or so). CPU utilization was a modest 25%. That's a pretty decent performance and space savings for $28. Heck, I may go for 720x480 at the capture stage to give me the option to go to DVD 720x480 on the end.
posted by Wuphon's at
12:26 PM
Wednesday, July 16, 2003
Capture Stuff
Doom9 Capture Guide
NTSC frame rate is 29.97, but VirtualDub has to have it set to 29.9697 due to some sort of rounding error (my guess, the source wasn't real specific as to the why and wherefore).
Trying out the Virtual VCR product combined with Huffyuv v2.1.1 (I'll dig up links for those later). Reason I'm using Virtual VCR is that the All-In-Wonder Radeon card doesn't have Video for Windows (VfW) drivers, instead it has WDM drivers (which VirtualDub won't use).
Attempting to capture 640x480 YUV2 29.97 fps using the Huffyuv v2.1.1 (predict median best). Audio was 16 bit 44Khz stereo, packed to Microsoft ADPCM 44Khz stero. CPU usage was 52%, but disk rate was 6.5Mb/sec or so which resulted in rougly 0.5% dropped frames.
Tried again at 352x240 YUV2 29.97 fps, Huffyuv v2.1.1 (predict median best), 44.1Khz 16bit stereo audio, Microsoft ADPCM 44.1Khz stereo. While the data rate dropped to 2Mb/sec, and CPU usage was only 27%, I still saw about 1% dropped frames (DirectShow reports 0 dropped frames, but Virtual VCR is able to detect dropped frames and displays that as Dropped 2 numbers).
352x240 YUV2 29.97 fps, no compression on audio or video results in a clean capture at 5Mb/sec with 35% CPU. Of course, that means 20Gb per hour of video which makes for some fun storage issues.
Supposedly, PicVideo's Motion JPEG format ($28 for personal use) is a good capture codec with good performance (they say 640x480 30fps is possible on a PentiumII, so my Athlon XP1800+ should be fine).
352x240 YUV2 29.97 fps, huffyuv 2.1.1, but this time with no audio compression resulted in a clean capture at 27% CPU and 2Mb/sec.
640x480 YUV2 29.97 fps, huffyuv, no audio compression results in 52% CPU and 7Mb/sec with 1 or 2 dropped frames per 1000 (shrug, luck of the draw). 7Mb/sec is easily doable by the hard drives that I have (Promise FastTrak100 RAID1 7200rpm) since IIRC their top tested speed was around 10-12 Mb/sec writing. However, old style AVI files are limited to 2Gb which is 4.5 min or so at 7Mb/sec. But, supposedly, VirtualDub can handle AVIs larger then 2Gb (report is that 48Gb is the practical limit though according to the author). FYI, a 24 min capture at 7Mb/sec is a 10Gb file (wheee).
posted by Wuphon's at
11:44 PM
Monday, July 14, 2003
ATI All-In-Wonder MPEG2
Well, somehow I seem to have hit on a setting in ATI TV that actually produces a standard MPEG2 capture file... VGA Capture captures at 6Mbps 640x480 (3:2 pull down is off, de-interlacing is on). Which is fine for what I want (mainly because MPEG2 is better then MPEG1 for me). At 6Mbps (45Mb/min) that gives me 15 min on a CD-R or 99 min on a DVD-R. Or I can scale down to 4Mbps (30Mb/min) and get 23 min on a CD-R or almost 2.5 hours on a DVD-R.
Not bad, not bad... looks like I'll finally be digitizing all of my old VCR tapes. Regular shows look fine at 4Mbps MPEG2 (might even try 3Mbps if I can find a setting), but cartoons require 6Mbps. I've also tried MPEG2 at 10Mbps, but lost 50% of the frames (I've heard of people using MPEG2 at 10-12Mbps as a good quality capture source).
OTOH, VirtualDub refuses to open the MPEG2 files... so I'm not quite there yet. (Update: From doing some searching on the error message "pack synchronization error" that VirtualDub coughs up, I don't think VirtualDub supports MPEG2...)
Other tidbits, folks are saying with MPEG4 you can get reasonable quality at 6Mb/min (0.8 Mbps?) which is around 2 hours on a CD-R. I'm just not sure if MPEG4 is going to be standard enough long-term... heck, I'd be happy with 60 min a CD-R or about 6 hours on a DVD-R (that's about 1.65Mbps).
(hmmm, time for another table, assuming fixed bit-rates... using variable bit rates will actually give you the possibilyt of more time per disk, check out doom9 for FAQs on that stuff). Anyway, here are my common target bitrates. To calculate megabytes per minute of video, just divide the Mbps by 8 and multiply by 60 - but I've put the numbers in parens. First minutes is for a 700Mb CD-R, second time is for a 4450Mb DVD-R.
6.0Mbps (45.0 Mb/min) = 15 min / 99 min
4.0Mbps (30.0 Mb/min) = 23 min / 2.5 hr
3.0Mbps (22.5 Mb/min) = 31 min / 3.3 hr
1.6Mbps (12.0 Mb/min) = 58 min / 6.2 hr
1.0Mbps (7.5 Mb/min) = 93 min / 9.9 hr
0.8Mbps (6.0 Mb/min) = 117 min / 12.4 hr
0.6 Mbps (4.5 Mb/min) = 155 min / 16.5 hr
I prefer not to encode below 0.6 Mbps because even with MPEG4, DivX, etc. the video quality just isn't up to standard (audio starts eating up a significant portion of your bitrate budget). 1.6Mbps is a nice rate for MPEG4 because it lets you fit a full season (usually 13 episodes) of 1/2 hr shows (usually 24 min after commercials are stripped) on a single DVD-R.
posted by Wuphon's at
1:46 PM
|
|