Answered by:
How to access ICODEC property

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/
- Marked as answer by James Dailey - MSFTMicrosoft employee, Moderator Saturday, February 11, 2012 12:29 AM
Saturday, February 11, 2012 12:29 AMModerator
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- Merged by James Dailey - MSFTMicrosoft employee, Moderator Saturday, February 11, 2012 12:12 AM dup
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/
- Marked as answer by James Dailey - MSFTMicrosoft employee, Moderator Saturday, February 11, 2012 12:29 AM
Saturday, February 11, 2012 12:29 AMModerator -
With VideoEncodingProprties there are very few items that can be modified:
Property
Access type Description Read/write Gets or sets the video bit rate. Read-only Gets or sets the video frame rate. Read/write Gets or sets the video image height. Read-only Gets or sets the pixel aspect ratio. Read-only Gets additional format properties for the video stream. Read/write Gets or sets the subtype of the format. Read-only Gets or sets the format type. 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 AMModerator -
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 AMModerator