视频时间轴 [英] Video timelinebar

查看:368
本文介绍了视频时间轴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我正在开发一个程序。我希望在我的应用程序中有一个视频时间轴栏,就像在视频编辑软件中一样。我可以在互联网上使用API​​吗?或者我可以做一个自我?


关于,


Martin de Groot

解决方案

嗨Martin,


您使用哪种技术来开发程序?是Windows窗体吗?或WPF?


如果是Winform,,您可以使用Windows Media播放器实现您的目的:


添加它首先通过选择项目到你的工具箱:



然后是C#代码:

 private void btnLoadFile_Click(object sender,EventArgs e)
{
Startindex = 0;
playnext = false;
OpenFileDialog opnFileDlg = new OpenFileDialog();
opnFileDlg.Multiselect = true;
opnFileDlg.Filter ="(mp3,wav,mp4,mov,wmv,mpg,avi,3gp,flv)| * .mp3; * .wav; *。mp4; * .3gp; * .avi; * .mov; * .flv; *​​。wmv; * .mpg |所有文件| *。*" ;;
if(opnFileDlg.ShowDialog()== DialogResult.OK)
{
FileName = opnFileDlg.SafeFileNames;
FilePath = opnFileDlg.FileNames;
for(int i = 0; i< = FileName.Length - 1; i ++)
{
listBox1.Items.Add(FileName [i]);
}


Startindex = 0;
playfile(0);
}
}

有关此用法的详细信息,请查看以下文档:


音频和视频播放器C#Winform


如果你使用WPF ,你应该建立一个用户控件来显示一个小时的时间或时间:


WPF:TimeLineControl


在WPF中为DataGrid制作时间轴控件


注意:此响应包含对第三方万维网站点的引用。 Microsoft提供此信息是为了方便您。


Microsoft不控制这些网站,也没有测试在这些网站上找到的任何软件或信息;

因此,Microsoft无法就质量做出任何陈述,在那里找到的任何软件或信息的安全性或适用性。

使用互联网上的任何软件都存在固有的危险,微软提醒您确保在检索之前完全理解风险任何来自互联网的软件。


希望这会有所帮助!


最好的问候,


Stanly


Hello,

I'm developing a program. I want to have a video timeline-bar in my application, like in a video editing software. Is there a API on the internet that I can use? Or can I make one self?

With regards,

Martin de Groot

解决方案

Hi Martin,

Which technology do you use to develop your program? Is it Windows Form? Or WPF?

If it is Winform, you can use the Windows Media player to achieve your purpose:

Add it to your Toolbox first through Choose Item:

Then the C# code:

       private void btnLoadFile_Click(object sender, EventArgs e)
       {
           Startindex = 0;
           playnext = false;
           OpenFileDialog opnFileDlg = new OpenFileDialog();
           opnFileDlg.Multiselect = true;
           opnFileDlg.Filter = "(mp3,wav,mp4,mov,wmv,mpg,avi,3gp,flv)|*.mp3;*.wav;*.mp4;*.3gp;*.avi;*.mov;*.flv;*.wmv;*.mpg|all files|*.*";
           if (opnFileDlg.ShowDialog() == DialogResult.OK)
           {
               FileName = opnFileDlg.SafeFileNames;
               FilePath = opnFileDlg.FileNames;
               for (int i = 0; i <= FileName.Length - 1; i++)
               {
                   listBox1.Items.Add(FileName[i]);
               }


               Startindex = 0;
               playfile(0);
           }
       }

For more details about this usage please view the following document:

Audio and Video Player C# Winform

If you use WPF, you should build a user control that would display time or times for a partcular hour:

WPF: A TimeLineControl

Making Timeline Control for DataGrid in WPF

Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.
Microsoft does not control these sites and has not tested any software or information found on these sites;
Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

Hope this helps!

Best Regards,

Stanly


这篇关于视频时间轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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