Skip to main content

Topic: Converting to WMA (Read 24699 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
Converting to WMA
Is there a way to convert FLAC to WMA using foobar just like its possible to converto to mp3 ?

  • kode54
  • [*][*][*][*][*]
  • Administrator
Converting to WMA
Reply #1
[a href='index.php?showtopic=47759']This topic[/a] has instructions for setting up the converter to produce WMA 9 files.

  • Merlin_de
  • [*]
Converting to WMA
Reply #2
Is there a way to convert FLAC to WMA using foobar just like its possible to converto to mp3 ?


hello,
since win7 MS decide to change from old WM9Encoder (COM based ) to the new Windows Media Encoder IWMEnc Interface.
WME is afaik part of the Windows Media Player. therfor win7 user dont need to install WM9Encoder (dont work anny more).

based on the BASS audio library http://www.un4seen.com/ i made a small console app that convert
*.mp3;*.mp2;*.mp1;*.ogg;*.wav;*.aiff;*wma -> wma.

the command line is the same as used by the known WMCmd.vbs / WME9.vbs
eg.

Encoder: WMAenc.exe
Ext: wma
Parameter: -a_codec WMASTD -a_setting Q50_44_2 -input "-" -output %d

-input "-" = input from STD
-input "%s" = foobar temp file
-input "D:\myFile.mp3" = file

-output %d = output file name (foobar variable)
-output"D:\myFile.mp3" = output file name

-a_setting Q50_44_2 = VBR 50% 44000 kbits 2 channel    (use other supportet wma codecs if you want)
-a_setting Q100_44_2 = lossless

you use
.\ WMAenc.exe
.\Bass\bass.dll
.\Bass\basswma.dll

WMAenc.exe work on all win >= win2k
on win2k - xp  WM9Encoder.exe codecs from MS must be install onyour system (like for WMCmd.vbs / WME9.vbs)
on win7 only the win7 Windows Media Player must be install.

i am noob in dev plugins for foobar, so i need help from a dev to create a foobar plugin enviroment for the Converter Setup page (like the Flac GUI page). if some dev can help me, i can make a nice GUI Plugin for foobar.

maybe some dev contact me.

DOWNLOAD:
WMAEncoder.zip
  • Last Edit: 05 January, 2011, 10:15:08 AM by Merlin_de

  • tgckpg
  • [*]
Converting to WMA
Reply #3
Good! Thanks! I'm using windows 7 and confused with wma!
Great! Works fine!

  • mudlord
  • [*][*][*][*][*]
  • Developer (Donating)
Converting to WMA
Reply #4
GUI component?

What do you need? Does it need to be a context menu item? To me, it would make much more sense taking selected entries, decoding to PCM, and then piping them to the WMA encoder. Only issue I can see there then is you need to make BASS/BASSWMA somehow multiinstance usable. But then you support *any* format that FB2K supports...Plus, it should remove the dependancy on bass.dll itself, as it seems BASSWMA's encoder can be called without a BASS instance.

edit: Noticed a issue with your encoder. Seems to crash whenever no parameters are given to it. I assume the encoder was coded in Delphi or Visual Basic? (judging from the error message)
  • Last Edit: 11 January, 2011, 11:57:02 AM by mudlord

  • saivert
  • [*][*][*]
Converting to WMA
Reply #5
It is because he didn't check for parameters in his program. The only error is that you didn't provide the required paramters -input -output and -a_setting.

pebkac


Quote
i am noob in dev plugins for foobar, so i need help from a dev to create a foobar plugin enviroment for the Converter Setup page (like the Flac GUI page). if some dev can help me, i can make a nice GUI Plugin for foobar.

FLAC has a special setup dialog because foobar2000 directly supports it. You still need to provide flac.exe as it doesn't come with the encoder. It only has a built-in setup dialog. Same with wavpack, ogg vorbis, mp3, wav, et.al.
All other formats need to be setup with the custom option, including wmaenc.
  • Last Edit: 11 January, 2011, 02:01:41 PM by saivert
http://foobar2000.saivert.com - foobar2000 component repository

  • eevan
  • [*][*][*][*][*]
Converting to WMA
Reply #6
I tried this tool on x32 Win 7 Ultimate and got the WMAPRO encoded files without any problems. But when I tried to play them in Rockboxed Fuze v2, I noticed some issues, so I run them through foobar2000's Verify Integrity tool. This is the result:
Code: [Select]
Item: "G:\MUSIK\Alice In Chains\The Essential\10 - Them Bones.wma"
Warning: Reported length is inaccurate : 2:30.045000 vs 2:30.000000 decoded

Item: "G:\MUSIK\Alice In Chains\The Essential\11 - Angry Chair.wma"
Warning: Reported length is inaccurate : 4:48.413000 vs 4:48.367347 decoded

Item: "G:\MUSIK\Alice In Chains\The Essential\12 - Would_.wma"
Warning: Reported length is inaccurate : 3:28.163000 vs 3:28.117914 decoded

Item: "G:\MUSIK\Alice In Chains\The Essential\13 - Dirt.wma"
Warning: Reported length is inaccurate : 5:16.746000 vs 5:16.700680 decoded

Item: "G:\MUSIK\Alice In Chains\The Essential\16 - Rooster.wma"
Warning: Reported length is inaccurate : 6:16.236000 vs 6:16.190476 decoded


All items decoded successfully.
5 items decoded with minor problems.

List of decodable but suspicious items:
"G:\MUSIK\Alice In Chains\The Essential\10 - Them Bones.wma"
"G:\MUSIK\Alice In Chains\The Essential\11 - Angry Chair.wma"
"G:\MUSIK\Alice In Chains\The Essential\12 - Would_.wma"
"G:\MUSIK\Alice In Chains\The Essential\13 - Dirt.wma"
"G:\MUSIK\Alice In Chains\The Essential\16 - Rooster.wma"

Files play normally in foobar or WMP, but I'd like to know if anybody else get these inaccurate length warnings. Maybe that's a source of playback problem on Rockbox...

Files were converted from TAK lossless sources using foobar2000's converter and WMAenc.exe tool. Parameters used:
-a_codec WMAPRO -a_mode 2 -a_setting Q90_44_2_24 -input %s -output %d

Cheers!
If age or weaknes doe prohibyte bloudletting you must use boxing

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Converting to WMA
Reply #7
Quote
I'd like to know if anybody else get these inaccurate length warnings

That's normal for WMA in foobar2000.

  • kode54
  • [*][*][*][*][*]
  • Administrator
Converting to WMA
Reply #8
This is a limitation of the stream format used by WMA files, namely ASF. It appears to store packet play position timestamps and durations in milliseconds. Thus, Microsoft's own WMA handling code is limited to returning track lengths in milliseconds.

  • eevan
  • [*][*][*][*][*]
Converting to WMA
Reply #9
Thanks for clarification!
If age or weaknes doe prohibyte bloudletting you must use boxing

  • Zin-Uru
  • [*]
Converting to WMA
Reply #10
Very good! Thank you!

  • Zin-Uru
  • [*]
Converting to WMA
Reply #11
It seems like your encoder does not support 2-pass encoding. Or some special parameters needed?

  • dazzle
  • [*]
Converting to WMA
Reply #12
Hi,

I have just tried the WMAenc.exe in EAC and it's working flawless. What I miss is an opportunity to tag my .wma files when I rip them. With the old WMencoder from EAC it was possible. Does anyone know if there are any parameters that could be added which would then write the tags. EAC has already the tags from freedb.

I have tried this: -output %d -author "%a" -title "%t"

But it does not work - no tags :-(

Can anyone help?

Regards
Dazzle

  • Merlin_de
  • [*]
Converting to WMA
Reply #13
It seems like your encoder does not support 2-pass encoding. Or some special parameters needed?


no it dont support 2-pass encoding coz basswma.dll dont support it.


I have tried this: -output %d -author "%a" -title "%t"

But it does not work - no tags :-(


tagging is not support, maybe in next release if more people want tagging

Converting to WMA
Reply #14
Why does encoder can't work without bass libraries even if they aren't needed (foobar2000 encoding)?
Can you fix this?
  • Last Edit: 22 January, 2011, 08:30:27 AM by Steve Forte Rio

  • Merlin_de
  • [*]
Converting to WMA
Reply #15
Why does encoder can't work without bass libraries even if they aren't needed (foobar2000 encoding)?
Can you fix this?


WMAenc is only a wrapper for bass libs. the encoding is done inside basswma.dll.
i don't intend to code the whole wma encoding for the diffrent windows version native by c++ at this time.

what is the problem with the 2 dll ?

Converting to WMA
Reply #16
It is always more convenient to use only one executable file for encoding...



Quote
the encoding is done inside basswma.dll


And this library in it's turn uses some Windows libs? Am I right?
  • Last Edit: 22 January, 2011, 12:08:28 PM by Steve Forte Rio

  • mudlord
  • [*][*][*][*][*]
  • Developer (Donating)
Converting to WMA
Reply #17
Most likely is a wrapper to the encoder/decoder DMO...

Quote
It is always more convenient to use only one executable file for encoding...


Yes, it would make sense using the encoder DMOs natively...no matter how obtuse and stupid the APIs are.

  • Ljubo44
  • [*]
Converting to WMA
Reply #18
is there any way to convert WAV 24-bit/96kHz 2CH to WMA 24/96 - 768kbps 2CH
So far I have seen only 5,1 CH but how to be in only 2 channels stereo on that bitrate?

  • Merlin_de
  • [*]
Converting to WMA
Reply #19
is there any way to convert WAV 24-bit/96kHz 2CH to WMA 24/96 - 768kbps 2CH
So far I have seen only 5,1 CH but how to be in only 2 channels stereo on that bitrate?


he microsoft wma encoding always depend on the source audio format
if you dont resample (change input audio format) afaik you only can use wmaprofessional

Parameter: -a_codec WMAPRO -a_setting xxx_96_2_24 -input "-" -output "%d"

xxx can be afaik
Q100, Q98, Q90 or Q75 (VBR mode - Q100= lossless )
or
440, 384, 256 or 128 (CBR mode)

other values like 768kbps not support by microsoft (for 96kHz, 2 channel, 24bps source)
  • Last Edit: 22 January, 2011, 07:26:59 PM by Merlin_de

  • Ljubo44
  • [*]
Converting to WMA
Reply #20
on Q98_96_2_24 after encoding i get wma on 337kbps with a lot of losses and missing blocks in audio file from 16kHz to 48kHz 
Q100_96_2_24 is 3207kbps and very big file. 
but thanks for help
  • Last Edit: 22 January, 2011, 07:37:36 PM by Ljubo44

  • Apesbrain
  • [*][*][*][*][*]
Converting to WMA
Reply #21
The only form of WMA that supports 24/96 is WMA Lossless.  You can follow the guidelines in this thread and use the following parameters:

//NoLogo -silent -input %s -output %d -a_codec WMA9LSL -a_mode 2 -a_setting Q100_96_2_24

Or continue what you've started here and make the equivalent changes.

I just converted a 2-channel 24/96 FLAC file to 24/96 WMA Lossless in foobar2000 using WMEncoder and it worked fine; converting from a 24/96 WAV should be no different.
  • Last Edit: 22 January, 2011, 08:48:18 PM by Apesbrain

  • dazzle
  • [*]
Converting to WMA
Reply #22

Thank you for the answer - I just have to use mp3tag for now then until hopefully more would like to see the tag function. Thank you for the converter - it works great.
  • Last Edit: 23 January, 2011, 05:32:57 AM by dazzle

  • mudlord
  • [*][*][*][*][*]
  • Developer (Donating)
Converting to WMA
Reply #23
Quote
It is always more convenient to use only one executable file for encoding...


Started to write a native Windows Media Audio encoder though...so no outside DLLs.

  • Merlin_de
  • [*]
Converting to WMA
Reply #24
WMAenc 0.1.0.2 beta released

changelog:
- fix crash if call with no args
- add preencode tagging support
  (do not use inside foobar convert !!! foobar tagg after convert)

Tagging:
Code: [Select]
option          related wma attribute (hardcodet)
-album          "WM/AlbumTitle"
-albumartist    "WM/AlbumArtist"
-trackno        "WM/TrackNumber"
-discno         "WM/PartOfSet"
-title          "Title"
-author         "Author"
-description    "Description"
-copyright      "Copyright"
-rating         "Rating"
-year           "WM/Year"
-genre          "WM/Genre"


example for EAC:
-a_codec WMASTD -a_setting Q50_44_2 -input "-" -output "Test.wma" -album "%g" -trackno "%n" -title "%t" -author "%a" -year "%y" -genre "%m"


Download
  • Last Edit: 23 January, 2011, 04:07:01 PM by Merlin_de