gstreamer mp3 demuxer - gstreamer

Any Idea what demuxer should be used for mp3 ? I trying to implement hello world program for playing an mp3.

mp3 streams are usually not muxed. You will use a bitstream parser (such as mp3parse) and then a mp3decoder (such as mad).

Related

How can I stream sound from the microphone in mp3 format?

I need a software that can stream audio with mp3 format.The audio will come from the microphone at the same time.
I have a software that can stream sound with alaw and ulaw codecs.
And I have an another program that can stream recorded mp3 file. Not capture from the microphone.
I can make stream with VLC.Dotnet wrapper but I didn't succeed with directshow.(namely microphone)
Here my Vlc.Dotnet code;
myVlcControl.Play("dshow://");
myVlcControl.Play(new Uri("dshow://"));
It did not work with this codes. I don't know what causes the problem.
My second software can stream sound that captures form microphone in real time. But its codec format is alaw not mp3. I did not find any converter that convert linear to mp3 file. I find a converter that convert linear to alaw. this is the link Linear to Alaw Codec
I know the LAME and NAudio but it converts wav file to mp3. I need linear to mp3(like in the link)
I am very confused. I really do not know which way to go.
1. Find a codec linear to mp3 (It's very complicated) ?
2. Learn VLC direct Show usage on .NET ?
Thank you so much in advance.
*VLC.DotNet, axVLCPlugin21, LAME, ffmpeg....
As soon as I've successfully solved this problem with VLC.Dotnet wrapper. The problem is compiling with x64 architectural. When I was compiled with x86 architectural, The problem solved.

FFmpeg C++, H.264 parser build

I currently working on a project simulate webcam video transmission in C++, at sender side, I capture the raw webcame video with v4l2, encoded with FFmpeg, video file are put into an array and transmitted. And at decoder side, video data received to an array, decoded and play. The program works fine with codec_id AV_CODEC_ID_MPEG1VIDEO, but when I try replace it with AV_CODEC_ID_H264, some problem happen in decoding, please refer to FFmpeg c++ H264 decoding error. Some people suggest me to use parser but I have no idea how is a parse in ffmpeg looks like. Any simple example of how to build a parser for H.264 in FFmepg? I cannot find such tutorial in google.....

Converting/wrapping h264 video stream into MPEG2 TS

I am reading in an mp4 file which I can demux. The file contains h264 video stream. I want to be able to wrap the h264 video stream in mpeg2 ts such that I can pass it onto other parts of the system as mpeg2 ts or even writing it into a new file as mpeg2 ts.
Any pointers would be appreciated.
Thanks,
I recommend FFMPEG for this task. Here are some example uses for format conversions
tsMuxeR was built for this purpose.
If you have troubles with that tool, try TsRemux.

How to decode mp3 into wav using lame in C/C++?

I learned how to encode wav into an mp3 using lame_encode_buffer_interleaved from this question: Is there any LAME c++ wraper\simplifier (working on Linux Mac and Win from pure code)?
Now I want to decode the mp3 back into wav. I know there's lame_decode but I don't know how to use it since it requires two pcm buffers (pcm_l and pcm_r). I don't understand how to put them together into a well-formed wav file, because I don't really know how they works.
Now can someone provide a simple working example on decoding an mp3 into a wav using lame in C/C++?
Thanks.
Take a look into the lame frontend source code. Start at the lame_decoder() function in the .../frontend/lame_main.c file, it decodes an MP3 file and writes the wave header.

How to convert a FLV file recorded with Red5 / FMS to MP3?

I'm looking for a way to extract the audio part of a FLV file.
I'm recording from the user's microphone and the audio is encoded using the Nellymoser Asao Codec. This is the default codec and there's no way to change this.
ffMpeg is the way to go !
It worked for me with SVN Rev 14277.
The command I used is : ffmpeg -i source.flv -nv -f mp3 destination.mp3
GOTCHA :
If you get this error message : Unsupported audio codec (n),
check the FLV Spec in the Audio Tags section.
ffMpeg can decode n=6 (Nellymoser).
But for n=4 (Nellymoser 8-kHz mono) and n=5 (Nellymoser 16-kHz mono) it doesn't work.
To fix this use the default microphone rate when recording your streams, overwise ffMpeg is unable to decode them.
Hope this helps !
This isn't an exact answer, but some relevant notes I've made from investigating FLV files for a business requirement.
Most FLV audio is encoded in the MP3 format, meaning you can extract it directly from the FLV container. If the FLV was created from someone recording from their microphone, the audio is encoded with the Nellymoser Asao codec, which is proprietary (IIRC).
I'd check out libavcodec, which handles FLV/MP3/Nellymoser natively, and should let you get to the audio.
I'm currently using FFmpeg version SVN-r12665 for this, with no problems (the console version, without any wrapper library). There are some caveats to using console applications from non-console .NET environments, but it's all fairly straightforward. Using the libavcodec DLL directly is much more cumbersome.
I was going to recommend this: http://code.google.com/hosting/takenDown?project=nelly2pcm&notice=7281.
But its been taken down. Glad I got a copy first :-)