Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7969671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:16:25+00:00 2026-06-04T07:16:25+00:00

I am making an Directshow Application to Capture MP4 video. I use below graph

  • 0

I am making an Directshow Application to Capture MP4 video. I use below graph to do so.

Input Stream --> MJPEG Decompressor --> x264vfw H.264/MPEG-4 AVC Codec --> GDCL Mpeg-4 Multiplexor --> File Writer

in my directshow application , i created the required filters and connect them on graph , at end i do file writer operation and redder stream using pin as capture. that part of my code is as below.

GUID guid;
guid = MEDIASUBTYPE_x264;

hr = gcap.pBuilder->SetOutputFileName(&guid, gcap.wszCaptureFile,
                                      &g_mp4mux, &gcap.pSink);



hr = gcap.pBuilder->RenderStream(&PIN_CATEGORY_CAPTURE,
                                     &MEDIATYPE_Interleaved,
                                     gcap.pVCap, pVcompFilter, NULL);
if(hr != NOERROR)
{
    hr = gcap.pBuilder->RenderStream(&PIN_CATEGORY_CAPTURE,
                                        &MEDIATYPE_Video,
                                        gcap.pVCap, pVcompFilter, NULL);
    if(hr != NOERROR)
    {
        ErrMsg(TEXT("Cannot render video capture stream"));
        TearDownGraph();
        return FALSE;
    }
}

On above code

g_mp4mux is GDCL MPEG-4 Muliplexrer filer

PVcompFilter is x264vfw H.264/MPEG-4 AVC codec Filter

when i run above code i get HR = E_INVALIDARG .

no idea what is wrong in above code.
Plz help. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:16:27+00:00Added an answer on June 4, 2026 at 7:16 am

    RenderStream does a number of steps internally and should any error happen during the sequence, the error is forwarded back without details. Hence, E_INVALIADRG is all you have, you don’t know if this is a wrong argument on your call or some internal.

    For starters, check your arguments (you might be passing NULLs in 3rd and 4th parameters), then if it is not helpful replace RenderStream with direct graph building calls such as IGraphBuilder::Connect to possibly learn more about the error.

    Also mention your cross-posting: at msdn.microsoft.com

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im making a flash app that will capture video from the users web-cam, show
I making one application which contains 2 input box and one input button.My qestion
Making an adobe flex ui in which data that is calculated must use proprietary
When making an HttpWebRequest within a CLR stored procedure (as per the code below),
Im making firefox extension. One function stores value in every tab, to use it
Making a piano/keyboard application and trying to figure out the best way to set
By making use of the remote feature in vim, is it possible to reuse
Making my PHP Command line application support Linux and Windows. Currently it has this
im making a server for an application, and I made a thread for accepting
making a thumbnail from video using the picker is straight forward. However, when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.