View Issue Details

IDProjectCategoryView StatusLast Update
0000956MMW v4Properties/Auto-Toolspublic2007-07-30 00:10
Reporterjiri Assigned To 
PriorityurgentSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Fixed in Version3.0 
Summary0000956: WM9 encoding (regression: tracks encoded at wrong bitrate)
DescriptionMM can currently create WM7 audio format only. By supporting WM9 we could for example create lossless WMA files (this covers ripping/conversion)

... to be further specified, entered for further investigation of options how to implement this...
Additional InformationCurrently WMAs are created by \Helpers\WMAFunct (see WMAWrite.cpp, WMAWrite.h and related files). However only WM7 features are supported, i.e. no new better compression techniques or lossless encoding.

WM Format SDK 9.5 should be used for this purpose (http://download.microsoft.com/download/9/f/d/9fdfb288-b4bf-45fa-959c-1cc6d909aa92/wmformat95sdk.exe).
TagsNo tags attached.
Fixed in build1052

Relationships

related to 0012720 closedLudek Memory utilization is very high (when converting some specific files to specific WMA formats) 

Activities

jiri

2006-07-12 09:13

administrator   ~0007453

Due to added encoding features also UI has to be enhanced, suggested appearance:

Type of bitrate: [CBR | VBR | Lossless] {dropdown}
Bitrate: [dropdown for CBR, spinedit for VBR, nothing for lossless]

... (other possible controls follow, depending on what features WM9 offers, there could e.g. be some limit on minimal and maximal bitrate for VBR mode, or other options).

jiri

2006-11-28 17:46

administrator   ~0008200

Based on the current understanding of WM audio encoding features, the UI should look like:

Audio Codec: [WMA, WMA Lossless, WMA Pro (?), WMA Speech (?)]
   - I'm not sure if WMA Pro doesn't involve any license fees.
   - WMA Speech probably isn't needed, but would be nice there

Type of bitrate: [Constant bitrate (CBR) 1-pass, Constant bitrate (CBR) 2-pass, Variable bitrate (VBR), Average bitrate (ABR)]
   - note that this choice (as well as any other following ones) isn't shown for Lossless WMAs, because it isn't needed


   - What is shown below depends on the chosen bitrate - as well as in MP3 configuration dialog
   - for CBR:
Bitrate: _________ [v] {a dropdown with all available bitrate values}

   - for VBR:
Quality: -----[x]-------- {a slider for setting quality between 0% and 100%, a label should be shown with the chosen quality}

   - for ABR:
Bitrate: __________ [] {a spin edit for selection of average bitrate}
[ ] Maximum bitrate: ______ [] {a checkbox that limits bitrate and a spin edit where the value for limit is specified}


Samplerate: ________ [v]
Channels: ________ [v]


Don't forget about localization! (i.e. controls should automatically adjust based on texts, as well as in other dialogs)

jiri

2006-11-28 17:47

administrator   ~0008201

Technical note: Some interesting info about VBR, 2-pass modes, etc. is at:
http://msdn2.microsoft.com/en-us/library/aa384764.aspx
http://msdn2.microsoft.com/en-us/library/aa384570.aspx

jiri

2006-11-28 18:15

administrator   ~0008202

Technical note: 2-pass encoding requires some internal changes in MM:
1. In WMAManage.pas, another copy of 'decoder' variable should be used (i.e. don't seek to its beginning)
2. The copy should be made based on filename of 'decoder' and also its Normalize and NormalizeMult properties.
3. In order to achieve maximal speed, it would be best to not always decode source track twice, but to cache decoded copy in memory for smaller tracks.
I'd say that we could keep in a memory array a track that decoded is smaller than 25% of total system RAM.
DecodedBytes = int64(decoder.TotalSamples)*decoder.realChannels*decoder.realBitsSample div 8

jiri

2007-04-17 11:57

administrator   ~0009032

I probably replicated the problem reported in http://www.mediamonkey.com/forum/viewtopic.php?t=17136

When I tried to convert an mp3 track to WMA ABR 95 and Maximum bitrate set to 160 (this seems to trigger the problem), the converted track was empty (no audio).

jiri

2007-04-30 10:36

administrator   ~0009082

Another problem was reported at http://www.mediamonkey.com/forum/viewtopic.php?t=17389 , but I haven't tried to reproduce it.

rusty

2007-05-17 16:39

administrator   ~0009166

Regression: tracks are being encoded at incorrect bitrates.
e.g. set MM to encode to wma at 64 or 128 kbps and it encodes at 320kbps.

user9

2007-05-21 13:48

  ~0009176

Last edited: 2007-05-21 13:49

Problem with tracks encoded at wrong bitrate was resolved in the last commit (revision 0002883) and will be available in the next MM build (3.0.0.1035).

rusty

2007-06-15 16:18

administrator   ~0009431

Not sure how this was tested, but in build 1041 I converted lossless tracks to WMA and found, that for 'Depeche Mode - People are People' (3:47)

CBR encoding (1-pass: 96, 128, 192) seems to work correctly, yielding filesizes of 2.6MB, 3.5MB, and 5.2MB.

(1) VBR encoding at 20%, 40%, 60%, 80%, 100% all yielded a file sized 5.1MB
(2) with an indicated bitrate of 6476kbps!!

(3) ABR encoding at 96, 128, 192 kbps all yielded a file sized 1.3MB
(2) with an indicated bitrate of 22978kbps!!

(4) WMA Lossless wasn't supported.

user9

2007-06-19 13:09

  ~0009504

Fixed in build #1046.

jiri

2007-06-21 11:39

administrator   ~0009514

Seems to be working fine, just some questions/suggestions:

1) There isn't samplerate selection in VBR mode. As I see, WM supports 44100 and 48000 samplerates there, so I guess we could add this selection too.
2) Often it happens that user selects incompatible combination of values and WM can't create such a file - which results in an error message upon conversion. It would be better if user is warned directly when selecting the values and possibly an allowed combination of values is set (as it was in MM 2.5). For example select WMA CBR 256kpbs 11025Hz - failure, or WMA Speech 20kbps, 8000Hz - failure.

