简体   繁体   English

Microsoft.Expression.Encoder.MediaItem的可靠性如何?

[英]How Reliable is Microsoft.Expression.Encoder.MediaItem?

I am using the Microsoft.Expression.Encoder Namespace to get the thumbnail of the VideoFile Upload Via following method: 我正在使用Microsoft.Expression.Encoder命名空间通过以下方法获取VideoFile Upload的缩略图:

 MediaItem video = new MediaItem(file);
                int Duration = video.FileDuration.Seconds;
                using (var bitmap = video.MainMediaFile.GetThumbnail
                        (new TimeSpan(0, 0, (int)Duration / 2),
                        new System.Drawing.Size(640, 480)
                      ))
                {
                    bitmap.Save(Path.Combine(_fileDirectory, UniqueId + "_thumb.jpg"));
                }

Constructor new MediaItem(file) Require Native Software installed on the machine for eg QuickTime Player for .MOV Files, I am wondering If there are like 500 videos being uploaded every minute how reliable will be this scenario as it is using QuicktimePlayer to get the File info and does each thread will be able to use the QuickTimePlayer at same time? 构造函数new MediaItem(file)需要在计算机上安装本地软件,例如用于.MOV文件的QuickTime Player,我想知道如果每分钟上载500个视频,那么使用QuicktimePlayer获取文件时,这种情况的可靠性如何?信息,每个线程都可以同时使用QuickTimePlayer吗?

You would most likely need to test it yourself. 您很可能需要自己对其进行测试。 Try running this in a single thread and in several threads. 尝试在单个线程和多个线程中运行它。 It's probably wise to use threadpool, as threads can be reused. 使用线程池可能是明智的,因为线程可以重复使用。

The reason is that all the hardware is different and the same application may behave a bit differently, for example a single video card may not allow you to run two loads simultaneously, however if you have several video cards, it is likely to be possible. 原因是所有硬件都不相同,并且同一应用程序的行为可能有所不同,例如,单个视频卡可能不允许您同时运行两个负载,但是,如果您有多个视频卡,则可能会出现这种情况。

PS I have no knowledge of the video processing (or Microsoft.Expression.Encoder namespace). PS我不了解视频处理(或Microsoft.Expression.Encoder命名空间)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Microsoft Expression Encoder。 屏幕截图 - Microsoft Expression Encoder. ScreenCapture Microsoft Expression Encoder和Selenium + TeamCity - Microsoft Expression Encoder and Selenium + TeamCity Microsoft Expression Encoder在Surface Pro上不起作用 - Microsoft Expression Encoder not working on Surface Pro 使用Microsoft Expression Encoder SDK捕获静止图像 - Capture still image with Microsoft Expression Encoder SDK 来自带有微软表达式编码器的屏幕捕获的实时 stream - realtime stream from screencapture with microsoft expression encoder C#-Microsoft Expression Encoder缺少参考,如何将它们添加到项目中? - C# - Microsoft Expression Encoder missing reference, how to add them to project? 在何处获取Microsoft.Expression.Encoder.Devices的DLL - Where to get DLL for Microsoft.Expression.Encoder.Devices 无法加载文件或程序集“Microsoft.Expression.Encoder” - Could not load file or assembly 'Microsoft.Expression.Encoder' 使用Microsoft Expression Encoder和一系列位图在C#中生成视频 - Generate Video in C# using Microsoft Expression Encoder and a series of bitmaps 如何将AudioProfile与Expression Encoder作业一起使用 - How to use an AudioProfile with an Expression Encoder Job
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM