HydrogenAudio

Lossless Audio Compression => Lossless / Other Codecs => Topic started by: Audacious TRex on 2018-01-07 19:22:20

Title: encoding to wma lossless at 48 Khz and 16 bits
Post by: Audacious TRex on 2018-01-07 19:22:20
Hello to everybody
I am new here, and hope someone can help me. I have not found any similar topic.
My car audio entertainment  system is accepting only wma as lossless files, so I am encoding my FLAC collection to WMA for the car.
I use Windows 7 at 64 bit and have noticed with DBPowerAmp and other 2 or 3 applications including Windows Media Encoder that choices to encode to wma lossless are basically the following:

16 bit at 44.1 Khz
or
24 bit at 48 Khz

Now I have some FLAC files encoded at 16bit/48 Khz.
It appears there is no way to encode them like this in wma, the only option would be to transform into 44.1.
I would not want to change the sampling frequency.

Anybody knowing a way to encode wma lossles at 16bit/48 ?
Thanks a lot in advance.


Marco
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: Apesbrain on 2018-01-07 19:39:06
It may be possible using old WMEncoder:
https://hydrogenaud.io/index.php/topic,50415.0.html

Pretty much a certainty that you won't hear a difference if you use 44.1; especially in a car.
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: greynol on 2018-01-07 19:48:16
...or the more sensible lossy compression, for that matter.
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: Audacious TRex on 2018-01-07 20:04:18
Thanks for the replies.
I will try to do what suggested by Apesbrain, maybe I will settle for 44.1.

Encoding lossy would probably be more "sensible", however my collection of music is 650 GB, part FLAC and part MP3.
If I encode the FLACs to lossy (VBR 192) and copy the mp3s I end up with something like 190 GB.
I have a flash 128 Gb USB key and an old 1TB HDD drive, so I shall have to use the latter to fit it all.

A 256 GB flash would costs around 90 EUR in here.

Having plenty of space in the disk, then I go lossless.
I know, I will not notice the difference in a car.

Ciao
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: Audacious TRex on 2018-01-07 21:18:34
I tried to set up the encoder in Foobar as per the instructions from Apesbrain I found in other threads.
But no way to make it work.

>Encoder: Custom
>Encoder: C:\Windows\sysnative\cscript.exe  (to me System32 since I have no sysnative dir)
>Extension: wma
>Parameters: "C:\Program Files\Windows Media Components\Encoder\WMCmd.vbs" //NoLogo -silent -input %s -output %d -a_codec WMA9LSL -a_mode 2 -a_setting Q100_44_2_16    (to me 48)
>Format is: Lossless
>Highest BPS: 24
>Encoder Name: WMA Lossless

>Also, depending on the version of WMCmd.vbs you have, you may need to change "-a_codec WMA9LSL" to "-a_codec WMALSL".

But it does not work for me, I get a message:
An error occurred while finalizing the encoding process (Object not found)
In the destination directory I see a temporary file.

What am I doing wrong?
Thanks a lot/Ciao

Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: saratoga on 2018-01-07 21:20:55
I'm really surprised your stereo can play wma lossless. It is very rarely supported outside of windows-based operating systems.
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: Audacious TRex on 2018-01-07 21:22:52
I was surprised as well.....
it is the audio entertainment system of the Suzuki Vitara 2015 version.
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: lvqcl on 2018-01-07 22:19:01
>Encoder: C:\Windows\sysnative\cscript.exe  (to me System32 since I have no sysnative dir)
No, you should use 'sysnative' if you have 64-bit WMEncoder.

Also you can try command-line encoder from https://hydrogenaud.io/index.php/topic,90519.0.html
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: Audacious TRex on 2018-01-07 22:20:08
I do not have sysnative dir.
Shall I create it and transfer the file in it?
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: Audacious TRex on 2018-01-07 22:31:14
I have SysWOW64 with cscript.exe in it.
I have used this, but still no way, same error message.

Anyway I tried the command line encoder, and I succeed to set it up and working with this command line:
--codec lossless --quality 100 - %d

However the resulting file is lossless at 48 Khz but upsampled at 24 bit while the original is at 16.
Is there a way to force it to remain at 16 bit?

