2

I want to develop a desktop application by programming in C# and using the .Net framework 4.
The goal of my application is to extract a MP3 audio stream from a supplied AVI file.
I have learned from the Internet that an AVI file is a container and it might contain different audio streams.
If the supplied AVI file contains one MP3 audio stream at least then I want to extract it and split it.
I want to split the MP3 audio stream into MP3 audio parts identified with a start time and an end time.

I have looked on the Internet for any .Net library I could use but without success.
Does someone know what documented .Net library would be useful ?

Blachshma
  • 17,097
  • 4
  • 58
  • 72
user1139666
  • 1,687
  • 4
  • 24
  • 45
  • If you want to create such a program, why not *actually* program the essential part (i.e. the splitter) and learn something along the way? – phant0m Nov 25 '12 at 11:16

2 Answers2

3

Maybe you can try this: Simple C# Wrapper for the AviFile Library

It is targeted at AVI video but there might be some clues as how to use the same methods to extract the audio only. Either use it as-is or use the example to incorporate what you need into your own code.

johannie
  • 46
  • 4
  • I can use the AviManager.GetWaveStream method to retrieve an audio stream from an AVI file. But I have not found a method to create a MP3 file from an audio stream. The only files I can create are AVI files. – user1139666 Nov 27 '12 at 10:00
  • Hey i'm trying to use the avi dll functions friom the link but it doesn't seem to work on .net 4.0 but does on .net 4.5 any ideas how i could get it to work? I have no choice and have to use 4.0 due to needing to support xp – ZoomVirus Jun 02 '15 at 09:08
0

Since tools for this task already exist, I see no point in creating another one unless you're curious about how to do this yourself and learn something new.

If so, using a ready-made library would defeat the entire idea of learning something which is why I strongly recommend you try implementing the splitter yourself.

You can find descriptions of the AVI file format online, that should get you started.

phant0m
  • 16,595
  • 5
  • 50
  • 82
  • Thank you for the documentation. I will read it and then I will use the Windows AVIFile library to operate on MP3 audio streams from an AVI file. If I spend too much time then I will look at the wrapper library mentionned by johannie. – user1139666 Nov 25 '12 at 15:51