Warning: mysqli_real_connect(): Headers and client library minor version mismatch. Headers:50625 Library:50543 in /sites/rockbox.org/flyspray/adodb/drivers/adodb-mysqli.inc.php on line 108 FS#5317 : mp3_encoder improperly encodes mono .wav files



FS#5317 - mp3_encoder improperly encodes mono .wav files

Attached to Project: Rockbox
Opened by tim e (timecop) - Monday, 08 May 2006, 07:20 GMT
Last edited by Andree Buschmann (Buschel) - Wednesday, 05 January 2011, 07:54 GMT
Task Type Bugs
Category Codecs
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


when using mp3_encoder plugin on a 44khz mono .wav file, the resulting mp3 plays too fast...
<linuxstb> it seems that Stereo input is assumed in lots of places.... The encoder itself seems to support mono, but the Rockbox implementation breaks it.

There's init_mp3_encoder_engine() which is passed 'true' for stereo regardless of actual .wav format, and there's also some code in the encoding loop which tries to downsample stereo to mono (huh what) if nchannels was set to mono.

Looks like someone got carried away with cut & paste
This task depends upon

Closed by  Andree Buschmann (Buschel)
Wednesday, 05 January 2011, 07:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with r28971
Comment by Nicolas Pennequin (nicolas_p) - Monday, 11 December 2006, 19:46 GMT
is this still an issue ?
Comment by Michael Sevakis (MikeS) - Friday, 02 February 2007, 10:46 GMT
It's been worked out of the adaptation to the encoder framework. If this should be fixed and the transcoder will be kept then I might be able to take care of it.
Comment by Peter D'Hoye (petur) - Sunday, 05 August 2007, 00:28 GMT
Comment by Marc Guay (Marc_Guay) - Monday, 14 July 2008, 05:35 GMT
Confirmed with e200 & r18013.
Comment by Michael Sevakis (MikeS) - Monday, 14 July 2008, 06:27 GMT
Petur? Isn't this a plugin issue? I've never worked on mp3_encoder. Of course I did say I might be able to take care of it in a post up there I hardly recall making. I must have said it for a good reason though but exactly what it is, my memory gnomes have to go fetch. :)
Comment by Andree Buschmann (Buschel) - Tuesday, 04 January 2011, 07:43 GMT
44.1kHz mono encodes correct with attached patch (also see  FS#10678 ). Nevertheless there is something going wrong with samplerates != 44100. At least a 24kHz mono file encodes strange. Therefor I will not submit this fix and continue work in  FS#10678 .