I have a custom audio decoder for g711.1 (please note that this is different from g711) which should work with WMP.
So when a WAV file containing g711.1 encoded audio is opened by WMP -
the decoder will be invoked and the file will be played.
As i understand a wrapper is needed for the decoder to comply with interface(s) WMP is using,
and also some way of registering the decoder so WMP will know from where to load it and use it for g711.1.
Where can i find a recipe for making a WMP decoder, or better, a sample of a simple decoder?
I have looked at the Media Foundation Sample "Decoder", but not sure this is the correct sample for me.
Thanks.
Related
I am creating a program that will record microphone audio and convert it into mp3 using the DirectShow API in Visual C++.
There is no built in filter to convert to convert audio into MPEG Layer 3 i.e. MP3 so i want to send the mic buffer to an external library called as LAME , it will convert the data in MP3 and then i can write it to a file using a file writer.
But the problem is that i dont know how to access the buffer of the microphone , please help me i am new in directshow programming..
or tell me any other way to do it
If you want to distribute your application then I will suggest to use Sample Grabber instead of Lame DirectShow Encoder filter. This will avoid filter registration but you will need to handle conversion logic.
Regarding using LAME encoder,
what is the return value of hr = pOutputDevice->FindPin().
you can give a try using GraphEdit and check for pin properties.
You should be able to do this using a Sample Grabber.
You set it up with a callback object that will receive the samples. You can create a graph with just the source, the sample grabber and a Null Renderer.
I have an C-Code for a video codec. It takes in a compressed format as an input and give out a YUV data buffer. As a standalone application i'm able to render the YUV generated using OpenGL.
Note: This codec is currently not supported by VLC/gstreamer.
My task now is to create a player using this code (that is with features such as play, pause, step, etc.). Instead of re-inventing the whole wheel, i think it would be better if i'm able to integrate my codec into gstreamer player code(for Linux).
Is it possible to achieve the above? Is there some tutorial using which i can proceed? I have searched a lot on net but was unable to find anything specific to my requirement. Any information or links specific to the above problem will be of great help to me. Thanks in advance.
-Regards
Since the codec and container are of new MIME types, you will have to implement a new GstElement for demuxer and codec. A simple example (for audio) is available in this location. I presume this should provide a good starting reference for you.
Some additional links:
To create a decoder plugin, you can refer to the vorbisdec implementation.
To create a demuxer, you can refer to the oggdemuxer implementation.
Reference to factory make
I'm wondering if it's possible to draw an audio channel of a video or audio file as an image using ffmpeg, or if there's another tool that would do it on Win2k8 x64. I'm doing this as part of an encoding process after a user uploads a video or audio file.
I'm using ColdFusion 10 to handle the upload and calling cfexecute to run ffmpeg.
I need the image to look something like this (without the horizontal lines):
You can do this programmatically very easily.
Study the basics of FFmpeg. I suggest you to compile this sample. It explains how to open a video/audio, identify the streams and loop over the packets.
Once you have the data packet (in this case you are interested only in the audio packets). You will decode it (line 87 of this document) and obtain the raw data of an audio. It's the waveform itself (the analogue "bitmap" for an audio).
You could also study this sample. This second example is how to write a video/audio file. You don't want to write any video, but with this sample you can easily understand how the audio raw data packet works, if you see the functions get_audio_frame() and write_audio_frame().
You need to have some knowledge about creating a bitmap. Any platform has an easy way to do that.
So, the answer for you: YES, IT IS POSSIBLE TO DO THIS WITH FFMPEG! But you have to code a little bit in order to get what you want...
UPDATE:
Sorry, there are ALSO built-in features for this:
You could use those filters... or
showspectrum, showwaves, avectorscope
Here are some examples on how to use it: FFmpeg Filters - 12.22 showwaves.
I have a program that captures and stores H.264 encoded video as well as audio into a proprietary format file. I need to be able to export that video and audio to an mp4 file. I prefer C# but will use C++ if necessary. Any suggestions?
To produce MPEG-4 Part 14 .MP4 file you need a multiplexer. There is a choice of multiplexers out there:
FFmpeg (libavformat)
DirectShow filters (free and open source from GDCL, commercial)
Windows 7+ Media Foundation file sink
API and complexity might vary because some of multiplexers are expected to be a part of pipeline, they are not completely standalone classes. You might want to check respective samples (and license agreements, perhaps, too) to see what is best for you.
Take a look at libmp4v2. Fairly straightforward to use..
http://code.google.com/p/mp4v2/
I want to generate .mp4 file using Direct show samples (AMCap). But i don't know how to implement this.
Can anyone please help me about this?
Thanks in advance,
Dhaval Kariya
AMCap Sample captures and displays video. No encoding and choices of multiplexing into files (only basic capture/recording through a basically obsolete helper interface).
Video capture application.
This sample application demonstrates the following tasks related to
audio and video capture:
Capture to a file
Live preview
Allocation of the capture file
Display of device property pages
Device enumeration
Stream control
The items above might be confusing as they mention capture and file allocation. This is a trail of 15 years old history when file capture was a big deal. The helper object to initialize capture targets AVI and ASF/WMV only, you neither can extend it to support other formats, nor you need to.
You need to check how to store video/audio into files (see below) and follow the same steps in building the pipeline with MPEG-4 encoders and multiplexer. You will need to use a third party MPEG-4 multiplexer for MP4 file format because Windows does not provide you with such out-of-the-box usable component.
See:
Capturing Video to a File
Free DirectShow Mpeg-4 Filters