I have been tasked with creating an application that takes an audio/video capture input (using an Elgato Cam Link) and outputs it back to the user. According to Microsoft's Audio/Video Capture in Media Foundation documentation, it suggests "If you want to combine audio capture with video capture, use the aggregate [...] read more
I try to replace codes with Directshow ("DS") on Media Foundation ("MF") in my app and met one problem - cannot set a needed fps using MF on a webcam. MF allowed me to set only 30 fps. If I try to set 25 fps, I always get the error [...] read more
I am trying to convert a PCM Wav file recorded with the WasapiLoopbackCapture class to an AAC file. The Wav file is 44100, 32bit, 4 channels. using (var reader = new MediaFoundationReader("recordedfile.wav")) { MediaFoundationEncoder.EncodeToAac(reader, "encodedfile.mp4"); } However, i get a COMException from the MediaFoundationReader: Exception from HRESULT: 0xC00D5212 What am [...] read more
In the code, first I'm opening wav file called output_test.wav. I then filter the noise from the signal using fftpack. Problem: I'm trying to convert the filtered signal i.e. filtered_sig array into wav file properly. Currently when I open TestFiltered.wav I get the error: > The item was encoded into [...] read more
I am writing a simple audio player with ASIO and MIDI control support that is going to be used by a local radio station. I am using the NAudio library. The station uses some weird ancient software that uses mp2 encoded wav files. The file itself plays fine on all [...] read more
Basically I'm recording what is heard on my speakers like that speakersWaveIn = new WasapiLoopbackCapture(); //class variable waveFileWriter = new WaveFileWriter(filepath, speakersWaveIn.WaveFormat); //class variable speakersWaveIn.DataAvailable += speakersWaveIn_DataAvailable; speakersWaveIn.RecordingStopped += speakersWaveIn_RecordingStopped; speakersWaveIn.StartRecording(); speakersWaveIn_DataAvailable waveFileWriter.Write(e.Buffer, 0, e.BytesRecorded); waveFileWriter.Flush(); and on key-press speakersWaveIn.StopRecording(); waveFileWriter.Dispose(); which works perfectly. I am able to play the [...] read more
We'd like to play a video delivered by our customer using the MediaElement within a Windows 8.1 app. The videos are encoded using H.264: Format : AVC Format/Info : Advanced Video Codec Format profile : High@L5.1 Format settings, CABAC : Yes Format settings, ReFrames : 3 frames Codec ID : [...] read more
In my windows universal app, I'm trying to use a WinRT component: http://blogs.msdn.com/b/eternalcoding/archive/2013/03/06/developing-a-winrt-component-to-create-a-video-file-using-media-foundation.aspx (which is basically a C++ wrapper for sinkWriter) to create a video with frames. I put all this code in a C++ project and I can call it from my C# code without problem. The problem come [...] read more