tags:

views:

712

answers:

1

I need to extract the audio data from a FLV and inject it into a MP3 with C#. So I'm look for either a library for this or how to do it with the rawdata/file structure.

A: 

Take a look at FLVExtract. An oss flv audio stream extractor.

Edit: The files of interest are under the Library folder. To use them in your project try this:

using (FLVFile flvFile = new FLVFile(fileName))
{
    // first param is whether or not to extract audio streams (true)
    // second param is whether or not to extract video streams (false)
    // third param is whether or not to extract timecodes (false)
    // fourth param is the delegate that gets called in case of an overwrite prompt (leave null in case you want to overwrite automatically)
    flvFile.ExtractStreams(true, false, false, null);
}
Yannick M.
I found this a few days ago, I looked over the source but, it was very confusing (im somewhat new to C#). I just want FLV to MP3 FLVExtract is more complicated than that.
Lienau
An FLV can contain other audio streams than MP3. So either you want to extract the audio stream, either you want to transcode it. If you want to extract it, FLVExtractor is your best bet.
Yannick M.
Allrighty then...
Lienau
In case it can be of help, I have added some example code. The library is pretty straight forward. Include the Library files to your project, and add a `using JDP;` to the source file you want to call it from.
Yannick M.
Yeah, that's what I ended up doing. The fist time I looked at it, my intention was to simply take the code I needed for getting the audio, it wasn't simple. But thanks for the help, I just needed another way to look at it.
Lienau