Friday, December 28, 2012

Screenshots addition to Camstudio screencapture video

To capture certain menus within Camstudio which produce errors when opened while recording, like the video options dialog, one needs to take snapshots with the print screen key, sometimes labeled on the keyboard as:

  • Print Scrn
  • Prt Src
  • Prt Scn
  • Prt Sc
  • Prtsc

Spanish version is named ImpPnt


preferably pressing alt and then the print screen key, in such a way as to capture only the window currently in focus. Doing so however, would constrain you to use GIMP or any other image editor to scale it up to the size of your screencast. Not only will this make it bigger and easier to watch, but also it will allow the appending of the fixed image video to the screencast(differing resolutions wouldn't allow it.)



The next step is to open the Microsoft Paint program, by pressing the Windows key and r,

type in the blank entry mspaint,



 press Enter. Since the image has been copied in the clipboard previously, we just need to press ctrl+v to paste the clipboard image into the mspaint program. Click on save as in the file menu, in order to save the image as a BMP image file on your hard disk.

Once you locate such image file within the directory tree, click once the file on the explorer to select it and press ctrl+c to copy it and ctrl+v multiple times to paste and duplicate it in the same directory as many times as you wish to arrive at the desired frame count. Calculate how many, by observing the framerate of the planned master video and the duration you have decided for such menu to appear in the video.

So if it is a 25 fps video, and you want the duration of such menu on screen to be 2 seconds, simply multiply 25 times 2  (25 frames are watched in one second, multiplying by two yields the correct number of frames for 2 seconds) which is 50.

Instead of having to go through the burden of pasting the same frame 50 times, you can alternatively use the following batch script in Windows:

SET source_file=%1
SET name_list_file=%2

FOR /F "usebackq delims=," %%G IN (`TYPE %name_list_file%`) DO (
    COPY %source_file% %%G

)

save it with the .bat extension and create another file within the same directory in which you will place the desired numbering and termination(since it is a generic list creator, it is up to you to change it to a meaningful numbering and extension). Following the previous example list.txt would contain:

01.bmp
02.bmp
03.bmp
04.bmp
05.bmp
06.bmp
07.bmp
08.bmp
09.bmp
10.bmp
11.bmp
12.bmp
13.bmp
14.bmp
15.bmp
16.bmp
17.bmp
18.bmp
19.bmp
20.bmp
21.bmp
22.bmp
23.bmp
24.bmp
25.bmp
26.bmp
27.bmp
28.bmp
29.bmp
30.bmp
31.bmp
32.bmp
33.bmp
34.bmp
35.bmp
36.bmp
37.bmp
38.bmp
39.bmp
40.bmp
41.bmp
42.bmp
43.bmp
44.bmp
45.bmp
46.bmp
47.bmp
48.bmp
49.bmp
50.bmp

Opening cmd.exe by pressing the Windows key and r to open the run command and typing cmd in it for finally pressing enter, will open the command prompt. change the current directory with the cd command, to where these files(the BMP image, the BAT script and the TXT list) were created(preferably alone in a ad hoc directory), run the BAT file by typing the name of the bat file followed by the name of the source file to be copied, followed by the list file. For example:

C:\Users\UserName\Documents\SameFileReproducer>SameFileReproducer fileToCopy.bmp list.txt

That will replicate your BMP file 50 times.

Once the files are in that same directory as 01.bmp, 02.bmp, 03.bmp...
you must download AVIsynth.

Create a text file just as you did with the BAT and list file previously, generally by right clicking on the Windows Explorer and left clicking on new->text file, alternatively new->AviSynth script.
Copy the following text to it:

ImageSource("%02d.bmp", start = 1, end = 50, use_DevIL = true)

Save it with the .avs extension. Notice that it has a start and end argument, if the numbering sequence of the names of the replicated files is different, change it accordingly.


Finally open VirtualDub and drag the AVS file into the VirtualDub Window client area. It will automatically add the BMP files into VirtualDub.

Set the video compression to whatever codec and settings were chosen for the Camstudio captured video, including the frame rate and audio frequency rate and sample bit depth. Finally press f7 to save the file as AVI.


Appending both sections


Once it is done processing, simply use the file menu option append AVI segment from the Camstudio captured video opened with VirtualDub and add the BMP to AVI file you just created to append it.



 Of course you can copy that ending section by pressing the home key where the sequence starts and the end key where the sequence ends, press ctrl+c; select the frame in the timeline where you would like it pasted, press the home key and ctrl+v to past the sequence. Then you once more press f7 to save the file with whatever compression is set at the Video->Compression dialog(ctrl+p).


No comments: