Thursday, July 26, 2007

Notes Video Capture

Notes Video Capture
===================

See also NotesDVD

Contents
=========
Abstract
Capture Video via Virtual Dub
Experiment with Virtual Dub - Video Compression
Compress AVI (video and audio uncompressed) using Virtual DUB.
VirtualDub with DivX

VirtualDub filters plugins
VirtualDub MPEG2 codecs
How to Improve Video Capture Quality


Abstract
==========
These instructions uses
- Virtual Dub
- DivX codec
- mp3 codec
- video capture / tv tuner card

Video capture is done from miniDV camcorder into *.avi file using Virtual Dub.
The second stage compresses the *.avi file into another *.avi file.
Note between the two *.avi processes, an intermediate process is required to extract the sound from the first avi file into a separate wav file.


Capture Video via Virtual Dub
================================
1. Connect AV cable on Canon to COMPOSITE on TV card, yellow-video, red/white-audio

Do NOT
2. Switch on TV View program.
3. Select Video Source on TView program (select until display on PC screen)


DO:
2. Open Virtual Dub
3. File -> Capture AVI (to go to capture mode)
3.5 Video -> Video source -> Video Composite
4. Device -> Conexant Capture
5. File -> Set Capture File (give a filename)
6. Video -> Compression
Cinepak Codec = 6.6:1
Indeo Video 5.1 = 10:1
(Experiment with Virtual Dub - Video Compression)



Experiment with Virtual Dub - Video Compression
=================================================
Set the following:
- Capture - "Hidden display while capture", 29.97 fps
- Video - "Noise reduction enable", "Enable RGB filtering"
- Audio - MP3, 48kBit, 22kHz
- Record Duration about 20s

Uncompressed RGB YUV = 95.977MB
Cinepak Codec = 1.842MB
Indeo 5.1 = 2.734MB
Indeo 3.2 = 7.197MB
Indeo 4.5 = 2.591MB
Intel YUV = 55.044MB
MS Video1 = 41.639MB

MSVideo - Smoothest picture with smallest filesize

Audio better is using:
1) Raw (no compression)
2) Windows Recording Line Volume = 38%, better than higher volume.

Video - choose either
1) Intel YUV (better compression with DivX)
2) MS Video1


Compress AVI (video and audio uncompressed) using Virtual DUB.
===============================================================
1. Exit the capture mode from previous process
2. Open and select the *.avi file which contain the video and uncompressed audio from previous video capture process.
3. Audio - Source Audio, Full processing mode, Compression (mp3, 48kBit, 22kHz)
4. File -> "Save WAV ..." as MP3 - this process strips the sound from the previous *.avi file into a separate *.wav file.
5. Audio -> Audio From Other File - Select the file that was saved.
6. Video -> Full Processing Mode - Compression (DivX, High Quality)
for Good quality DivX, try
6.5 Audio -> Interleaving - adjust by testing if video out of sync with audio
7.File -> Save as AVI -> this will combine the video from the previous *avi and the newly saved *.wav file to produce a compressed DivX, MP3 *.avi file.
In terms of size, continuing from the experiment, the now compressed files have the following sizes:
IntelYUV_mp3 55.044MB -> 2.046MB
IntelYUV_raw audio 38%Vol 55.416MB -> 1.867MB
MSVideo1 raw audio 40.452MB -> 1.879MB
MSVideo1 raw audio 38%Vol 44.390MB -> 5.443MB


VirtualDub with DivX
======================
1. From the main Menu -> Video -> Compression -> DivX Codex -> Configure
2. In the DivX Codec Properties -> Main -> Profile = "High Definiion Profile" -> Rate Control = "1 Pass" -> Bitrate = 1500 kbps
Fairly good quality vs size -> Profile = "1080HD Profile" -> Encoding Presets = 8 -> Rate Control = "1 Pass" -> Bitrate = 3000 kbps



VirtualDub with DivX
======================
1. From the main Menu -> Video -> Compression -> DivX Codex -> Configure
2. In the DivX Codec Properties -> Main -> Profile = "High Definiion Profile" -> Rate Control = "1 Pass" -> Bitrate = 1500 kbps
      Fairly good quality vs size       -> Profile = "1080HD Profile" -> Encoding Presets = 8 -> Rate Control = "1 Pass" -> Bitrate = 3000 kbps


VirtualDub filters plugins
============================
Filter pack from Dee Mon:
http://www.infognition.com/VDFilterPack/
Jim Leonard's White Balance filter
http://neuron2.net/whitebalance/whitebalance.html

flaXen filter
http://neuron2.net/flaxen/flaxen.html


To use this filter, install Virtual Dub, then install these plugins into the VirtualDub's plugins folder.


