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 ...............