Re: [LAD] Decode and Info about media

From: Robin Gareus <robin@email-addr-hidden>
Date: Mon Apr 18 2011 - 13:48:25 EEST

On 04/18/2011 12:22 PM, Alfs Kurmis wrote:
>
> Hello Experts.
> Is here library with C #include headers for so what ?
> How can i gotta info about Wav, mp3, ogg, m4a, wma [wmv] ... files
> SampleRate, Channels, PlayLen( in samples ), bytesPerSample ,
> bitrate, VBR ... ,
> and after i gotta this info , decode em to RAW stream ?
> At least i need everything about Wav, mp3, ogg.
> Info about sound file should not be printf()'ed to stdout , but must
> be filled in info structure.
> Decoder library should have functions - loadFile, Play,
> SeekToSample , Stop.
> At least possibility - play file from sample or second.part .
> Or should be used 2 libs, one for gotta info and one for decoding ?
> Any C example and pointer welcomed.
> Tnx in advance @ all.
> Alfs Kurmis

libavformat from ffmpeg [1]; see `ffprobe` for example-code to get info
and libavcodec for playback, it can do all that you want and will
read/play any file you throw at it.

gavl/gmerlin [2] offers an easier-to-use wrapper around ffmpeg libs.

gstreamer (actually libgstreamer) [3] is another option.

libsndfile [4] is very easy to use and well designed, but has no support
for mp3, wma, m4a or other proprietary/license-encumbered formats.

All of the above are available on most GNU/Linux distributions.

[1] http://ffmpeg.org/
[2] http://gmerlin.sourceforge.net/
[2] http://gstreamer.freedesktop.org/
[4] http://www.mega-nerd.com/libsndfile/

HTH,
robin

PS. another option is to use many small libs directly: libmad,
libsndfile, libogg, libquicktime,... but gmerlin/gavl conveniently wraps
those.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Mon Apr 18 16:15:01 2011

This archive was generated by hypermail 2.1.8 : Mon Apr 18 2011 - 16:15:01 EEST