Click here to Skip to main content
Licence 
First Posted 23 Feb 2005
Views 84,176
Bookmarked 29 times

Change Video Signal Format with DirectX library

By | 23 Feb 2005 | Article
An enhancement for the DirectX video stream and frame capture sample.

Sample Image

Introduction

I posted an article DirectX Video Stream and Frame Capture a few months before, and I got a few feedbacks. Please refer to the article for more information. As a response to many requests, I added again some examples on how to use the video capture library.

In this example, I added a sample code to change the video format from NTSC to PAL and vice versa. A code piece to change the brightness, and the old, grasp a frame from video and finally save to a video file.

Actually this example is prepared in a rush, so I would hope anyone to send me any comments so that I can update it again. Thanks.

Using the code

To change to PAL_B standard:

private void button2_Click(object sender, System.EventArgs e)
{
    capture.VideoFormat= DShowNET.AnalogVideoStandard.PAL_B;
}

To set brightness:

void button2_Click_1(object sender, System.EventArgs e)
{
    VideoProcAmp_prop Brightness;
    Brightness= 
      capture.Get_VideoProcAmpProp(
      DShowNET.VideoProcAmpProperty.VideoProcAmp_Brightness);
    capture.Set_VideoProcAmpProp(
      DShowNET.VideoProcAmpProperty.VideoProcAmp_Brightness,5106);
}

To capture a frame:

void button1_Click(object sender, System.EventArgs e)
{
    capture.FrameEvent2 += new Capture.HeFrame(CaptureDone);
    capture.GrapImg();
}

Points of Interest

Thanks for everyone who gave me suggestions for adding these functions to the code. I am sorry that this is not a robust sample, I created it just for demo purpose. Please tell me if you have any questions and suggestions.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

hpAng

Web Developer

Malaysia Malaysia

Member

Please visit my website www.mbwebcreator.com for more web site information.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Generalwant to change the brightness... PinmemberLomis0:43 27 Jul '09  
GeneralI can not set Brightness or contrast Pinmemberkanada ketan H1:54 15 Dec '08  
GeneralChange VideoSignal and VideoSource Pinmemberhaxmaxx2:55 14 Sep '06  
GeneralNice article! Pinmemberalmere10921:31 2 Mar '06  
QuestionCan't get it to work! PinmemberPeaver10:30 15 Nov '05  
Generalit doesnt work for ATI VGA+Capture Pinmembersohrabi11:56 21 Oct '05  
GeneralRe: it doesnt work for ATI VGA+Capture Pinsusssohrabi11:59 21 Oct '05  
by the way my email address is blueapple_s@yahoo.com
please plaese plase help me as soon as possible
GeneralRe: it doesnt work for ATI VGA+Capture Pinmembersandinog2616:30 29 Nov '05  
GeneralProblem changing Frame Size Pinmembermaihuaz15:26 8 May '05  
GeneralRe: Problem changing Frame Size PinsussAnonymous0:16 10 May '05  
Questiondont have capture device ? PinmemberChrono_man10:12 7 May '05  
AnswerRe: dont have capture device ? PinmemberhpAng0:19 10 May '05  
GeneralVideoProcAmp Problem Pinmemberyoda_2069a19:46 2 May '05  
GeneralRe: VideoProcAmp Problem PinmemberhpAng0:20 10 May '05  
Generaldesktop capture PinmemberAnmar-xe22:40 11 Apr '05  
GeneralRe: desktop capture PinmemberhpAng0:21 10 May '05  
GeneralBrightness change in a video. PinmemberMarsWalker7:59 11 Apr '05  
GeneralSeem REAL interesting, but does it work Pinmemberregispoulin9:43 31 Mar '05  
GeneralRe: Seem REAL interesting, but does it work PinmemberhpAng0:23 10 May '05  
GeneralInteresting. PinsussAnonymous7:37 14 Mar '05  
GeneralRe: Interesting. PinmemberhpAng3:38 15 Mar '05  
GeneralRe: Interesting. PinmemberRenecito6:45 18 Mar '05  
GeneralRe: Interesting. PinmemberhpAng0:26 10 May '05  
GeneralLooks interesting but... PinmemberPoolbeer0:51 24 Feb '05  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120529.1 | Last Updated 24 Feb 2005
Article Copyright 2005 by hpAng
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid