总比特率或视频:数据速率,音频:比特率..无法从MediaItem类中找到这些属性 [英] Total Bitrate or Video :Data Rate ,Audio :Bit Rate.. Cant find these properties from MediaItem class

查看:326
本文介绍了总比特率或视频:数据速率,音频:比特率..无法从MediaItem类中找到这些属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我试过 找出信息 关于编码的媒体项目。我 已编码这些文件,我需要查找信息  关于它们(如以Bbps为单位的TotalBitRate,视频数据速率和音频BitRate)。但
Expression Encoder 4 SDK没有属性。 如果我去右键点击 媒体 项目 和 去 属性和点击详情  。标签 我可以看到视频 物业和 音频属性包括 总 比特
汇率和 视频 比特率和 音频 比特率..但是 我不能 从Expression Encoder 4 SDK中找到这些属性?请 帮助我!!


string filename = @" C:\ test.mp4";



MediaItem
Mediaitem =



 



new
MediaItem
[filename];



Mediaitem.SourceVideoProfile.Streams [0] .Bitrate.ToString();



Mediaitem [i] .SourceVideoProfile.Streams [0] .Bitrate.ToString();



Mediaitem [i] .MaxBitrate.ToString();


最大比特率是  int type ..


请帮助我如何在上面找到这些属性?


谢谢


解决方案

如果你看一下比特率你会看到它是一个类,因为它可能是ConstantBitrate,VariableConstrainedBitrate,VariableUnconstrainedBitrate或VariableQualityBitrate。如果你在调试器中检查它,你会看到它是哪种类型,然后你可以将它
投射到正确的输入,然后访问该类型中的相关值。


希望有助于支付b

Dean。


Hi ,

I tried  to find out information  about encoded media items.I  already encoded these files, I need to find information   about them ( like TotalBitRate in kbps, Video Data Rate and Audio BitRate). but there is no properties from Expression Encoder 4 SDK.  If i go and right click on  the media  item  and  go to  properties and click details  tab.  I can see Video  properties and  audio properties including  total  bit rate and  video  bit rate and  audio  bit rate.. but  I cant  find these properties from Expression Encoder 4 SDK? Please  help me!!

string filename=@"C:\test.mp4";

MediaItem Mediaitem =

 

new MediaItem [filename];

Mediaitem.SourceVideoProfile.Streams[0].Bitrate.ToString();

Mediaitem[i].SourceVideoProfile.Streams[0].Bitrate.ToString();

Mediaitem[i].MaxBitrate.ToString();

Max bit rate is in  int type..

Please  assist me  how can I find these properties  above ?

Thanks

解决方案

If you look at Bitrate you'll see it's a class as it could be a ConstantBitrate, VariableConstrainedBitrate, VariableUnconstrainedBitrate, or a VariableQualityBitrate. If you examine it in the debugger you'll see which type it is and then you can cast it to the correct type and then access the relevant values within that type.

Hope that helps
Regards
Dean.


这篇关于总比特率或视频:数据速率,音频:比特率..无法从MediaItem类中找到这些属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