简体   繁体   中英

C# Video editor?

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.

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.

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM