Click here to Skip to main content
6,305,776 members and growing! (17,673 online)
Email Password   helpLost your password?
Multimedia » DirectX » General     Intermediate

Change Video Signal Format with DirectX library

By hpAng

An enhancement for the DirectX video stream and frame capture sample.
C#.NET 1.0, .NET 1.1, WinXP, DirectX, VS.NET2003, Dev
Posted:23 Feb 2005
Views:60,465
Bookmarked:22 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
6 votes for this article.
Popularity: 2.85 Rating: 3.67 out of 5
1 vote, 16.7%
1

2
1 vote, 16.7%
3
2 votes, 33.3%
4
2 votes, 33.3%
5

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


Member
Please visit my website www.mbwebcreator.com for more web site information.
Occupation: Web Developer
Location: Malaysia Malaysia

Other popular DirectX articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 23 of 23 (Total in Forum: 23) (Refresh)FirstPrevNext
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  
GeneralProblem changing Frame Size Pinmembermaihuaz16:26 8 May '05  
GeneralRe: Problem changing Frame Size PinsussAnonymous1:16 10 May '05  
Generaldont have capture device ? PinmemberChrono_man11:12 7 May '05  
GeneralRe: 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    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 23 Feb 2005
Editor: Smitha Vijayan
Copyright 2005 by hpAng
Everything else Copyright © CodeProject, 1999-2009
Web18 | Advertise on the Code Project