I'm tasked with developing a video editing application, similar to Microsoft MovieMaker, i.e mutliple source images/movies, transitions, trimming, background music, etc. The only API that I know of to do this is DirectShow Editing Services (DES), a DirectShow API that handles most of the editing details. I also need h264 support, hence my interest in the Intel Media SDK.
My understanding is that DES will only take RGB input and it's output is RGB so in order to use it with the Intel codecs I need to convert from NV12 to RGB. I wrote a NV12 to RGB converter to go from the Intel decoder to DES and I am able to preview my "timeline" images OK. But if I want to encode, I need to write an RGB to NV12 converter and then connect to the Intel h264 encoder. I'm having a lot of trouble with that. I can connect my NV12 to RGB filter to the Intel h264 encoder, but that's as far as I go. I can't run it.
First of all, is there any reason why, in principle, what I am trying to do will not work?
Some specifics, I get an error in CEncVideoFilter::DecideBufferSize where the call to
sts = pEnc->GetVideoParam(&par);
returns MFX_ERR_NOT_INITIALIZED. At the moment I can't figure out why it wouldn't be initialized and I'm not sure this is critical because DecideBufferSize does return successfully ( but the sample code does not get this error).
Ultimately I fail altogether in the CEncVideoFilter::Receive call with the same sort of problem
sts = m_pEncoder->Init(&m_mfxParamsVideo, &m_mfxParamsVPP, this);
this return MFX_ERR_INVALID_VIDEO_PARAM.
I'm digging through the sample code trying to figure out the difference, but I can't seem to pinpoint it.
I'm really more concerned with whether I am wasting my time even trying this than the details above. Although if anyone has any ideas on the details, that would be great.