IPB

Welcome Guest ( Log In | Register )

> Upload forum rules

- No over 30 sec clips of copyrighted music. Cite properly and never more than necessary for the discussion.


- No copyrighted software without permission.


- Click here for complete Hydrogenaudio Terms of Service

2 Pages V  < 1 2  
Reply to this topicStart new topic
Command-line WMA encoder, supports stdin
xorsyst
post May 10 2012, 12:50
Post #26





Group: Members
Posts: 18
Joined: 1-October 09
Member No.: 73611



This is great, thanks. Any chance of adding a --scale option to scale the input source, as lame and oggenc2 support?
Go to the top of the page
+Quote Post
bernhold
post Mar 23 2013, 21:35
Post #27





Group: Members
Posts: 41
Joined: 22-March 13
Member No.: 107330



I have made a small wrapper command line tool for the new Microsoft Expression Encoder WMA Encoder, which supports WMA 9 and WMA Professional 10.

You can use it like:

wmaenc -i input.wav -o output.wma

It requires the Microsoft Expression Encoder to be installed, otherwise it won't work. Do a google search on where to download it. Also, please note this is not a polished piece of software, merely a quick and dirty tool, so there may be errors and quirks. But it does the job for me.

I also attached the source code (c# visual studio) in case you want to see how it's basically done, you may want to write your own version.

This post has been edited by bernhold: Mar 23 2013, 21:41
Attached File(s)
Attached File  wmaenc.zip ( 54.73K ) Number of downloads: 208
Attached File  wmaenc-src.zip ( 320K ) Number of downloads: 142
 
Go to the top of the page
+Quote Post
emte
post Apr 6 2013, 19:43
Post #28





Group: Members
Posts: 97
Joined: 11-February 10
Member No.: 78081



Hi,

Could you give me exact line I should give foobar to convert a file to wma pro q50?
Go to the top of the page
+Quote Post
lvqcl
post Apr 6 2013, 20:25
Post #29





Group: Developer
Posts: 3526
Joined: 2-December 07
Member No.: 49183



CODE
--codec pro --quality 50 - %d
Go to the top of the page
+Quote Post
eahm
post Apr 6 2013, 22:15
Post #30





Group: Members
Posts: 1186
Joined: 11-February 12
Member No.: 97076



EZ CD Audio Converter supports WMA 11. It that version worse than 9 and 10?

http://www.poikosoft.com/help/encoder_versions.html
Go to the top of the page
+Quote Post
bernhold
post Apr 10 2013, 22:38
Post #31





Group: Members
Posts: 41
Joined: 22-March 13
Member No.: 107330



QUOTE (eahm @ Apr 6 2013, 22:15) *
EZ CD Audio Converter supports WMA 11. It that version worse than 9 and 10?

http://www.poikosoft.com/help/encoder_versions.html


It says Windows Media Format 11, not WMA 11. WMF is not an audio codec.

http://msdn.microsoft.com/en-us/library/wi...8(v=vs.85).aspx

At least that's how I understood it, I'm not that familiar with Windows Media Format.

WMA 9 and WMA 10 Professional are the newest codecs currently available.

This post has been edited by bernhold: Apr 10 2013, 22:40
Go to the top of the page
+Quote Post
eahm
post Apr 11 2013, 20:36
Post #32





Group: Members
Posts: 1186
Joined: 11-February 12
Member No.: 97076



bernhold, thanks for that.

lvqcl, wha do I need to install to use "-c voice"? I keep getting "Requested encoder not found".
Go to the top of the page
+Quote Post
eahm
post Apr 11 2013, 22:09
Post #33





Group: Members
Posts: 1186
Joined: 11-February 12
Member No.: 97076



My bad I was using the wrong command, everything works perfectly. Thanks.
Go to the top of the page
+Quote Post
temp1
post Apr 12 2013, 02:40
Post #34





Group: Members
Posts: 17
Joined: 23-September 06
Member No.: 35512



thank u,lvqcl
love it.
fb2k+windows 8 pro
works perfect rolleyes.gif
Go to the top of the page
+Quote Post
lixtary
post Jul 3 2013, 10:41
Post #35





Group: Members
Posts: 1
Joined: 3-July 13
Member No.: 108941



Hi!lvqcl ,thank you very much ,your encode is just what i want to find.this time i can convert music to .wma more conveniently.I'm very glad to see your achievement!!!
Go to the top of the page
+Quote Post
Kreisch
post Apr 23 2014, 15:04
Post #36





Group: Members
Posts: 2
Joined: 23-April 14
Member No.: 115703



Thank you for making this handy tool available. I can't seem to get stereo to mono downmix working, though. Here's what I've tried:

CODE
input file as per ffmpeg:
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s

wmaencode --out-channels 1 "links, rechts.wav"

output file as per ffmpeg:
Stream #0:0(ger): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, fltp, 128 kb/s

And it is stereo indeed, verified using my ears. What am I missing?
Go to the top of the page
+Quote Post
lvqcl
post Apr 23 2014, 15:17
Post #37





Group: Developer
Posts: 3526
Joined: 2-December 07
Member No.: 49183



a) WMAencode doesn't downmix itself. It asks Windows Media Runtime to do this (the same is true for --out-samplerate and --out-bitdepth options)
b) 128 kbps mono wma files aren't supported by WM Runtime, so it ignores downmix request.

