Code sample - Select video renderer

Delphi and C# (ActiveX) sample code.

You can use 3 different filters to render video - Video Renderer, Video Mixing Renderer 9 and Enhanced Video Renderer (Windows Vista / 7).  


Video Renderer uses GDI for drawing. It does not use hardware acceleration and can be used only for compatibility purposes and if DirectX 9 is not installed. 

VideoCapture1.Video_Renderer := VR_VideoRenderer;
VideoCapture1.Video_Renderer = VisioForge_Video_Capture_5.TxVFVideoRenderer.VR_VideoRenderer;

Video Mixing Renderer 9 is an up-to-date filter recommended for use. It can use all capabilities of your video card, such as hardware acceleration while displaying and deinterlacing the image. 

VideoCapture1.Video_Renderer := VR_VMR9;
VideoCapture1.Video_Renderer = VisioForge_Video_Capture_5.TxVFVideoRenderer.VR_VMR9;

Use the following code to get the list of available deinterlacing modes 


for I := 0 to VideoCapture1.Video_Renderer_Deinterlace_Modes_GetCount - 1 do

for (int i = 0; i < VideoCapture1.Video_Renderer_Deinterlace_Modes_GetCount(); i++)

Enhanced Video Renderer is a new filter available in Windows Vista / 7. It can use additional video acceleration features and is recommended to be used in Windows Vista / 7. 

VideoCapture1.Video_Renderer := VR_EVR;
VideoCapture1.Video_Renderer = VisioForge_Video_Capture_5.TxVFVideoRenderer.VR_EVR;

When the image is being displayed, the aspect ratio of the source video may not correspond to the size of the screen used for displaying. 

Use the following code to stretch the image. 

VideoCapture1.Screen_Stretch := true;
VideoCapture1.Screen_Stretch = true;

Use the following code to use black borders instead of stretching (letterbox). 

VideoCapture1.Screen_Stretch := false;
VideoCapture1.Screen_Stretch = false;

VisioForge © 2006-2020

  • GitHub-Mark-64px
  • Twitter Социальные Иконка
  • VisioForge Facebook page
  • YouTube channel