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