Try to create 48 kbps WMA file and you'll see that --out-channels 1 works in this case.
Go to the top of the page
+Quote Post
Kreisch
post Apr 23 2014, 17:26
Post #38





Group: Members
Posts: 2
Joined: 23-April 14
Member No.: 115703



Thank you for your prompt reply. It works as you're saying.

So, knowing that the Windows Media Runtime does not blindly support any random combination of encoding parameters but only specific ones, the user can find clues about what the combinations are and what parameters to supply by reading wmaencode --print-formats.
Go to the top of the page
+Quote Post
CitizenInsomniac
post Jan 15 2015, 23:40
Post #39





Group: Members
Posts: 30
Joined: 15-January 15
From: Seattle, WA, USA
Member No.: 118374



lvqcl, I just wanted to say thank you for putting this app together. Years ago, while I was working at Microsoft, I had made modifications to the original WMCmd.vbs (http://citizeninsomniac.com/WMV/#WMCmd) that allowed a lot of advanced functionality for VC-1 and WMA encoding, but I'm glad somebody just skipped the entire WME9 SDK altogether and did a native implementation based on the WM Format SDK (or Media Foundation, whichever one you used). That's definitely the best way to go.


Go to the top of the page
+Quote Post
CitizenInsomniac
post Jan 16 2015, 03:45
Post #40





Group: Members
Posts: 30
Joined: 15-January 15
From: Seattle, WA, USA
Member No.: 118374



I have a feature suggestion too:

It'd be really nice if the tool was able to:

1) print to screen the DLL version of the WMA encoder DMO (wmadmoe.dll) installed on the system

2) embed the WMA encoder DLL version into the "WM/ToolVersion" or "WM/EncodingSettings" ASF attribute, so it's documented which WMA codec version was used




Go to the top of the page
+Quote Post
lvqcl
post Jan 16 2015, 16:45
Post #41





Group: Developer
Posts: 3526
Joined: 2-December 07
Member No.: 49183



QUOTE (CitizenInsomniac @ Jan 16 2015, 05:45) *
2) embed the WMA encoder DLL version into the "WM/ToolVersion" or "WM/EncodingSettings" ASF attribute, so it's documented which WMA codec version was used

When I open .wma file in Winamp, I can see in its properties:
CODE
WMFSDKVersion      12.0.7601.17514

so it's sort of documented already.
Go to the top of the page
+Quote Post
CitizenInsomniac
post Jan 17 2015, 01:00
Post #42