Thanks/Ciao
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: kode54 on 2018-01-07 23:21:06
Most devices that support WMA do not support WMA 9 Pro or WMA Lossless, only the legacy WMA format.
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: lvqcl on 2018-01-08 00:48:51
I do not have sysnative dir.
You cannot see it, but it exists. In a way.

Anyway I tried the command line encoder, and I succeed to set it up and working with this command line:
--codec lossless --quality 100 - %d
'--quality 100' is redundant here

However the resulting file is lossless at 48 Khz but upsampled at 24 bit while the original is at 16.
Is there a way to force it to remain at 16 bit?
The audio signal is losslessly converted from 16 to 24 bit, so you can leave it as is.
Or add resampler DSP and convert audio to 44.1 kHz. Also set bit depth to 16 bit in "Ouput Format" window.
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: lvqcl on 2018-01-08 00:59:34
By the way, are you sure that your audio system actually supports WMA lossless, not just WMA standard (which is lossy)?
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: Apesbrain on 2018-01-08 01:08:56
Most devices that support WMA do not support WMA 9 Pro or WMA Lossless, only the legacy WMA format.
It is unusual, but see p. 23 of the manual: http://www.suzuki-slda.com/Lists/User%20Manuals/User%20manual%20SLDA%20Europe_EN.pdf
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: kode54 on 2018-01-08 01:32:09
Most devices that support WMA do not support WMA 9 Pro or WMA Lossless, only the legacy WMA format.
It is unusual, but see p. 23 of the manual: http://www.suzuki-slda.com/Lists/User%20Manuals/User%20manual%20SLDA%20Europe_EN.pdf
Wow. Interesting.
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: saratoga on 2018-01-08 02:17:45
Very interesting.  It is modern too (supports Android/Apple stuff).  Maybe someone had an ancient Windows Mobile platform they didn't want to give up?
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: Audacious TRex on 2018-01-08 08:19:28
Thanks for all the replies.

Quoting lvqcl:

>The audio signal is losslessly converted from 16 to 24 bit, so you can leave it as is.
I am trying to encode at 16 bit cause I do not know if my infotainment system will support 24 bit.
I will try today, if it is supported then I do not need to encode at 16 bit.

>Or add resampler DSP and convert audio to 44.1 kHz. Also set bit depth to 16 bit in "Ouput Format" window.
I would not want to go 48--->44 if possible, DBPowerAmp and other apps already code that way.

I have set WMEncode64 parameters in foobar like this:

--codec lossless --out-bitdepth 16 - %d

But the resulting encoding is still at 24 bit.
Did I miss something?

Ciao



Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: lvqcl on 2018-01-08 12:43:35
48 kHz 16 bit WMA simply does not exist.
Here is the list of possible WMA Lossless formats:
Code: [Select]
44 kHz, 2 channel, 16 bit
44 kHz, 2 channel, 24 bit
48 kHz, 2 channel, 24 bit
48 kHz, 5.1 channel, 24 bit
88 kHz, 2 channel, 24 bit
88 kHz, 5.1 channel, 24 bit
96 kHz, 2 channel, 24 bit
96 kHz, 5.1 channel, 24 bit
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: Audacious TRex on 2018-01-08 22:15:12
All right, it seems it is not possible to do what I wanted.
never mind, thanks to all of the people who have tried to help me.
Much appreciated.

Ciao
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: Porcus on 2018-01-09 13:17:41
All right, it seems it is not possible to do what I wanted.

You can of course convert the 48/16 to 48/24, losslessly. Even if the WMA encoder will not compress away the extra zeroes too efficiently (I don't know whether!), you have space enough. 
I am not sure if a car parked so close to your working drive is good enough to qualify as "off-site" backup, but it cannot be a bad thing.
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: 2Bdecided on 2018-01-09 13:21:27
That avatar looks familiar...
Title: Re: encoding to wma lossless at 48 Khz and 16 bits
Post by: Audacious TRex on 2018-01-09 13:39:33
I changed the avatar hoping it will look less "familiar".

The concern was not the compression of the extra zeros but actually the compatibility of the resulting file with my infotainment system. It turned out to be compatible by the way.

Yes .... I might launch the idea of "housed backups" in cars .....

Ciao