Friday, June 27, 2008

Video Tutorial 2

This is second part of video tutorial. In first part we have prepared the SL Viewer for Capture Video, i will now show you how to capture the video. There are plenty software for doing video screen capture. See wiki article Recording Movies

I've tested and compared the Windows freeware applications referenced there :
Taksi
CamStudio
WeGame
plus
VirtualDUB

There are many way to compare these software, but to achieve better quality in your video the capturing average framerate is the most important factor during video capture. Your target video framerate will be 25 fps for PAL, 29.97 for NTSC. Anyhow you wont reach such high framerate within Second Life, but having a recording framerate higher than in world drawing framerate will smooth your video.

I the way to compare I've used the following technical environment for testing :
Dell Latitude D810 1Go RAM
Pentium 1.73 Ghz
ATI Mobility Radeon X600 (128Mo)
HD 7200 rpm
OpenSIM server 0.5.5 (best way not having inworld issue effect on testing)
SL Viewer 1.19

By far I've reached better result with VirtualDUB (11 FPS) using no codec. CamStudio (7 FPS), Taksi (4 FPS), WeGame (No information). Thus i mostly use VirtualDUB although CamStudio has nice features not available with VirutalDUB (as mouse highlighting and Screen Annotations).

Capturing Video Using VirtualDUB


VirtualDub is video capture and video editing software for Microsoft Windows. As you will see VirtualDUB is full of options and might be a lil bit complicated to understand. But none of freeware applications has such versatility.

Setting up VirtualDUB


As SL Viewer is a very high CPU consuming program you will produce better quality video while capturing with raw images with no compression than using lossless codec like CAM Studio. But doing that way you will a very fast HD (with DMA), capturing 788x576 frames will need around 27.23 MB/s capacity.

Open VirtualDUB and select File / Capture AVI... command

?Set capture Filename using File / Set capture file... (F2)
Choose internal harddisk (not external on USB)
Use any name you wish let's say capture1.avi for instance.

? In Capture menu enable both :
Hide display on capture
Autoincrement filename after capture

? In Device menu select Screen Capture

? In Video menu / Select Source
Use fixed offset X:0 Y:0
Check Capture mouse pointer image for a SL Tutorial
Depending of your capture scenario use following values:
AllMTAVTAVAV3D
Panning AreaWindowClient AreaClient AreaClient AreClient Area




? In Video Menu / Crop
Depending of your capture scenario use following values:
AllMTAVTAVAV3D
Capture Area Width788788788788788
Capture Area Height576576599628652




? In Video / Crop Menu
Depending of your capture scenario use following values:
AllMTAVTAVAV3D
X1 Offset00000
X2 Offset00000
Y1 Offset00232323
Y2 Offset0002953




? In Video / Capture... (C)
We wont use any codec while capturing. Select (Uncompressed RGB/YCbCr)


? In Capture / Settings... (F9)
As you wont reach 25 FPS using Second Life environment i use a lower framerate.
Set framerate (15) and round to nearest millisecond (14.9253)


? In Capture / Preferences... (F10)
Setup hotkeys you wish for starting/stopping video capture. I use [Ctrl]-[Alt]-[F6] and [Ctrl]-[Alt]-[F6] as it doesnt interfere with SL standard hotkeys.


Capturing Video


Now you are ready to capture your SL session. Launch SL Viewer, select appropriate Windows Size help to Sizer, use Start/Stop hotkeys for capturing. VirtualDUB will create autoincrement avi files.

Encode your video using VirtualDUB and ffdshow


As we use no Codec during video capture, video capturing files are not ready for being used into Video Editing Software.

ffdshow is a media decoder and encoder supporting numerous video and audio formats. It is free software released under the GPL license, runs on Windows and is implemented as a DirectShow and VFW decoding filter.

Download and setup ffdshow from ffdshow tryouts

Lauch second session of VirtualDUB and open your video capturing file.

? In Video / Frame Rate... (Ctrl+R)
Change frame rate to PAL compatible value : 25fps.



? In Video / Compression... (Ctrl+P)
Select ffdshow Video Codec



Select configure command
Ensure MPEG into AVI is setup in Decoder tab.



Adjust Coder paramaters into Encoder tab.
I personnaly use MPEG-2 4CC:MPEG Mode: 2 passes



Save your file usinf File /Save File... (F7)
Test the encoded video file with Windows Media Player or whatever media player you use.

No comments: