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: Foobar2000 and lossywav with wavpack (Read 3045 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar2000 and lossywav with wavpack

Hello there,
Can anyone see what's up with the command line, it's from the wiki page. It works fine for flac and tak.
Cheers

1 out of 1 tracks converted with major problems.

Source: "F:\3 Colours Red - Revolt\01 - Paralyse.flac"
  An error occurred while writing to file (The encoder has terminated prematurely with code 1 (0x00000001); please re-check parameters) : "F:\3 Colours Red - Revolt\01 - Paralyse.lossy.wv"
  Additional information:
  Encoder stream format: 44100Hz / 2ch / 16bps
  Command line: "C:\Windows\System32\cmd.exe" /d /c c:\"program files (x86)"\foobar2000\lossywav - --quality standard --silent --stdout|c:\"program files (x86)"\foobar2000\wavpack -hm --blocksize=512 --merge-blocks -i - "01 - Paralyse.lossy.wv"
  Working folder: F:\3 Colours Red - Revolt\
 
  Conversion failed: The encoder has terminated prematurely with code 1 (0x00000001); please re-check parameters

Re: Foobar2000 and lossywav with wavpack

Reply #1
I think I am able to reproduce your problem, but I'm very confused. I had to go back to WavPack version 4.75 before this worked correctly, which is almost 5 years old. I find it weird that nobody else has seen this, but there it is.

I'm attaching a copy of that version of the wavpack executable for you to try because that version is so old I don't have it up anymore, although I would understand if didn't feel comfortable using it. I would like to know if this fixes your issue.

I would also like to figure out what's going on, but unfortunately I can't easily see the output of the wavpack executable when it fails, so I don't know what it's complaining about, and when I use it stand-alone with the cmd.exe and lossyWAV, everything works fine. The most significant change from 4.75.2 to 4.80.0 was the inclusion of full Unicode support, which involves changes to the main shell interface, so it's probably related to that. I'll continue investigating.

To the wider HA community, does anyone know anything about this? Is anyone using foobar2000+lossyWAV in this way with a newer version of WavPack?

-David

Re: Foobar2000 and lossywav with wavpack

Reply #2
Okay, I sort of figured it out. It had to do with the format of the command-line and my use of CommandLineToArgvW() to handle Unicode command lines (which has "a special interpretation of backslash characters when they are followed by a quotation mark character"). I don't really understand everything, but I fixed the string and it works with old and new versions of WavPack:

Code: [Select]
/d /c c:\"program files (x86)"\foobar2000\lossywav - --quality standard --silent --stdout|"c:\program files (x86)\foobar2000\wavpack" -hm --blocksize=512 --merge-blocks -i - %d

The only difference is the placement of the two quotation marks in the name for the WavPack executable. The quotation marks in the lossywav filename have to stay where they are.

Hope this is actually the problem you were having...  :)

-David

Re: Foobar2000 and lossywav with wavpack

Reply #3
"...\foobar2000\encoders\" ?

Re: Foobar2000 and lossywav with wavpack

Reply #4
Okay, I sort of figured it out. It had to do with the format of the command-line and my use of CommandLineToArgvW() to handle Unicode command lines (which has "a special interpretation of backslash characters when they are followed by a quotation mark character"). I don't really understand everything, but I fixed the string and it works with old and new versions of WavPack:

Code: [Select]
/d /c c:\"program files (x86)"\foobar2000\lossywav - --quality standard --silent --stdout|"c:\program files (x86)\foobar2000\wavpack" -hm --blocksize=512 --merge-blocks -i - %d

The only difference is the placement of the two quotation marks in the name for the WavPack executable. The quotation marks in the lossywav filename have to stay where they are.

Hope this is actually the problem you were having...  :)

-David


Great, your new command line works perfectly.
Thanks a lot!