开发者

How to preload video file for use in mediaelement in VB/WPF project

开发者 https://www.devze.com 2023-01-30 05:05 出处:网络
I have a mediaelement in my project (which uses a combination of WPF4 XAML and Visual Basic 2010), and I have the mediaelement source (a relative URI) set in VB code behind. All this works swimmingly.

I have a mediaelement in my project (which uses a combination of WPF4 XAML and Visual Basic 2010), and I have the mediaelement source (a relative URI) set in VB code behind. All this works swimmingly.

However, my project contains a LOT of videos, all of which will be projected behind all the other elements of the WPF window (thus acting as a background of sorts). I need these videos to smoothly transition from one to another, without a cut. To do this, I need to preload all the videos for a particular开发者_Go百科 section.

How do I preload videos located at a relative URI, so they come up the instant they are called?

(By the way, everything I have working is the only way I can do this project, so please, no comments on what I should do instead. I just need to preload the videos or find some other way of making them seamless regardless of client computer speed.)

Thank you! -Jason C. McDonald


I have since learned that preloading is apparently not possible/not desirable in an application. Unlike the web, where preloading (buffering) involves downloading the file to the local system, buffering on a local system is limited by the system's resources and processor/CPU speed. Rendering a video file in a more compact format (such as Theora), and in a lower bitrate and quality will help alleviate video "skipping," beyond which point, the speed of video playback is determined entirely by the user's system.

Thus, testing the application on multiple systems is necessary to determine the minimum hardware requirements and system resources needed to eliminate the bottleneck in video playback.

In some cases, virtualization may also help improve program speed, freeing up resources to be used in video playback.

0

精彩评论

暂无评论...
验证码 换一张
取 消