Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: FLAC Bugs? (Read 4534 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

FLAC Bugs?

I am having a problem with at least 2 different FLAC plugins not working to write FLAC files if the source file is a 16 bit 44.1khz mono file. When I use the command line FLAC program it encodes the mono wave file into FLAC OK.

I am not sure if the problem lies in the plugins or the FLAC source code. I looked in the FLAC docs but saw nothing specifically about being able to encode 16 bit mono files into FLAC format. I have a lot of 16 bit, 44.1khz mono audios in WAVE format that I would like to compress using FLAC.

Since the author who wrote FLAC makes the source available I just don't understand why 2 plugins for FLAC give errors when writing a FLAC file. The 2 plugins that don't work to write FLAC files from 16 bit mono wave file audios are:

Nero FLAC plugin (version 1.0.0.33 by Mausau on NeroPlugins.cd-rw.org) gives the error "An error occurred when writing the file C:\file_name.flac" when using Nero 6 Wave Editor to try and save a 12 minute mono audio file (16 bit, 44.1khz). I have tried this with several mono 16 bit files all with the same error message, and it faisl to save the FLAC file if source is mono. Stereo files are saved correctly as FLAC, just not mono files.

Cool Edit Plugin for FLAC 1.1.0 written by James Chapman (available on the www.vuplayer.com web site under the "Cool Edit Filters" page). This crashes with an "Invalid file or format" error when you try to save a mono wave file from Cool Edit Pro or Adobe Audition, just like the above Nero plugin did.

Note: Both of the above FLAC plugins read the mono FLAC file fine once the FLAC file has been created with another plugin in another app or via the command line FLAC program. They just don't seem to want to save a mono file in FLAC format.

Has anyone else experienced this? It appears to be a bug to me.

I am not sure why 2 different FLAC plugins for 2 different programs that were written by different authors have this same problem. I was starting to think that mono files weren't allowed to be converted to the FLAC format... I am glad I perservered and tested this with another plugin which worked (Cool Edit filter from www.saunalahti.fi/~cse/files/cool_flac.zip) and with the FLAC command line program.

FLAC Bugs?

Reply #1
It is not a "bug in two plugins written by different authors"; this is most likely a bug in FLAC libraries both of them use.
Microsoft Windows: We can't script here, this is bat country.

FLAC Bugs?

Reply #2
I just E-mailed Josh and the authors of the 2 plugins with a link to this thread so they can see this. Does the plugin that your Foobar2000 program uses have this problem when saving mono files? (I don't have Foobar2000 to test). Thanks for the reply. Hopefully we can get to the bottom of this bug...

It is OK to save mono 16 bit 44.1khz files as FLAC files isn't it?  Just wanted to make sure it wasn't something that was unsupported by FLAC.

FLAC Bugs?

Reply #3
Quote
Does the plugin that your Foobar2000 program uses have this problem when saving mono files?

Flaccer has no problems with this.

Quote
It is OK to save mono 16 bit 44.1khz files as FLAC files isn't it?  Just wanted to make sure it wasn't something that was unsupported by FLAC.

It is OK to use mono. Authors of other plugins most likely try to use joint stereo with any channel count (it only works in stereo mode) and don't check errors FLAC library returns.

FLAC Bugs?

Reply #4
Well thanks for the info. I hope both the authors of the plug-ins view this thread from the link in the E-mail I sent them and will fix their plug-ins to work with mono files. I have a lot of mono 16 bit files (44.1khz) and not being able to make them into FLACs with all my programs is a disappointment.

I also tried to E-mail Josh but I got a message saying it was undeliverable. Hope he reads this thread and sees this.

FLAC Bugs?

Reply #5
This is unlikely to be libFLAC, since that is what 'flac' uses and it compresses mono files OK.

Josh

FLAC Bugs?

Reply #6
Thanks for the info Josh! I appreciate it. What do you think these plug-in authors are likely doing wrong that would cause such an error when creating FLAC files from a mono source? I hope they can quickly correct this bug in their respective plug-ins now that this failure has been exposed. Thanks again - keep up the good work in developing FLAC.

FLAC Bugs?

Reply #7
Quote
This is unlikely to be libFLAC, since that is what 'flac' uses and it compresses mono files OK.

Josh

While some library authors try to make sure that developers using their libs do the job quickly/easily and without having to spend hours digging some useless docs/headers, you made sure that people using your libraries have to take care of tons of useless library-specific details. THAT's the problem. Like Case pointed, those plugin authors most likely forgot to disable joint stereo switch when encoding mono. If your library fails to handle such situations, you are simply asking for people to make buggy software using it. Not to mention that optimal encoding settings should be autoconfigured by default, so plugin devs don't have to set all the crap themselves.
Microsoft Windows: We can't script here, this is bat country.

FLAC Bugs?

Reply #8
Quote
What do you think these plug-in authors are likely doing wrong that would cause such an error when creating FLAC files from a mono source?

I have no idea... Case's theory is as good as any, though to miss that they would have to totally ignore the return value from the encoder initialization routine, which is bad practice.

Josh