2

How can I extract some MP3 sample from an MP3 file? I want to extract some sample of about 10 seconds from these files.

Is there any way or some documentation that I can study in order to do that by myself? Thanks to everyone!

Leo
  • 150
  • 1
  • 9

1 Answers1

1

You could try a C# wrapper around ffmpeg, to convert the file to wav.
From there, you can extract whatever sample you want.

WAV-file documentation:
http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html

Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442
  • Like you said I used ffmpeg, but in the C# wrapper I added the commands to do that. In fact it is possible to cut audio files in ffmpeg directly with a command line like `ffmpeg.exe -ss position -t duration -i inputFile.mp3 outputfile.mp3`. Thank you for your answer. – Leo Oct 03 '15 at 00:10
  • @Leo: Interesting, didn't know that ;) Glad I could help. – Stefan Steiger Oct 05 '15 at 07:31