How to find out if an mp3/ogg file is mono or stereo?
Matthias Geier <[email protected]> Wed, 29 May 2013 11:17:59 +0200
| Newsgroups | gmane.comp.audio.ecasound.general |
|---|---|
| Message-ID | <CAFesC-c-qD5cKoUrfQH8u16=gXHKS-nDXOEfDxkFrdK6G2WOZw@mail.gmail.com> |
Dear list. I'm using the Ecasound interactive mode via the C++ interface (eca-control-interface.h) in an application to play audio files via JACK. Therefore, I first load the files into a dummy chain-setup to get the number of channels and then create another chain-setup with the correct number of channels (using cs-set-audio-format). This works well for WAV and FLAC files, but I cannot manage to get the correct number of channels for mono MP3 and OGG files. This is how to reproduce my problem: ecasound -c > ai-add house_lo.mp3 > ao-add null > cs-connect > ai-index-select 1 > ai-get-format This produces "s16_le,2,11025", although the file is actually mono. I got the file from there: https://bitbucket.org/pygame/pygame/src/default/examples/data/house_lo.mp3 I tried with several different MP3-files and none of them was correctly recognized as mono file. It doesn't seem to work with OGG-files either, I tried this for example: https://bitbucket.org/pygame/pygame/src/default/examples/data/house_lo.ogg How can I find out the correct number of channels? Or is there another way to create a chain-setup for playback with JACK which automatically uses the correct number of channels (instead of the default 2)? cheers, Matthias ------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ Ecasound-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ecasound-list