VirtualDub MPEG2 codecs
========================
To use the Virtual Dub and encode with the MPEG2, the following codes need to be installed.
Panasonic VfW DV codec
http://www.free-codecs.com/download/panasonic_dv_codec.htm
 Adaptec VfW DV codec
http://www.free-codecs.com/download/adaptec_dvsoft_codec.htm


How to Improve Video Capture Quality
======================================
This step may require additional filters for VirtualDub. See the previous section for filters available for VirtualDub.

White Balance Filter - Jim Leonard
- to correct for white balance problems.
- Example: when the video in general looks orange, blue or too dark.
- may occur when white balance is on automatic mode, so different types of light having different temperatures causes this problem
- this filter can also be used to adjust Hue, Saturation, Intensity, Brightness, Contrast

Deinterlacing filter
- used to remove the effect of interlacing, ie. when not all frames are processed.
- fast motion causes edges of objects to look jagged.
- the filter will also make the video look far sharper

Sharpening Filter
- used when video seem to have soft edges or lack detail.

Dynamic Noise Reduction
- used when video is grainy

Chroma Noise Reduction Filter
- used when there is chroma noise; ie where rainbow effects shimmer across the screen.

VHS filter - flaXen
- used when video has timing issues and skips a bit
- try using the Stabilize section of this filter only

NotesDVD

NotesDVD
=========
(see also NotesDVD)

Contents
=========
PAL/NTSC Aspect Ratio
DVD to DivX



PAL/NTSC Aspect Ratio
======================
Resolutions that video streams can use, are:

720x480 (NTSC, only with MPEG-2)
720x576 (PAL, only with MPEG-2)
704x480 (NTSC, only with MPEG-2)
704x576 (PAL, only with MPEG-2)
352x480 (NTSC, MPEG-2 & MPEG-1)
352x576 (PAL, MPEG-2 & MPEG-1)
352x240 (NTSC, MPEG-2 & MPEG-1)
352x288 (PAL, MPEG-2 & MPEG-1)


PAL/NTSC 720 x 576 / 720 x 480
Size Ratio
720 x 544 1.32:1
640 x 480 1.33:1
592 x 448 1.32:1
544 x 416 1.30:1
512 x 384 1.33:1
448 x 336 1.33:1
400 x 304 1.32:1
384 x 288 1.33:1
336 x 256 1:31:1
320 x 240 1.33:1


PAL/NTSC 720 x 576 / 720 x 480
Size Ratio
720 x 384 1.87:1
640 x 336 1.87:1
576 x 304 1.89:1
512 x 272 1.88:1
480 x 256 1.87:1
448 x 240 1.86:1



DVD to DivX
===========

Summary
1. Rip DVD VOB files from DVD to Hard Drive
2. Convert VOB into AVI
3. Convert VOB into WAV
4. Combine AVI and WAV into another AVI file

Method A: Using mpeg2avi, ac3decode, VirtualDub, Danii's GUI
Step 1 - assuming this is done .....
Step 2 - using mpeg2avi with Danii's GUI
Step 3 - using ac3decode with Danii's GUI
Step 4 - using VirtualDub

Convert VOB into AVI
- open Danii's GUI v0.20
- click MPEG2AVI
- fill in location of:
i) mpeg2avi program
ii) VOB file for single VOB file or
*.lst file for multiple VOB files (containing a list of all VOB files to be combined)
iii) output folder
- click on "DivX Auto"
i) Low motion
ii) 10 Keyframes
iii) 70% compression control
iv) 600 kbps (varies)
v) click Save
- fps = 25 (for PAL)
- q0 High quality
- r1 32bit MMX iDCT
- Output = o8 AVI-YV12 for DivX
- PAL - 4:3
- Crop and Resize (see Resolutions data above)
- Click Create My AVI

Convert VOB into WAV
- open Danii's GUI v0.20
- click AC3DEC
- fill in location of:
i) ac3dec program
ii) VOB file
iii) output folder
- Global Output Gain = 300
- Check - "Span over multiple VOBS automatically"
- Click Create My WAV

Combine AVI and WAV into another AVI file
- open Virtual Dub
- File -> Open video file (output from step 2)
- Video -> Direct Stream Copy (because already compressed to DivX/AVI)
- Audio -> WAV Audio
- Audio -> Full processing mode
- Audio -> Compression - MP3
- Audio -> Interleaving - adjust by testing if video out of sync with audio
- File -> Save As AVI

Saturday, July 21, 2007

Building own PC

Case:
Thermaltake Wing RS100
- $59 http://www.skycomp.com.au/ sydney

Windows Vista Readiness
- check out readiness from
http://www.microsoft.com/windows/products/windowsvista/buyorupgrade/upgradeadvisor.mspx