使用 Expression Encoder SDK 确定媒体是否需要转码

发布于 2024-11-03 04:49:03 字数 163 浏览 0 评论 0原文

我有大量媒体文件,我经常需要这些文件来使 Silverlight 做好准备。基本上,取一个文件夹并对所有视频和音频文件进行转码。

添加 MediaItem 时,有没有办法确定它是否不需要任何转码 - 即它是否已经准备好根据默认编码过程在 Silverlight 中播放?

I have a large number of media files I will regularly need to make Silverlight-ready. Basically, take a folder and transcode all the video and audio files.

When adding a MediaItem, is there a way to determine if it doesn't require any transcoding - i.e. it's already ready to be played in Silverlight based on the default encoding process?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼眸里的快感 2024-11-10 04:49:03

我是从相反的方向解决这个问题的。我想将多个文件附加在一起。因为我知道它们的格式都相同,所以我只想执行附加而不重新编码。我学到的一些课程应该对你有帮助。

我所做的是将 OutputFormat.VideoProfile 的编码设置为与 SourceVideoProfile 相同。在您的情况下,您需要将 OutputFormat.VideoProfile 设置为所需的编码配置文件,然后您可以比较所有媒体文件的 SourceVideoProfile 并跳过那些相同的。

还需要注意的是,表达式编码器不会重新编码具有匹配源和输出配置文件的文件。这意味着,如果您不进行这些检查,您可能仍然没问题。

有关比较视频配置文件的更多信息,请查看 MergeMedia 示例MediaInfo 示例< /a> 来自微软。示例代码不在网上,但如果您安装了 Expression Encoder SDK,它就在那里:
*C:\Program Files\Microsoft Expression\Encoder 4\SDK\Samples*

I was working through this from the opposite direction. I wanted to append multiple files together. Since I knew they were all formatted the same way, I just wanted to perform the appending without re-encoding. Some of the lessons I learning should help you out.

What I did was to set the encoding of the OutputFormat.VideoProfile to be the same as the SourceVideoProfile. In your case you would want to set the OutputFormat.VideoProfile to your desired encoding profile and then you could compare the SourceVideoProfile of all your media files and skip the ones that are the same.

It is also important to note that the Expression Encoder will not re-encode files that have matching source and output profiles. This means that if you didn't do these checks, you'd probably still be okay.

For more information on comparing the video profiles check out the MergeMedia sample and the MediaInfo sample from Microsoft. The sample code is not online, but if you install the Expression Encoder SDK it's in there:
*C:\Program Files\Microsoft Expression\Encoder 4\SDK\Samples*

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文