Windows Media Format SDK cut WMV/WMA files

Source: Internet
Author: User

Someone asked for help cutting the WMV file:

I have read the wmvcopy example in the Windows Media Format SDK. This example provides the WMV cutting function by inputting a time range parameter (from 0 s to X S ), however, what I want to achieve is the cut from a second to B second. Besides, I cannot understand where maxduration is used, which of the following statements can help you !!!!!!
 
I have similar requirements. After reading the Windows Media Format SDK, I found it quite simple.

You only need to add two lines of code in cwmvcopy: onstreamsample:

If (cnssampletime <m_qwfrompos)
Return (HR); // skip head

You can start cutting in seconds.

The csdn blog cannot insert attachments. If you want a complete VC project file, you can send a message to me and I will send it to you by email.

In addition, the SDK example wmvcopy has an obvious bug. You cannot copy large files. You must modify it a bit.

Uploaded resources:

Source program of wmvcopy

Http://download.csdn.net/detail/jq0123/3838130

  • Resource size: 13kb
  • Upload Date: 2011-11-24
  • Resource points: 1 point

Related Article

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.