Group: Members
Posts: 30
Joined: 15-January 15
From: Seattle, WA, USA
Member No.: 118374



QUOTE (lvqcl @ Jan 16 2015, 07:45) *
When I open .wma file in Winamp, I can see in its properties: WMFSDKVersion 12.0.7601.17514 so it's sort of documented already.


Oh, good call. I was only checking with MediaInfo, which probably only registers a subset of ASF attributes. When I checked with ASF Viewer, I was able to see the attribute you mentioned. Thanks!

This post has been edited by CitizenInsomniac: Jan 17 2015, 01:00
Go to the top of the page
+Quote Post
CitizenInsomniac
post Jan 24 2015, 01:37
Post #43





Group: Members
Posts: 30
Joined: 15-January 15
From: Seattle, WA, USA
Member No.: 118374



lvqcl, I have another question:

Do you know which encoder complexity value (MFPKEY_ENCCOMPLEXITY) you're using for WMA Lossless?

Looks like the default value changed from 100 (worst performance, best efficiency) to 0 (best performance, worst efficiency) between Vista and Win7, which is probably something most people are unaware of. https://msdn.microsoft.com/en-us/library/wi...9(v=vs.85).aspx


Go to the top of the page
+Quote Post
lvqcl
post Jan 24 2015, 09:09
Post #44





Group: Developer
Posts: 3526
Joined: 2-December 07
Member No.: 49183



This program uses Windows Media Format SDK, not Media Foundation. So I have no idea and I'm not sure that this property is applicable to WMF SDK.
Go to the top of the page
+Quote Post
CitizenInsomniac
post Jan 25 2015, 09:03
Post #45





Group: Members
Posts: 30
Joined: 15-January 15
From: Seattle, WA, USA
Member No.: 118374



QUOTE (lvqcl @ Jan 24 2015, 00:09) *
This program uses Windows Media Format SDK, not Media Foundation. So I have no idea and I'm not sure that this property is applicable to WMF SDK.


It's been a while since I've used them, but I believe every MFT property is also exposed as a DMO property and configurable via the IPropertyBag interface. I'm not sure if the property names are the same or if you have to query the interface first for a complete list, but you should be able to get to them one way or another. https://msdn.microsoft.com/en-us/library/wi...8(v=vs.85).aspx might shed more light on the matter.

Go to the top of the page
+Quote Post
lvqcl
post Jan 25 2015, 12:18
Post #46





Group: Developer
Posts: 3526
Joined: 2-December 07
Member No.: 49183



According to https://technet.microsoft.com/en-US/ff819329
QUOTE
Available only by using IPropertyStore.

So, no luck.
Go to the top of the page
+Quote Post
CitizenInsomniac
post Jan 26 2015, 11:50
Post #47





Group: Members
Posts: 30
Joined: 15-January 15
From: Seattle, WA, USA
Member No.: 118374



QUOTE (lvqcl @ Jan 25 2015, 03:18) *
Available only by using IPropertyStore.

So, no luck.


Is there a way to query IPropertyBag for a list of available properties?

I don't remember specifically for WMA encode, but I do remember for WMV9 (VC-1) encoder that there was a 1:1 mapping between DMO and MFT properties.

Consider that most of these codecs were developed before Media Foundation was introduced in Vista, so it would make sense that their properties were primarily exposed via the DMO interface and then later supplemented via the MFT interface. I'd be very surprised if the DMO property bag was completely disabled.

Go to the top of the page
+Quote Post
lvqcl
post Jan 26 2015, 16:44
Post #48





Group: Developer
Posts: 3526
Joined: 2-December 07
Member No.: 49183



QUOTE (CitizenInsomniac @ Jan 26 2015, 13:50) *
Is there a way to query IPropertyBag for a list of available properties?

I have no idea. I'm not very familiar with COM, interfaces, and so on.
Go to the top of the page
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th January 2015 - 13:38