Video recording resolution using DirectShow

后端 未结 1 1257
执笔经年
执笔经年 2021-01-01 06:32

How do i change the screen resolution of a video while recording in directshow? because I have a 8 Mega-pixel web camera, which I use for video recording but after the video

1条回答
  •  离开以前
    2021-01-01 06:51

    You need to use IAMStreamConfig interface. Some MSDN leads for you:

    Configure the Video Output Format (Windows):

    To configure a capture device's output format, an application should use the AM_MEDIA_TYPE structure returned by IAMStreamConfig::GetFormat in the pmt parameter.

    IAMStreamConfig::GetFormat method (Windows):

    If the pin is connected, this method returns the format that the pin is currently using. Otherwise, the method returns the pin's preferred format for the next pin connection. If you have already called the IAMStreamConfig::SetFormat method to set the format, GetFormat returns the same format. If not, it returns the first format in the pin's list of preferred formats, as determined by the IPin::EnumMediaTypes method.

    More:

    • how to change OutPut Pin Size & ColorSpace/Compression in DirectShow
    • How can i Programmatically set a Directshow Filters' options?
    • DirectShow - Order of invocation of IAMStreamConfig::SetFormat and ICaptureGraphBuilder2::RenderStream creates issues in some video cameras

    Also, your webcam might have lower resolution for video streaming, and high for taking still thanks to post-processing capabilities.

    0 讨论(0)
提交回复
热议问题