Media time problems encountered when saving WMV files using wm asf writer in DirectShow

Source: Internet
Author: User
Occasionally, the WMV file on the hard disk is superimposed on a video using DirectShow, and then connected to the wm asf writer filter to save the superimposed video as a WMV file. I have obtained the iconfigasfwriter interface of this writer and used configurefilterusingprofileguid () to modify and set the profile.

If I do not modify the profile, that is, use the default one, no problem (in graphedit debugging display, the default profile code stream is 256 kbps ).

Because a large number of WMV files need to be processed, the bitstreams of these WMV files are different, And the bitstreams need to be changed accordingly with the bitstreams of the WMV files, I used to obtain the audio/video stream of the original WMV file, and then decided to select the corresponding profile. Most of them were normal, but I encountered the following problem:

Original file a. wmv, audio code stream 48 kbps, video code stream 302 kbps, video Duration: 3 minutes 40 seconds
1. Profile: wmprofile_v80_256video, video Duration: 3 minutes 40 seconds, correct
2. Profile: wmprofile_v80_384video, video Duration: 9 minutes 20 seconds, incorrect
3. Profile: wmprofile_v80_768video, video Duration: 3 minutes 40 seconds, correct

In 2, the video time changed from 3 minutes 40 seconds to 9 minutes 20 seconds, but there was only content in the previous 3 minutes 40 seconds. Why does the time change here ??????

When audio is available, most of the time is based on audio and video. Is the audio to be processed?

After debugging for one day, I read the materials for one day...

The final solution is really an audio problem. The audio code stream cannot be the same as the original file. It should be smaller, so there is no problem. I guess the video has the same problem, but it didn't happen ...............

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.