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: Converter: problem piping to speexenc (Read 4766 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Converter: problem piping to speexenc

I tried speex for some of my audiobooks and very satisfied with the results. Speexdrop works fine, so does CLI, but I have problem with foobar converter (latest speexenc from rarewares)

Example parameter setting: -w --vbr - %d

Problem:
Quote
Encoder stream format: 32000Hz / 1ch / 16bps
Command line: "C:\Program Files\encoders\speexenc.exe" -w --vbr - "out.spx"
Working folder: C:\temp\audiobooks\
An error occurred while writing to file (The encoder has terminated prematurely with code 0 (0x00000000); please re-check parameters)


Now if I use temporary input file "%s" instead pipe "-", conversion is done fine, but not on the fly. However speexenc accepts piping just fine:

Code: [Select]
sox in.wav -p | speexenc.exe -w --vbr -V - out.spx


Any comments?

Converter: problem piping to speexenc

Reply #1
I'm having the same exact error with Tak encoding in foobar.

When I open the folder I see the output file being written but then at the end of the conversion (100%) the output file disappears and BAM "An error occurred while writing to file".
I use Windows 7 with disabled UAC and foobar 1.0 . Tried with older version of Foobar and same result!

Oh and everything works when I use a temporary input file %s instead of pipe "-" though it's not as fast

Converter: problem piping to speexenc

Reply #2
Is the Speex encoder designed to accept weird WAV files? Foobar2000 emits piped WAV files with a 0xFFFFFFFF length for both the RIFF chunk and the data chunk, since knowing the lengths ahead of time would require decoding the files twice, as the reported lengths on some files are not exact, or may even be rounded. (For instance, WMA, due to limitations of the ASF container, reports lengths rounded down to the nearest millisecond. Even WMA Lossless.)

Converter: problem piping to speexenc

Reply #3
TAK encoding works fine. Parameters: "-e -p2 -silent -ihs - %d"

 

Converter: problem piping to speexenc

Reply #4
Is the Speex encoder designed to accept weird WAV files? Foobar2000 emits piped WAV files with a 0xFFFFFFFF length for both the RIFF chunk and the data chunk, since knowing the lengths ahead of time would require decoding the files twice, as the reported lengths on some files are not exact, or may even be rounded.

I don't know such technicalities, but am curious how does speexenc handle sox piping then. And it's not only sox - output from other decoders (like flac.exe etc) which supports writing to stdout is handled just fine

Converter: problem piping to speexenc

Reply #5
Re-reading this it seems that my previous post doesn't say anything, as decrypting kode54' post again if seems that foobar output pipe is limited by supporting some formats (like mentioned WMA) and it must report weird data length to piped end
However majority of encoders does not have issue with this, suggesting that speexenc should handle this situation the same way if possible

Hope it's more clear to those concerned