I need a simple method which takes an input stream with video or audio in any format supported by ffmpeg or libav and converts it to an output stream with decoded audio in 11 KHz, 16 bit, mono (PCM, raw audio).
public class Converter
public void Execute(Stream inputStream, Stream ouputStream)
// code here
- For specification purposes only: the command line parameters for ffmpeg for this operation are the following:
[url removed, login to view] -i [url removed, login to view] -ar 11025 -ac 1 -f s16le -acodec pcm_s16le [url removed, login to view]
- The code should be implemented using p/invoke to ffmpeg DLLs ([url removed, login to view], etc.) and not by using [url removed, login to view] executable.
- The code should be C# (alternatively, purely managed C++/CLI is also acceptable)
- It should be possible to instantiate multiple instances of above classes and use them at the same time.
- The stream may be a perpetual stream from the network, so it is important not to attempt to read all data into memory.
- Preferably the code should be as minimalistic as possible without unused p/invoke definitions.
- Code should work with the latest version of the ffmpeg/libav library.
- Target system is 64-bit only.
Delivery should include complete sln, csproj and all needed cs files.
Existing c# ffmpeg/libav wrappers can be used if the final delivery meets description (must work with latest binaries in 64-bit, see below) and the wrapper should be available with sources, however clean/green field solution is slightly preferred.
Here are the ffmpeg DLLs:
More details and clarifications:
- Streams are standard .net stream (System.IO.Stream)
- input format may not be 11 KHz, mono (resampling by ffmpeg, see command line specs above)
5 freelancers are bidding on average $115 for this job
Hello, sir. I'm interested with your project. I'll do it for you. Reference to [url removed, login to view], NVR. NVR is solution using ffmpeg 32bit/64bit. Regards.