Saturday, January 31, 2009

Helix mp3 encoder

Helix is an mp3 encoder that specialises in high encoding speed. It's written in assembly language, which results in significantly faster processing speed compared to other programming languages. It's based on an mp3 encoder from Xing dating from the Pentium era of the late 90's, which explains why speed was a priority.

I record some programs from the radio and a few days ago I wanted to encode a four hour wav file (44khz stereo) to preview on my mp3 player but even on supposedly fast setting LAME was giving me a 90 minute ETA and Windows Media Encoder could only shave around 15 minutes off that. And it was at least 35ÂșC inside the house and rising due to a heatwave so I didn't want to max out the processor for that long. I remembered Helix from the results of a public listening test (like this one) that I had come across previously.
Helix needed less than 5 minutes which demonstrates just how efficient assembly code is. Computer and console emulators also used to use assembly to achieve playable speeds, and probably still do.

The sound quality is perfectly adequate from what I have heard so far although the filesizes are a little on the large side for the resulting quality. Voice content has also produced good results, by default Helix uses Variable Bit Rate (VBR) and unlike LAME it can choose sensibly at low bitrates (LAME has fixed this issue with Average Bit Rate (ABR)). Again, it needs to use higher bitrates on average than LAME so it's suited for things that will be listened to once or twice. Even if you do keep it the filesizes aren't excessively large.

Below is the helpfile contained within the program (which can be downloaded from Softpedia) which gives a slightly better explanation of the available settings than the documentation. Foobar2000 is the only frontend for Helix and that also has completely inadequate documentation. I did however manage to find a good command line after frustrating myself by trying to create my own. If %s is added to the command line it creates another wav file rather than using the original, which slows down the whole operation.

For music:
-X2 -U2 -V120 - %d

For voice:
-X2 -U2 -M3 -V40 - %d

Help contents:

Usage: mp3enc (input) (output) [options]
(input) and/or (output) can be "-", which means stdin/stdout.

mp3enc input.wav output.mp3

-Nnsbstereo -Sfilter_select -Aalgor_select
-C -X -O
-D -Qquick -Ffreq_limit -Ucpu_select -TXtest1
-SBTshort_block_threshold -EC
-h (detailed help)

B[bitrate]Per channel bitrate in kbits per second.
Encoder will choose if -1. (default)
M[mode] Select encoding mode: mode-0 stereo=0 mode-1 stereo=1 dual=2 mono=3.
Selects vbr encoding and vbr scale. Valid values are 0-150.
Applies to mode-1 stereo mode only. Number of subbands to
encode in independent stereo. Valid values are 4, 8, 12, and 16.
The encoder limits choices to valid values. The encoder
will make a default selection if nsbstereo = -1.
Valid values for Layer III are 3-32.
Selects input filtering: no filter = 0, DC blocking
filter = 1.
if filter = -1 the encoder will choose (default)
A[algor_select] 0 = track input, 1=MPEG-1, 2=MPEG-2, xxxxx=sample_rate
C c0 clear copyright bit, c1 set copyright bit
O o0=copy, o1=original
X MPEG compatable Xing header, -X2 with/TOC
U u0=generic, u2=Pentium III(SSE)
Q disable_taper, q0 = base, q1 = fast, q-1 = encoder chooses
D Don't display progress
F Limits encoded subbands to specified frequency, f24000
HF high frequency encoding. Allows coding above 16000Hz.
hf1=(mode-1 granules), hf2=(all granules), -B96 or -V80 need
TX tx6, test reserved 6 or 8 seems best (startup_adjustNT1B)
** v5.0 TEST 1 as of 8/15/00
** v5.0 TEST 2 8/18/00
** v5.0 TEST 3 default tx6 (prev = tx8)
** v5.0 TEST 4 mods to short fnc_sf, ms corr. hf enable > 80
** v5.0 TEST 5 fix odd npart, ix clear
** v5.0 TEST 6 add reformatted frames
** v5.0 TEST 7 drop V4 amod
** v5.1 2005.08.09 (see CVS log for details)
short_block_threshold default = 700
EC Display Encoder Setting

No comments: