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: v1.6.12 "The encoder has terminated prematurely" (Read 2493 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

v1.6.12 "The encoder has terminated prematurely"

Greetings! I'm encountering unexpected issues when attempting to convert FLAC-to-FLAC and FLAC-to-MP3. Error messages, below, appear immediately after selecting a conversion option. No output file is actually generated. No crash occurs. Any assistance would be appreciated. I've also shared additional information, which hopefully will provide suitable context.

FLAC-to-FLAC
Source: "E:\Albums\Kaidi Tatham\[2017-02-10 F] Changing Times\01 Treacle Manifestations.flac"
  An error occurred while writing to file (The encoder has terminated prematurely with code -1073741515 (0xC0000135); please re-check parameters) : "C:\Users\Preng\Desktop\01 Treacle Manifestations.flac"
  Additional information:
  Encoder stream format: 44100Hz / 2ch / 24bps
  Command line: "C:\Program Files (x86)\FLAC Frontend\tools\flac.exe" -s --ignore-chunk-sizes -8 - -o "01 Treacle Manifestations.flac"
  Working folder: C:\Users\Preng\Desktop\
  Conversion failed: The encoder has terminated prematurely with code -1073741515 (0xC0000135); please re-check parameters

FLAC-to-MP3
Source: "E:\Albums\Kaidi Tatham\[2017-02-10 F] Changing Times\01 Treacle Manifestations.flac"
  An error occurred while writing to file (The encoder has terminated prematurely with code -1 (0xFFFFFFFF); please re-check parameters) : "C:\Users\Preng\Desktop\01 Treacle Manifestations.mp3"
  Additional information:
  Encoder stream format: 44100Hz / 2ch / 24bps
  Command line: "C:\Program Files (x86)\foobar2000\encoders\lame.exe" -S --noreplaygain -b 320 - "01 Treacle Manifestations.mp3"
  Working folder: C:\Users\Preng\Desktop\
  Conversion failed: The encoder has terminated prematurely with code -1 (0xFFFFFFFF); please re-check parameters

Additional Information
  • Running foobar2000 v1.6.12. I've kept the program timely up-to-date (i.e. no multi-generation-skipping).
  • My primary use of encoders in foobar2000 is to convert from FLAC-to-FLAC (i.e. older 1.1x files to newer versions) and FLAC-to-MP3. Historically, I've manually updated those specific encoder files in the program's encoder folder. This has occurred without issue up through FLAC 1.3.4. I again performed manual updates for FLAC 1.4.1, then encountered the errors. Uncertain if something about FLAC 1.4.1 is unique/significant, but guessing "no" since the FLAC-to-MP3 issue occurred without any adjustment to LAME.
  • Discovered and ran the foobar2000 free encoder pack, but the errors persist.
  • The online troubleshooter reports "No known problematic components found."
  • No errors occur if I convert FLAC-to-WAV.
  • Errors occur regardless of output destination (i.e. different drives).
  • My computer runs Windows 10 with all current "standard" updates (i.e. I do not obtain any beta offerings). No other computer issues noted.

Again, any help is appreciated. foobar2000 is a wonderful program and it's hard to imagine listening to music, or managing my music library, without it!

Re: v1.6.12 "The encoder has terminated prematurely"

Reply #1
As for FLAC, if you downloaded 1.4.1 from github page or xiph site, be sure that you have copied libFLAC.dll together with flac.exe.

Re: v1.6.12 "The encoder has terminated prematurely"

Reply #2
Some of the builds posted in the FLAC v1.4.1 (Release) thread are also dependant on the official libflac.dll (v1.4.1) but the file isn't included or mentioned in the post.
korth

Re: v1.6.12 "The encoder has terminated prematurely"

Reply #3
The FLAC error is from missing libflac.dll. The binary in Free Encoder Pack would have had no such requirements, but you have configured Converter to use a different binary from a different location.

Lame,exe seems to error out with code -1 if it fails to initialize encoder library (for example memory runs out) or it fails to open the output file. You could test encoding a WAV file on command prompt manually to see what error message it shows. Or you could gather a Process Monitor log of the conversion attempt to try and see why it fails.

Re: v1.6.12 "The encoder has terminated prematurely"

Reply #4
Thanks to everyone's responses, and some internal tinkering, my issues appear resolved. Here's more info, and some remaining curiosities on the MP3 encoder side. Happy to provide any other help, if this assists other troubleshooting.

The FLAC Encoder
Per "Preferences/Advanced/Converter/Additional command-line encoder paths" an additional path was set here that I believe superseded the default foobar2000 encoders folder. That path was more relevant for other software that I use. I had not placed the libFLAC.dll files in that path. This is likely why the converter still failed despite using the free encoder pack. Having removed this path, the FLAC-to-FLAC conversion works again with output at FLAC 1.4.1. Cheers.

The MP3 Encoder
Now, this one's stranger, and I ultimately am not confident about the precise order of what actions I took, and when issues were introduced/resolved. Here's my best guess. There was also a separate path to a LAME encoder, which I was apparently using for Audacity long before that became built-in for that program. Upon removing this path, the issue remained, despite having run the free encoder pack. But upon copying that path's LAME encoder directly into the foobar2000 encoders folder (to replace the free encoder pack version), the issue resolved. I'm a bit stumped why this would work, but it leaves me with some impression that my computer is conflicting with the free encoder pack in this regard.

For whatever context this helps with, my computer's been operating for approx. 9 years. Makes a fresh installation of the operating system and various software very appealing, as I apparently forgot about the additional paths set (in which some paths, by themselves, no longer served a purpose). At any rate, the Process Monitor and/or other command prompt efforts are above my skill level.

Thanks again to everyone that responded!

Re: v1.6.12 "The encoder has terminated prematurely"

Reply #5
The FLAC Encoder
Per "Preferences/Advanced/Converter/Additional command-line encoder paths" an additional path was set here that I believe superseded the default foobar2000 encoders folder. That path was more relevant for other software that I use. I had not placed the libFLAC.dll files in that path. This is likely why the converter still failed despite using the free encoder pack. Having removed this path, the FLAC-to-FLAC conversion works again with output at FLAC 1.4.1. Cheers.
Just to clarify for everyone on this, the flac.exe 1.4.1 compiled by Case in his Free Encoder Pack does NOT require the presence of libFLAC.dll;  the ones supplied by other sources--xiph(definitely), forum posts--often DO.