Click here to Skip to main content
Licence 
First Posted 23 Feb 2005
Views 82,085
Downloads 413
Bookmarked 29 times

Change Video Signal Format with DirectX library

By hpAng | 23 Feb 2005
An enhancement for the DirectX video stream and frame capture sample.
1 vote, 14.3%
1

2
1 vote, 14.3%
3
2 votes, 28.6%
4
3 votes, 42.9%
5
3.86/5 - 7 votes
μ 3.86, σa 2.56 [?]

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... PinmemberLomis1:43 27 Jul '09  
GeneralI can not set Brightness or contrast Pinmemberkanada ketan H2:54 15 Dec '08  
GeneralChange VideoSignal and VideoSource Pinmemberhaxmaxx3:55 14 Sep '06  
GeneralNice article! Pinmemberalmere10922:31 2 Mar '06  
QuestionCan't get it to work! PinmemberPeaver11:30 15 Nov '05  
Generalit doesnt work for ATI VGA+Capture Pinmembersohrabi12:56 21 Oct '05  
GeneralRe: it doesnt work for ATI VGA+Capture Pinsusssohrabi12:59 21 Oct '05  
GeneralRe: it doesnt work for ATI VGA+Capture Pinmembersandinog2617:30 29 Nov '05  
I have the same problem....
I am using an ATI ALL IN WONDER 9600
I try to run the project...it captures TV...but the sound is missing...I've checked the hardware and even the software that comes with the ATI (Works fine with the ATI stuff)
 
I really appreciate if someone can tell me how to get the project (C#) work. Since i am programming some similar software.
 
thanks in advance
 


GeneralProblem changing Frame Size Pinmembermaihuaz16:26 8 May '05  
GeneralRe: Problem changing Frame Size PinsussAnonymous1:16 10 May '05  
Questiondont have capture device ? PinmemberChrono_man11:12 7 May '05  
AnswerRe: dont have capture device ? PinmemberhpAng1:19 10 May '05  
GeneralVideoProcAmp Problem Pinmemberyoda_2069a20:46 2 May '05  
GeneralRe: VideoProcAmp Problem PinmemberhpAng1:20 10 May '05  
Generaldesktop capture PinmemberAnmar-xe23:40 11 Apr '05  
GeneralRe: desktop capture PinmemberhpAng1:21 10 May '05  
GeneralBrightness change in a video. PinmemberMarsWalker8:59 11 Apr '05  
GeneralSeem REAL interesting, but does it work Pinmemberregispoulin10:43 31 Mar '05  
GeneralRe: Seem REAL interesting, but does it work PinmemberhpAng1:23 10 May '05  
GeneralInteresting. PinsussAnonymous8:37 14 Mar '05  
GeneralRe: Interesting. PinmemberhpAng4:38 15 Mar '05  
GeneralRe: Interesting. PinmemberRenecito7:45 18 Mar '05  
GeneralRe: Interesting. PinmemberhpAng1:26 10 May '05  
GeneralLooks interesting but... PinmemberPoolbeer1: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
Web04 | 2.5.120210.1 | Last Updated 24 Feb 2005
Article Copyright 2005 by hpAng
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid