Non-linear editing des based on DirectShow

Source: Internet
Author: User

Summary

This paper expounds the basic principle of non-linear editing based on DirectShow core frame, and provides an edited source code, demonstrates how to splice two audio and video files, realize the effect of video transition, and preview.

Compile environment windowsxp,vc6.0+sp5,dx9 SDK.

Technical principle

DES (DirectShow Editing Services) is a set of programming interfaces based on the DirectShow core framework. The advent of DES simplifies the task of video editing and makes up for the congenital insufficiency of DirectShow for the non-linear editing of media files. However, as far as technology itself is concerned, des does not transcend the DirectShow filter architecture, but is only an enhanced application of DirectShow filter. We can see the location of Des in our entire multimedia processing application from the image below.

Next, let's take an example to see what des can do for us. If we now have three files A, B and C, use these three files to make a composite file. We want to take the 4 seconds of a, followed by the 10 seconds of B, followed by the contents of C 5 seconds. If this is the case, it is not difficult to make use of DirectShow filter directly. (In general, the application level maintains the editing information for individual files, and the application dynamically creates/controls a single filter Graph based on these information to process each file sequentially.) However, if our "ideas" are changed at any time, we now want C to appear before B, or we want to take 10 seconds of the different positions of a, or we want to add a nice background music to the entire composite file. If we still use DirectShow filter directly, the situation becomes very complicated. However, for DES, this is really a small case! (all the editorial information is told to DES with the interface provided by DES, and other such as filter graph creation/control output is completely entrusted to des!). At this time, the Des created by the filter graph with various source output control functions, generally more complex. )

If we use DES, we can also get the following convenience:

1. Based on the structure of Time Line (Timeline) and the concept of track, the organization and editing of multimedia files become intuitive and efficient;

2. Support for instant preview;

3. Video editing projects support the form of XML document preservation;

4. Support the effect of video/audio processing, and video switching between the transition processing;

5. Can directly use DES to provide more than 100 kinds of SMPTE transition effect, as well as MS IE with a variety of transform, transition components;

6. Support the image synthesis by hue, brightness, RGB value or alpha value;

7. Automatically adjust the video frame rate and audio sampling rate of the source file output, and support the zoom of video directly.

Next, let's take a look at the structure of DES (timeline model), as shown in the following illustration:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.