C# Video editor?

2019-04-10 20:50发布

I want to make a video editor in C# but, I don't know where to start.
What classes should I use? What would I compile it into(MOV, MPEG4, ect)? How would I read them?
The most important thing I am looking at though is reading them.

3条回答
Deceive 欺骗
2楼-- · 2019-04-10 21:11

This can be done in DirectX
I would like to suggest you to use DirectShow..

查看更多
Rolldiameter
3楼-- · 2019-04-10 21:13

You can use ffmpeg as simplest solution for many video editing.

Here is example code for getting a screenshot of a video: How to convert uploaded video and get a screenshot from this file?

查看更多
We Are One
4楼-- · 2019-04-10 21:14

I want to make a video editor in C# but, I don't know where to start.

A video editor is a pretty complex application with many independent subsystems. You will need asset management, a timeline, a player component, video and audio effects and filters, title generation, etc., plus a GUI that combines all of these and presents them to the user.

Out of all the above I recommend that you start by building the video player. There are several libraries that can help with this, I'm going to recommend two of them:

  • DirectShow (free from Microsoft, comes with DirectX, Windows only)
  • QuickTime SDK (free from Apple, comes with QuickTime, Windows and OS X)

Note that DirectShow will work natively in C#, but the QuickTime SDK is in C, so you will need glue code that connects your C# app to the C functions in the QuickTime DLLs.

Both libraries have high-level players that require just a handful of calls to setup, and also low-level APIs that allow you to provide your own player code. For a video editor you will need to have a custom player, as you will not only be playing video files but also rendered effects that are generated in real time. So you should work with the low-level APIs in either one of the above frameworks and write a player that initially reads a movie file, obtains the frames, and passes them to the proper decoders and renderers.

Once you have this working you can move on to the other tasks and use the video player as the foundation of your editor.

Good luck.

查看更多
登录 后发表回答