Directshow file reader wmv
In DirectX 9. This behavior was maintained to ensure backward compatibility with applications that used the Windows Media Player 6. That filter is created, connected, run, and eventually released by the Filter Graph Manager.
Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Please rate your experience Yes No. Any additional feedback? In this article. This interface can also be used to obtain other interfaces on the Reader Object directly. But if you are considering using the codec objects directly in DirectShow using file containers other than ASF, there are certain behaviors and issues that you should be aware of in advance.
If you are going to use standalone codecs with DirectShow, you will probably want to use them as DMOs only. You can use DirectShow to encode WMA streams into any file container format for which you have a multiplexer filter.
The audio encoder DMO outputs samples of varying duration, even when in "constant bit rate" mode. It therefore works best with file container formats that use time stamps. AVI files do not provide a time stamp for each audio sample or group of samples. The assumption underlying this calculation is that all audio samples in the stream are of equal duration; however, the samples output by the DMO are not of equal duration, and so the time stamps applied by the AVI Splitter are not accurate.
The Windows Media Audio 9 Voice codec will work in some cases, but even this will lose sync after any seek operation, so it really cannot be considered a viable solution. Another option is to use uncompressed PCM audio, although obviously the resulting file size will be much larger than with a compressed audio stream.
As long as you follow the correct order of operations when building the filter graph, as demonstrated in the sample application, it is relatively simple to place WMV content into an AVI file using the AVI Multiplexer and the File Writer. The two-pass encoding modes require a more complex approach to graph building and streaming in order to prevent the DMO from flushing its contents from the first pass before beginning the second pass.
In two-pass encoding, it is necessary to run the graph once so the DMO can perform its preprocessing analysis of the file data, and then rewind the graph and run it again so that the DMO can do the actual encoding.
0コメント