Video recording configuration
Author: Ph.D. Marcin Just, Ph.D. Michał Tyc (DiagNova Technologies)After selecting the frame grabber (device capturing the video signal) configuration option, the configuration window with the image preview will be displayed on the screen (Fig. 1). Although the program includes automatic configuration procedures, the manual setting of all options guarantees the best operation of your hardware.
Fig. 1. Video recording device configuration window
In Fig. 1 the numbers of configuration controls coincide with the suggested order of options settings:
- MediaSubtype – selection of the so-called color space 1. The digital signal carrying image information may be encoded in various ways. The best format currently in use is the uncompressed RGB24 format. First try this format (MEDIASUBTYPE_RGB24). If, after selecting it in the list, the required capture device doesn’t show in control 2 (or any other device), try the YUY2 format (MEDIASUBTYPE_YUY2). This format retains the full brightness information of the image; however the color information is shared by two adjacent dots in the video image. The last format on the list is RGB32 (MEDIASUBTYPE_RGB32). This format is very rarely supported by capture devices, so you should only choose it if no other format works. As a rule, video capture devices in the form of expansion cards placed inside the computer provide two these modes (RGB24 and YUY2), while external devices connected to the computer via the USB port provide only the YUY2 mode.
- Video capture device 2. Whenever the control 1changes, all devices that provide the selected video stream type will appear in the list 2. If your computer has multiple video output devices (notebook camera, webcam, TV tuner, etc.), multiple devices may appear in this list. Select the device to which the camera is connected. The "live" preview in the window Ais of great help here. You may need to properly select the resolution 3 and video input on the recording device (4) to get the correct picture.
- Resolution/fps 3. Recordings should be made with the highest possible resolution. There are, however, significant limitations here. Currently available computers (including notebooks) should be able to record images with resolutions exceeding 1024 x 768 without compression. However, the resulting video files will be enormous in size, which will make any further work with them very difficult. Normally this signal needs to be compressed 7 . Compression usually degrades image quality, but it can reduce the size of video files on disk up to 100 times. However, compressing the video material requires a lot of work done by the computer processor. Selecting too high a resolution will result in significant delays between recording consecutive video sequences, it may also make recording impossible. Pentium Core 2 Duo class computers with a clock speed higher than 2.5 GHz or Athlon X2 class computers with a clock speed higher than 3 GHz should easily compress video material with a resolution of 720 x 576 (full PAL). In this case, the video data will probably be from the so-called interlacing, which can result in unfavorable torn vertical edges on the screen. In the event of this phenomenon, or in the case of observed delays required between successive recordings, we suggest reducing the resolution to 720 x 288.
-
Input – signal source selection 4. For most recording devices with analog cameras connected, you can choose from Composite or Video input (Fig. 2). Video is a better choice, but it must be compatible with the actual way of connecting the camera to the recording device (e.g. card in the computer). For information on this, see the camera's instruction manual.
Fig. 2. Possible signal sources
- Resolution/fps 5. A number of recorded frames per second (fps).
-
Grabber options 6. This button opens the device properties window. It allows you to set device-specific options.
Controls responsible for settings are divided (due to their large number) into several tabs B. On the Video tab (Fig. 3) there are:
Fig. 3. Video settings tab
- Compression 7. After setting all options related to the recording device, select the so-called an encoder that will be used to reduce the size of the material written on the disk. The popular Xvid codec is recommended for DiagnoScope. It is also possible to use FFDShow, MotionJPEG. There are also codecs using lossless compression methods that can be used in the program - e.g. Lagarith, HuffYUV. The latter is also recommended for computers with a weaker processor and a large hard disk. It provides excellent image quality and has extremely low processor speed requirements, unfortunately the resulting files on the disk will be larger than average in size (about 50 MB per recording).
- Compression quality 8. You should enter a value in the range from 1000 to 10000. Unfortunately, most modern codecs ignore this entry, if you notice no difference in the quality and size of the recorded sequences, use the method described in point 9.
-
Compression options (if available) 9 – although not recommended, it is the only one option that works with most video codecs. After selecting this option, the video codec configuration window will appear depending on the codec selected in step 5. An example of such a window for the recommended Xvid codec is shown in Fig. 3. The slider 1 (Fig. 4) directly sets the quality of the resulting video sequence, and therefore its size (the better the quality, the larger the size). Suggested settings are shown in Figure 4.
Fig. 4. Xvid codec configuration
-
Recording resolution 10. This option allows you to set a resolution for the recorded video sequence lower than the preview resolution (and at the same time the resolution of single frames and series) 3. Its use is advisable in the case of high definition cameras and allows:
- reducing the demand for processing power of the processor (it grows quickly with the increase of the resolution of the compressed video material), as well as the size of the resulting video files, to a value acceptable for the computer, it is possible to rescale the image for recording. For example, an image with a resolution of 1280 x 960 pixels from a digital HD camera can be saved as a 640 x 480 video, while maintaining the ability to collect single frames and series with full resolution.;
- increase the number of frames per second collected by the camera (including the option 11), i.e. improve the temporal resolution (smooth movement) of the recording.
-
Change source resolution 11. This option is relevant only in conjunction with selecting a different resolution for the video recording in the option 10.
If this option is checked, the operating mode buttons also serve as buttons for changing the resolution. Switching to the video recording mode switches the resolution of the image sent by the camera to the computer to the value set in the option 10 (or the closest to it from all supported by the camera, but not higher than the preview resolution). This resolution is also valid for single frames and series collected in this mode. On the other hand, switching to the frame or series mode switches the camera to the resolution selected in the option 3.
Reducing the resolution of the image sent by a high-resolution camera can significantly increase the number of frames recorded per second and improve the smoothness of the recording. An example camera can collect only 7.5 frames with a resolution of 1280 x 960 pixels or as much as 30 frames with a resolution of 640 x 480 per second. Switching the resolution of the camera is associated with waiting for its reaction each time - from a fraction of a second to a few seconds, depending on the type of equipment.
If this option is unchecked, the resolution (and the number of frames per second) of the image sent from the camera remains constant when switching recording modes, and the reduction of the resolution of the video recording is done only by rescaling the image collected from the camera. In the case of storing single frames at different resolutions, the video sequence created from them automatically in the examination window will contain frames of different sizes.
- Frame decimation 12.Frame reduction allows you to set the compression of every nth frame at a better resolution, instead of all frames at a lower resolution. It is related to the computing power of the computer. For example, a setting of 1/4 will compress every 4 frames.
-
Maximum recording time (sec.) 13. This option allows you to define the required length (in seconds) of the video recording. The value can be entered manually or with the use of arrows (every 30 seconds).
The Frames tab (Fig. 5) controls the compression settings for single frames and series:
Fig. 5. Frames settings tab
-
Compression 14. This option allows you to set the appropriate compression for saving single frames and a series of frames in order to reduce the size of the material stored on disk. Suggested codecs are those using lossless compression methods, such as HuffYUV or Lagarith, which will be automatically installed during program installation. The codec options can also be set in the same way as on the Video tab.
The View tab (Fig. 6) is responsible for the layout of the controls and the size of the image in the recording window:
Fig. 6. Preview settings tab
-
Horizontal layout of buttons 15
. This option allows you to change the video recording window layout. Checking this option sets the button and information bar C on the left side of the main part of the window with the video image. Disabling this option sets the button bar at the top of the main video window.
For widescreen displays with an aspect ratio of 16: 9 or 16:10, the horizontal layout is recommended because it allows the use of the entire monitor space (Fig. 7, left). Using a vertical arrangement (unchecking the option) gives the effect shown in Fig. A.11 on the right. You can see unused black stripes on the sides of the picture.
Fig. 7. Video recording window on widescreen with 16:10 aspect ratio. Left: horizontally; on the right: vertically
Fig. 8. Video recording window on the classic screen with an aspect ratio of 4: 3. Left: vertically; right: horizontally
Disabling this option allows a better layout for screens with an aspect ratio of 4: 3 or 5: 4 (Figure 8, left). If the horizontal layout is used on classic screens, we will get the op-posite effect, shown in Figure 8 on the right, with visible unused black stripes at the top and bottom.
-
Magnify to fit view 16
. This option adjusts the video image by enlarging it so that it takes up the entire recording space. This way, unused black stripes around the recording are eliminated.
After enlarging, the edges of the image (right and left or top and bottom depending on the conditions) may be cropped because the image will never be distorted.
- Use even lines only for view 17. Speeds up the preview display in split interlacing mode, skipping every other frame.
-
Frame display decimation 18. Frame reduction allows you to display every nth frame in the preview. It is related to the computing power of the computer. For example, a setting of 1/4 allows you to preview the video every 4 frames.
Another tab, Control (Fig. 9), allows to select the foot switch function:
Fig. 9. Control settings tab
- Foot switch triggers by default 19. The foot switch can control three data collection methods: video sequence recording, series of frames, single frames. Here you can select its default function (activated after entering the recording window); ideally, this should be the function most frequently used by the program user. The method of data collection can also be changed on the fly in the recording window.
-
Audible signal for 20. The option enables sound signaling of operations such as the start and end of recording, recording a frame and a series of frames. Each operation is signaled with a different sound. The marked functions may appear together.
The last tab, Hardware (Fig. 10), allows you to customize the program to not standard hardware:
Fig. 10. Non-standard hardware settings tab
- Force stored frame rate 21. As a result of some capture devices and cameras reporting that the frame rate is not true, the length of the recording may not be correctly read, and in the case of recordings with sound, there may be a loss of synchronization between the video and audio (e.g. the video is ending, audio is still playing). This option, after selecting the check box, allows you to force the appropriate number of frames per second and correct the potential problem. Typically this will be 25 frames per second, or 2500/(100s). The best way to eliminate the problem is to enter the number of frames per second given in the diagnostic message, multiplied by 100 and properly rounded (e.g. 2500, not 2470) 37.
- Force TV standard 22. In the case of some recording devices there happens a spontaneous change of some parameters, e.g. video signal standard, for example when disconnecting and reconnecting them. As switching to a video standard other than that provided by the review (usually European PAL), such as the American NTSC, may result in changing the available image resolutions and even the loss of image control, this option allows to select a video standard, which will be forced on the selection of a video standard.
- Remove color (grayscale image) 23. This option should be used when the image received from the camera has false colors, which may affect the visibility of changes, and therefore also the diagnosis. The Remove Colors option avoids this effect by removing colors. The resulting image is grayscale. With this option selected, the image color correction sliders 29 are still active, allowing you to get interesting effects.
- AverMedia M135a bug workaround 24. A critical error has been identified in the drivers that come with the AverMedia M135a (AVerTV Super 007) image capture card.; This error prevents, in line with generally accepted standards, controlling the image resolution and the format of video data returned by the card (the 1 and 3 controls do not work fully, which is manifested by, among others, an image filling only ½ or ¼ of the entire viewing field). If you have such a raking card, this option should be checked. It will work around the error by enabling an alternative method of communication with the card driver. This method is specific to this card and will not work with other cards - do not select this option if the card is working properly.
- Swap U and V tables 25. This option exchange U and V components in case if the video grabber returns them incorrectly.
- Mask sides 26. This option allows you to cut the edges (left and right) of the image. The crop width is determined by the number of pixels.
- Swap even/odd lines 27. This option is effective only for interlaced video signal. In the case of jagged vertical edges, enabling this option may improve the image. Normally, its use may degrade the video quality.
- Enhance colors 28. Using this option can significantly improve the contrast and color saturation, especially if the electronics of the camera and recording device do not match.
- De-interlace frames before save 29. Video data with the so-called interlacing, which may result in jagged vertical edges, should be corrected by including the separation of frames for recording.
- Color correction 30. Using the sliders, it is possible to pre-correct the brightness, contrast and hue (share of red and green components). To center all settings, click the Reset button to the right of the sliders. The color setting in this window is saved by the program. Each time the recording window is opened, the color correction settings are reset to the value specified here.
- Standard 31. This option specifies the color coding standard. Basically the ITU-R BT.601 standard is defined for SD standard, while the ITU-R BT.709 standard for HD high definition. Selecting an option not compatible with the standard used by the capture device (or digital camera) used may result in slight color distortion. Information on the standard used can be found in the documentation of the capture device or digital camera. Most SD devices use the ITU-R BT.601 standard.
- Range 32. Depending on the capture device (or digital camera) used, the levels of color components can be described with numbers ranging from 0-255, or 16-235 (R, G, B, Y components) and 16-240 (U, V components). Selecting an option not compatible with the standard used by the capture device (or digital camera) being used may result in slight distortion of colors and contrast mismatch. Information of the standard used can be found in the documentation of the capture device or digital camera. Most SD devices working in the YUY2 format (MEDIASUBTYPE_YUY2 - see the control description) use the range 16–235 / 240.
-
Add sound to video 33. This option allows you to enable or disable audio recording while recording video.
Save sound in session 33. Checking this option allows you to save the audio track separately to a wav file for later use in acoustic analysis.
In a special module designed for recording video material with a DV digital camera, an additional option appears here - Digital audio from DV, which allows you to add digital audio to the video. The option to enable digital sound is active only if the option of adding sound to the recording is also checked.
Additionally, the user is provided with a tool for controlling the operation of the recording device. The tab 35 shows a preview of the signal to be recorded, along with the buttons allowing enlarging the recording frames 37. The field 34 allows assessing the brightness range in the recorded image (the ideal value is 0–255 in the All field and slightly less, e.g. 3–252 in the 99.9% field). Too small spread (e.g. 35–225) may suggest the need to turn on the color scale stretching mode (control 37). The Log 36 tab shows service information to help with troubleshooting problems with unusual or malfunctioning recording equipment.) Its use is unnecessary for normal use.
If the changes made to the settings are not satisfactory, the program allows you to undo the changes by pressing the Restore default settings button 39.