locked
How to access ICODEC property RRS feed

  • Question

  • HI,

    I am working on the camcorder application. I am trying to get set few parameters in encoder through ICODEC properties such as:

    - Common Rate Control Mode

    - Common and Max Bit Rate

    - GOP Size

    - Buffer Size

    - Common Quality etc.

    Can you help me how to do it for Metro Style app development under JavaScript?

    Thanks,

    Matic 

    Friday, February 10, 2012 2:05 AM

Answers

  • Hello,

    The ICodecAPI object is not exposed in WinRT and is not accessable from Metro apps. You can use the "MediaEncodingProfile" class and more specifically the "VideoEncodingProperties" class to change the various properties of the WinRT video stream. Each codec has a specific set of properties. Since these may not be consistant between implimentations you can get a "MediaPropertySet" from the "VideoEncodingProperties" object and iterate through the property set to find the property that you want to modify.

    I hope this helps,

    James



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

    Saturday, February 11, 2012 12:29 AM
    Moderator

All replies

  • Hi,

    I am working on the camcorder application. I am trying to get set few parameters in encoder through ICODEC properties such as:

    - Common Rate Control Mode

    - Common and Max Bit Rate

    - GOP Size

    - Buffer Size

    - Common Quality etc.

    Can you help me how to do it for Metro Style app development under JavaScript?

    Thanks,

    Matic
    Friday, February 10, 2012 3:23 AM
  • Hello,

    The ICodecAPI object is not exposed in WinRT and is not accessable from Metro apps. You can use the "MediaEncodingProfile" class and more specifically the "VideoEncodingProperties" class to change the various properties of the WinRT video stream. Each codec has a specific set of properties. Since these may not be consistant between implimentations you can get a "MediaPropertySet" from the "VideoEncodingProperties" object and iterate through the property set to find the property that you want to modify.

    I hope this helps,

    James



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

    Saturday, February 11, 2012 12:29 AM
    Moderator
  • With VideoEncodingProprties there are very few items that can be modified:

    Property

    Access type Description

    Bitrate

    Read/write Gets or sets the video bit rate.

    FrameRate

    Read-only Gets or sets the video frame rate.

    Height

    Read/write Gets or sets the video image height.

    PixelAspectRatio

    Read-only Gets or sets the pixel aspect ratio.

    Properties

    Read-only Gets additional format properties for the video stream.

    Subtype

    Read/write Gets or sets the subtype of the format.

    Type

    Read-only Gets or sets the format type.

    Width

    Read/write Gets or sets the video image width.

    From the list, captured from msdn, I do not see can set any other ICODEC property beside bitrate.

    Is there any plan to enable access to all other ICODEC properties through WInRT?

    Tuesday, February 14, 2012 12:22 AM
  • Hello,

    You are correct. It appears that VideoEncodingProprties.Properties is read only. Not what I expected. I sent a mail to our media architect to let him know that exposing these other properties would be very helpful. If he comes back with anything I can share I will certainly let you know. At this time I think that the reality is this is "by design".

    -James


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

    Tuesday, February 14, 2012 2:17 AM
    Moderator
  • I appreciate your help as well as any firther feedback regarding this subject.
    Wednesday, February 15, 2012 12:48 AM
  • Hey,

    I did hear back from our architect. He cofirmed that the current implientation is "by design". The team is aware of the limitaion but I'm not sure if they will be able to consider a design change.

    I hope this helps,

    James


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

    Wednesday, February 15, 2012 2:16 AM
    Moderator