Thursday, March 26, 2009

De-interlacing

To compensate for CRT artifacts, an image frame has been traditionally broken up into two fields that contain even and odd scan lines. Each field thus contains half of the vertical resolution of a frame. Most standard definition video cameras record in this field manner (in NTSC they record 59.94 fields per second) which looks great in a CRT display.

To reproduce the image in its original resolution on a “progressive” type display –LCD, Plasma, etc.- both fields can be combined. However, because each field is recorded at slightly different time (1/59.94 = 16.68 ms) some artifacts may show up in the resulting picture. These artifacts, particularly visible in scenes where there is fast motion, appear as a kind of line crawling over the picture.

Most video original material is interlaced, but some original film material that has been converted to video (Telecine) might also be interlaced. For that reason, when transcoding video for playback in computer systems or on “progressive” type displays, always check if the video source is interlaced and if so, apply de-interlacing. If the source is a Telecine of a film, use an inverse telecine setting.
The link below gives some great examples of interlacing. Check it out.

Monday, March 16, 2009

VirtualDub

VirtualDub is one of many very useful open source programs that allows you to quickly convert and process video.


VirtualDub provides you with a framework for basic video editing, compression and filtering. It comes with a few plug-ins for encoding, frame rate conversion and image processing, but there are many third party plug-ins in the open source community that can be added very easily.


http://www.thedeemon.com/VirtualDubFilters/

With this powerful application you can stitch videos together, change audio or add overlays very quickly. This is one tool that video compression professionals must have in their arsenal. You can get it here:


http://www.virtualdub.org/

More technical video professionals can create or adapt their own plug-ins for VirtualDub using its open source filter SDK.


http://www.virtualdub.org/filtersdk.html

As with any open source solution, the main issue is support. However, with VirtualDub there is a very large community of developers and users that you can tap to find answers.

Monday, March 2, 2009

Video stream analyzers

I looked around for video stream analyzers and got a couple of trial versions to test. Here is a brief description:

Elecard StreamEye

An intuitive interface that lets you navigate and display the stream picture by picture while it determines the real bit rate and compares it to the header values. It will tell you the streams real peak bit rate and how it varies as well as frame data sizes. It gives you access to macroblock information and its file address as it is displayed on the corresponding image.

http://www.elecard.com/products/products-pc/professional/streameye-studio/

MTS4EA Tektronix Compressed video elementary stream analyzer.

A much more powerful tool that can help codec developers debug and optimize codec code. The learning curb is steep around their user interface as it offers lots of features .
It verifies stream compliance against standard. It gives you the ability to perform a differentiating analysis against a reference video. (.yuv file) and calculates PSNR, RMSE, MSE and other measurements. It gives you macroblock statistics. The video view selection may show you the hex code for a macroblock or a macroblock set. It includes a bit stream editor for debugging applications and a batch mode with logging capability. Their image inspector lets you view pixel data for individual macroblocks and separates them into their component channels for YUV or RGB images. They have a macroblock type overlay that lets you see, in color, if a macroblock is an intra 4x4 or inter type block. It also overlays the motion vectors as color coded arrows for B or P frames. It is capable of producing a bit usage histogram and give you buffer analysis.

http://www.tek.com/Measurement/applications/video/mpeg_derivatives.html?WT.srch=1&WT.mc_id=ppc,ggl,vid_aw_us_us_ngt,k3AF2,s,1520098873&

Interra Vega-Media analyzers

I wasn’t able to get a trial version of this product so I can only paraphrase what they have on their website.
It supports H264, VC1, MPEG2, Audio and compares with other encoded streams. It has a YUV Dif utility to evaluate quality against an original video. It provides with syntax analysis tools and frame statistics for analysis of interpolation and prediction.

http://www.interrasystems.com/dms/dms_vega.php