Re: [mpg123-users] libmpg123 opens non-mp3 files
Brought to you by:
sobukus
From: Martin G. <mar...@gm...> - 2023-12-21 03:57:25
|
Il giorno mer, 20/12/2023 alle 13.50 +0100, Thomas Orgis ha scritto: > Libmpg123 tries as hard as it can to extract something out of the > data you give it. Understand > libmagic [...] is a good way to pre-filter files. Good call! I've put this in and it has resolved decoding all the bogus audio files, except for MP2's which libmpg123 "succeeds" in opening but returns me the correct length of total silence. Strangely enough, libsndfile does succeed in opening and in returning valid data, and the "mpg123" command plays them fine so i guess I must be doing something wrong. For my upcoming release, I'm currently checking for .mp2 on the end of the filename and just give them to libsndfile instead. Gak! > Oh, you can also just use libsndfile I prefer libmpg123 for its maturity, ubiquity, reliability, perfect sample-accurate seeking and tolerance of funny files. As regards libsndfile's MP3 support (finally!), it will take a few years for it to arrive in all the distros, and "normal" people, once they have a working system, tend not to chase the latest releases as long as their box works. I've tried the new libsndfile mp3 support (whose coding by FFitch I followed avidly) but it doesn't work reliably in my app when you make it seek a lot, and it returns garbage noise, probably due to the freshness of the code. Which just leaves me wondering why, if the libsndfile MP3 support relies on mpg123, its seeking isn't as good and why libmpg123 appears to be handing me silence for them. Many thanks for the suggestions. Onward! M |