Musepack encoder, Modification to write MPEG Audio Layer 1/2 |
Musepack encoder, Modification to write MPEG Audio Layer 1/2 |
Dec 5 2010, 21:54
Post
#1
|
|
|
Group: Members Posts: 296 Joined: 27-July 02 From: Germany Member No.: 2821 |
Hello,
several years ago it was said that changing the MusePack encoder to mp2 output wonīt take very long. But AFAIK nobody has ever released a musepack-based mp2-encoder so far. Because I need a high-quality mp2-encoder (for authoring DVDs) I tried it myself: I was able to modify the encoder in a way it outputs a 448kbit/s MP1 file, if the bitrate musepack wants to encode is higher, the last subbands are just cut off, otherwise the frame is padded with 0. The problem is now: After just one musepack frame (=three layer1 frames) the bitrate is decreased dramatically: Beginning from band 5 only 2 bits are assigned for each subband, the lower ones also have 8 bits max. It doesnīt matter at what quality I try, itīs the same for thumb to insane. Otherwise the output file will play fine (very noticeable artifacts because of low effective bitrate (about 200kbps layer1, stereo, 44100khz), but otherwise it seems to work). Is here anybody familiar with the MusePack encoder able to tell why there is this bitrate drop? I havenīt done anything special, just disabled MS coding, changed the scalefactors, created a function to write MPEG layer1 bitstream and modified the allocate function not to use unsupported quantizers (resolution is increased in that case) and that allocation is limited by maximum bitrate (thatīs not causing the problem). Thatīs it. Unfortunately the source code is not very structured/readable so I donīt see what Iīm missing. Any ideas? |
|
|
|
![]() |
Dec 6 2010, 23:43
Post
#2
|
|
|
Group: Members Posts: 296 Joined: 27-July 02 From: Germany Member No.: 2821 |
I was able to trace the problem inside "Psychoakustisches_Modell" to the function "PreechoControl", which is changing a global array. After commenting the array-modifying code the bitrate drop is gone, but the bitrate allocation is awful. Most likely this is not the only problem. I can encode decent sounding 448 kbps MP1 file using a fixed allocation table (not using psychoacoustics at all).
What am I missing that the function "Psychoakustisches_Modell" is returning no useable values? |
|
|
|
S_O Musepack encoder Dec 5 2010, 21:54
alexeysp Although I cannot answer your question, may I ask ... Dec 6 2010, 11:21
S_O TooLAME isnīt developed for a long time now, also ... Dec 6 2010, 15:52
alexeysp No offence, but I think you're wasting your ti... Dec 7 2010, 15:47
S_O QUOTE (alexeysp @ Dec 7 2010, 15:47) No o... Dec 7 2010, 18:53
alexeysp Apparently this table provides penalty for replaci... Dec 8 2010, 00:28
S_O Thank you very much! That makes a sense and he... Dec 8 2010, 14:12
S_O Iīm making some progress creating the encoder (Iīm... Dec 15 2010, 13:28
benski QUOTE (S_O @ Dec 15 2010, 08:28) Iīm maki... Dec 15 2010, 20:00
S_O Interesting. You say the reason this is done, beca... Dec 16 2010, 22:06
benski I can't remember all the details of layer 2, b... Dec 17 2010, 02:40
pbelkner QUOTE (benski @ Dec 17 2010, 03:40) Yes d... Dec 19 2010, 12:12
S_O Iīve tested different files, also digital silence ... Dec 18 2010, 16:13
benski When lowering resolution, can you lower critical ... Dec 18 2010, 19:33
S_O The Musepack Psy-Model decides what bands are crit... Dec 19 2010, 01:46
bryant NAME = Name Ain't a Musepack Encoder Dec 19 2010, 08:08![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd May 2013 - 05:35 |