Where should we start from? First, go to MSDN. In other words: I had to do more research to find answers to these questions. When I started coding, I got some strange errors from the code. What is the resulting video resolution? I didn't know. ![]() Which formats are possible? I didn't know. Are there other ways to change the audio/video format? Via a profile representing the audio/video format. Via a right click on the filter in graphedt, the windows showed up, so I knew it was there. How to change the audio/video format? This could be done via the property window that belongs to the ASF file writer. Which audio/video format should be used? Well, I didn't know. What file writer needed to be used (looking into graphedt)? The WM ASF file writer seemed to be the one. So, when starting the implementation for saving the Windows Media files, many questions were raised. It is obvious that the selection of the preferred Windows Media audio/video format is essential. For ASF, this will be the ASF file writer for AVI, this will be the AVI mixer and file writer (two filters!). It not only sets the filename as the name suggests, but it also adds filters to the graph. The SetOutputFileName() method is very important. It was used for changing the Windows Media audio/video format, but the example showed me a video-only GUID and I had the idea that there were many more possible choices. It was not fully clear to me what to do with ConfigureFilterUsingProfileGuid(). I noticed that ConfigureFilterUsingProfileGuid() was also used. I was in favor of the minor version using SetOutputFileName() and RenderStream(). Comparing these examples with the DirectX.Capture class example, I noticed that minor to major code modifications would be needed. Looking around at possible coding examples, I came across the Windows Media format. These are generally known formats, but coding was not very straightforward. My first idea was to save audio as WAV (about 10 MB per minute) or as MP3 (about 1 MB per minute) and describe the resulting implementation. ![]() Also, I did not find other complete C# examples on this subject, so I thought an article on this subject might be interesting. It took quite a lot of searching and reading before I came to the solution presented in this article. The enhancements described in this article make it possible to save audio in Windows Media Audio format. Sometimes, only the audio needs to be saved (e.g. ![]() This format is not very usable because it often results in huge files. Originally, DirectX.Capture supported AVI file saving only.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |