C # coding and decoding methods using VFW in video Development

Source: Internet
Author: User

This article uses VFW to solve the encoding and decoding process in the video process. The encoding format used is XviD.

I am also the first time processing videos. at the beginning, I checked a lot of information on the Internet, including downloading a lot of C # Video Processing code, such as Gowk and lanmsg3.0 (also using the Gowk kernel). I found that the code for video codec is incorrect. some save this part of the code. it seems that the author failed to debug the code.

The video processing code or articles on the Internet are Delphi or C ++, and they are all introductory articles, none of which provide core solutions.

When processing codec, We need to specify the same encoding type, which can be obtained using the icopen function. the HIC must be used when data is processed. at the same time, for bitmapinfo objects in the decoding process, the processing rules are bitmapinfo B1 During encoding and bitmapinfo B2 After encoding. When decoding is required, the decoding sequence is the opposite, that is, B2 is used as the input, and B1 is the output. I have not found these basic ideas online. finally, you can understand it by reading a piece of foreigner's c ++ code. it took me a week before.

Therefore, for the ICM class in Gowk, we do not need the two classes derived from it. We need to integrate the function of the codec subclass into a class so that we can share the HIC, and bitmapinfo object.

The real function is nothing more than icdecompress, icseqcompressframe, which can be found in msdn. If you want to process videos, I think it can be implemented as long as you understand the ideas.

 

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.