Author Topic: Converting 24 bit wav file to flac changed it into 16 bit  (Read 7029 times)

Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2459
...if it's actually sending the original file to flac.exe for the conversion ...

That's what I was alluding to in my earlier post. I don't think it is sending the original file. The flac.exe conversion reads its data from the standard input stream, and I think that stream has been converted to 16-bit.

Adding --force-raw-format --bps=24 to the beginning of the encoding parameters should force 24 bit output, but unfortunately MB only produces an error with these settings

There are two reasons why that won't work, and it's nothing to do with MusicBee.

The flac.exe encoder doesn't work with just those parameters either. A true raw file has no information about what it contains, so you need to specify all of that information, not just the bits per sample.
The second reason is that a WAV file and a raw file aren't interchangeable - even with the extra parameters, you can't just feed flac.exe a WAV file and pretend it's a raw file.

In short, never work with raw files.
Bee excellent to each other...

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
...if it's actually sending the original file to flac.exe for the conversion ...

That's what I was alluding to in my earlier post. I don't think it is sending the original file. The flac.exe conversion reads its data from the standard input stream, and I think that stream has been converted to 16-bit.

It's possible this conversion to 16-bit may be taking place when MusicBee moves the file to the Windows Temp folder during the work process shown in the FileMoveLog.dat file created in MusicBee/AppData, which although binary shows in my example from above <C:\Users\(username)\AppData\Local\Temp\MusicBee_000001.flacE:\New Mx\24-96.flac€Ø̵N4Ø

I can't resist a good mystery, haha..  Our Hercule Poirot will need to be Steven in this case.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34344
it will probably be a bug with detecting the wav file as 24 bit

edit:
https://getmusicbee.com/patches/MusicBee34_Patched.zip
unzip and replace the existing musicbee application files

you will need to right click/ send to/ rescan files for existing files
Last Edit: July 30, 2020, 09:11:43 AM by Steven

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3833
  • MB Version: 3.6.8849 P
files recognised as 24 bit and convert correctly for me.
MusicBee and my library - Making bee-utiful music together

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3833
  • MB Version: 3.6.8849 P
just a small extra...
Some EDM/Trance .wav files I've purchased are in 32/96 quality.
MB now recognises those as 'Wave audio file, 32 bit' but when converting to flac, they default to 16 bit.
Shouldn't they default to 24 bit?
MusicBee and my library - Making bee-utiful music together

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
MB now recognises those as 'Wave audio file, 32 bit' but when converting to flac, they default to 16 bit.
Shouldn't they default to 24 bit?

@Bee-liever:  Isn't that though in accordance with the flac.exe behavior you posted about here?:

If they are 32-bit PCM or 32-bit float then FLAC conversion automatically defaults to 16 bit.

@Steven:  thanks for solving this mystery so quickly!

huoc

  • Newbie
  • *
  • Posts: 6
Unfortunately I could not try it. I am running the store version and simply could not get permission to replace the files. I googled and googled, used icacls, tinkered around with all the permissions windows I could find, took ownership of the folder, none seems to work and after an hour and some reboots I gave up. So unless someone can help me how to get write access to the folder, I unfortunately am not able to test the patched version.

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
Unfortunately I could not try it. I am running the store version and simply could not get permission to replace the files. I googled and googled, used icacls, tinkered around with all the permissions windows I could find, took ownership of the folder, none seems to work and after an hour and some reboots I gave up. So unless someone can help me how to get write access to the folder, I unfortunately am not able to test the patched version.

This is a case in point of why the best bet is always to use the Installer or Portable versions of MusicBee.  The Store version is incapable of being patched manually, among other issues (use of certain plugins, etc), due to the lock-down Microsoft places on these things  The fix does indeed work for MB 3.4.x on the 24-bit example I previously described, as so for Bee-liever.

huoc

  • Newbie
  • *
  • Posts: 6
This is a case in point of why the best bet is always to use the Installer or Portable versions of MusicBee.  The Store version is incapable of being patched manually, among other issues (use of certain plugins, etc), due to the lock-down Microsoft places on these things  The fix does indeed work for MB 3.4.x on the 24-bit example I previously described, as so for Bee-liever.
Off-topic: Well, this was the first issue I encountered, so I am not sure how often a quick patching for testing purposes is needed, but there can be a Beta/Test/Patched/Release Candidate version in the store besides the stable version, can't it? This can replace manual tinkering, as the patched version would update itself in the background as well, independent of the stable production version. This is just me thinking out loud, without knowing anything about how the ecosystem of the Windows Store works, and also going waaaay off-topic :D

Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2459
That's highly unlikely to happen, if only because MusicBee is maintained by a development team of one.
Keeping a Windows Store version up to date would just take up more time, and as mentioned by others I don't think Microsoft makes it convenient to do, for reasons.
Bee excellent to each other...

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3833
  • MB Version: 3.6.8849 P
@Bee-liever:  Isn't that though in accordance with the flac.exe behavior you posted about here...

Yes, but I was hoping Steven could work some of his code "magic" with something in bassenc.
MusicBee and my library - Making bee-utiful music together

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34344
Yes, but I was hoping Steven could work some of his code "magic" with something in bassenc.
are you requesting your 32 bit wave files be converted to 24 bit flac (instead of 16 bit as now) ?

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3833
  • MB Version: 3.6.8849 P
are you requesting your 32 bit wave files be converted to 24 bit flac (instead of 16 bit as now) ?
Yes please!
MusicBee and my library - Making bee-utiful music together

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34344
are you requesting your 32 bit wave files be converted to 24 bit flac (instead of 16 bit as now) ?
Yes please!
the latest v3.4 patch has the change

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3833
  • MB Version: 3.6.8849 P
the latest v3.4 patch has the change
Thank you.
MusicBee and my library - Making bee-utiful music together