Except for these issues, all other conversions I tested worked well.

user9

2007-07-13 16:13

  ~0009705

Fixed in build 1047.

rusty

2007-07-16 17:50

administrator   ~0009805

Tested 1049. This is generally working but there are a couple of issues that I need to clarify:

5) Tracks encoded to WMA Pro vbr appear in the MM library with bitrates that don't make sense (see table below)

6) The encoding settings for VBR seem to be weighted towards lower bitrates. I'm not sure if this is a WMA thing or a MediaMonkey-specific issue. As shown in the table below, a setting of 50-the midway point, yields a bitrate of 75kbps!


Encoding WMA WMA Pro
Setting Bitrate Bitrate Bitrate Bitrate
          in MM Mr. Q Man in MM Mr. Q Man
20 78 64 8681 64
50 95 75 8777 128
80 139 109 5920 192


For comparison, the VBR settings in WMP are:
40-75kbps
50-95
85-145
135-215
240-355

Note: it's possible that this issue is just caused by incorrect display of bitrates in MM.

user9

2007-07-23 17:28

  ~0009888

All WMA Pro VBR conversions I tested worked well with correct bitrates values.
If do you have specific track with this issue, please make upload on FTP.

I fixed incorrect display of samplerates and channels in MM.

All audio properties used in WMA settings dialog are dynamically enumerated from WMA codecs, same way as you can see in Windows Media Encoder.

For comparison download and install Windows Media Encoder from http://www.microsoft.com/windows/windowsmedia/forpros/encoder/default.mspx

rusty

2007-07-29 05:59

administrator   ~0009968

Tested in 1054 and it seems to work correctly.

One question, though, to make sure I've verified this correctly. I thought that bitrate is calculated when tracks are scanned/read and is based on Filesize/seconds in a track, rather than bitrate information included in the track's header.

Yet, for the WMAPro VBR files that I encoded with build 1049, when I examine them with build 1054, they continue to display with incorrect bitrates. However, if I re-encode the tracks with build 1054, the bitrates are then rescanned correctly.

Why is this the case?

jiri

2007-07-29 15:43

administrator   ~0009970

In some formats bitrate is calculated, but WM supplies bitrate as a part of metadata and since we don't know exactly the lenght of audio data, using this field gives better result.

I don't know why there were problems with tracks encoded by previous versions, but if it works well in the current one, than it's ok.

rusty

2007-07-30 00:10

administrator   ~0009974

Verified 1054.