locked
Problem in Setting User Selected MediaEncodingProfile Setting for Video Recording

    Question

  •  I am trying to Record video 
    1. 
     encodingProfile1 =MediaEncodingProfile::CreateMp4(VideoEncodingQuality::HD1080p);
             If I do this and Start Recording it is working fine.     
    2. I tried Creating MediaEncodingProfile for my custom setting as follows I am not able to record the video.
    encodingProfile = ref new MediaEncodingProfile;
    encodingProfile->Video->Bitrate = 147456000;
     encodingProfile->Video->Height = 480;
     encodingProfile->Video->Width = 640;
     encodingProfile->Video->PixelAspectRatio->Numerator = 1;
     encodingProfile->Video->PixelAspectRatio->Denominator = 1;
     encodingProfile->Video->Subtype = "H264";
     encodingProfile->Video->FrameRate->Numerator = 1;
     encodingProfile->Video->FrameRate->Denominator = 1;

    • Edited by chris_vr Friday, November 25, 2011 11:18 AM
    Friday, November 25, 2011 11:18 AM

All replies

  • Hi Chris,

    I just wanted to check with you and see if you were able to get your profile issues figured out. I know its been a few weeks since you posted. Looking at your encoding profile two things look strange. First your bitrate looks very high. I think the maximum bitrate we support is around 15 Mbps. If my math is correct you are requesting a stream be created at over 140 Mbps. This seems to be a bit high. Also it appears that you are trying to specify a frame rate of 1 frame per second. This also does not appear to be correct. I would suggest that you try using a bit rate that is under 15 Mbps for local file playback or under 1 Mbps for content that is to be transferred over the web.

    I hope this helps,

    James

    Windows Media SDK Technologies

    Microsoft Developer Services

    http://blogs.msdn.com/mediasdkstuff/

    Wednesday, December 14, 2011 12:56 AM
    Moderator
  •  James I am Setting the same Bit Rate and Frame rate what I am getting from the   GetAvailableMediaStreamProperties () Api.May Be I will Check Bit Rate one more time if I am wrong then I will mark it as answer.

    One more thing What I noticed in the result of the this  Api is for Each Pixel format (1080X1920)it is showing only one frame rate but it does support multple frame rate.Same is true all other Pixel format.

     

    Please explain this !

    Thanks

     

     

    Saturday, December 17, 2011 4:41 PM
  • Chris,

    Sorry for the slow reply. We have been on holiday here in the United States.

    Unfortunately I am confused by your reply. GetAvailableMediaStreamProperties returns a MediaStreamType enumeration member. This method does not return encoding profile properties. Am I missing something?

    Thanks,
    James

    Friday, December 30, 2011 9:37 PM
    Moderator
  • Hi James,

    We have to pass MediaStreamType(Audio,Video etc..) enumerator to Get  MediaStreamPropertise

    GetAvailableMediaStreamProperties returns IMediaEncodingProperties then we need to cast it to

    VideoEncodingPropertise for Video Propertise or AudioEncodingProperties for audio Propertise.

    My feeling is Api is not mature enough for now.Thats  why I am not able to enumerate all the propertise.

     

    Please confirm the status of all media Libraries


    Tuesday, January 03, 2012 5:44 AM
  • Hey Chris,

    Okay, I think I understand what you are trying to do. Give me a couple of days to try and reproduce the issue that you are seeing and I'll get back to you with what I find.

    Thanks for your patience,

    James

    Thursday, January 05, 2012 12:32 AM
    Moderator
  • Chris,

     

    I've been looking into this very closely. To setup the profile correctly you need to make sure to set the major type, sub type and all of the container properties. I know from my experience with ASF that trying to create a profile from scratch is difficult at best because of all of the configuration that needs to be done upfront. While I think that it is theoretically possible it will likely take a lot of effort for us to get this figured out. I could not find any examples of how to do this internally or externally. I will put this on my list and make a request that we create a custom profile sample for the next release.

     

    I hope this helps,

     

    James

    Wednesday, January 11, 2012 2:46 AM
    Moderator
  • Thanks James, for your effort.
    Wednesday, January 11, 2012 7:51 AM
  • Chris,

     

    I've been looking into this very closely. To setup the profile correctly you need to make sure to set the major type, sub type and all of the container properties. I know from my experience with ASF that trying to create a profile from scratch is difficult at best because of all of the configuration that needs to be done upfront. While I think that it is theoretically possible it will likely take a lot of effort for us to get this figured out. I could not find any examples of how to do this internally or externally. I will put this on my list and make a request that we create a custom profile sample for the next release.

     

    I hope this helps,

     

    James

    Hi James Any progress in the issue I have raised.
    Friday, May 04, 2012 7:16 AM
  • Hello Chris,

    Thanks for the follow-up. Yes we are painfully aware of this lack of documentation regarding custom encoder profiles. Ware investigating our options at this time. While I can't guarantee anything please be on the lookout for more guidance coming soon.

    Thanks,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Tuesday, May 08, 2012 1:15 AM
    Moderator