READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

MP3: mono to stereo without re-encoding?

Get help on any and all audio formats, or chip in and help others!
Post Reply
AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

MP3: mono to stereo without re-encoding?

Post by AlphaTwentyThree » Mon Oct 28, 2013 3:08 pm

Simple question, not so simple answer maybe:
Is there a way to join mono channels of MP3 files without re-encoding? If it's possible, I'll write a QuickBMS script.
Thanks for your help.

P.S.: I'm specifically searching for a way to join the mono channels from Deus Ex: Human Revolution.
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)

User avatar
RENIKRILL
advanced
Posts: 58
Joined: Wed Feb 11, 2009 12:54 pm
Location: land of the golden sun
Has thanked: 13 times
Been thanked: 18 times

Re: MP3: mono to stereo without re-encoding?

Post by RENIKRILL » Wed Nov 06, 2013 6:13 am

Certainly is possible. SoX can help you out: http://sourceforge.net/projects/sox/ :)
From the CLI, use the -M command

ex: sox.exe -M input_left.mp3 input_right.mp3 output.mp3
(where "input_left" is your left channel, and "input_right" is your right. Just to clarify 8D )

Hope this helps buddy.

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: MP3: mono to stereo without re-encoding?

Post by AlphaTwentyThree » Wed Nov 06, 2013 12:12 pm

Thanks a lot!!! :) :) :)
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: MP3: mono to stereo without re-encoding?

Post by AlphaTwentyThree » Fri Jan 24, 2014 3:27 pm

Sorry to necro-post, but I've just now found the time to try the program. Trying to merge two mono files I get the error message:

"Unable to load MAD decoder library (libmad)"

How can I solve this?
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: MP3: mono to stereo without re-encoding?

Post by AlphaTwentyThree » Fri Jan 24, 2014 3:34 pm

Solved the problem, the files are downloadable here: https://docs.google.com/file/d/0BxRalAl ... edit?pli=1

HOWEVER, there's a new problem: I can't get sox to merge the channels without re-encoding - and I don't see any option to do so! Can anybody help me out? Is the program really able to do this?
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)

Darkstar
advanced
Posts: 67
Joined: Thu Jun 14, 2007 1:14 pm
Location: Southern Germany
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: MP3: mono to stereo without re-encoding?

Post by Darkstar » Fri Jan 24, 2014 10:51 pm

I don't think it is possible to convert two mono mp3s into a joint-stereo one without re-encoding. You need the sum and difference of the audio data for joint-stereo and the only way I can think of to get these is by decoding the source streams (followed, obviously, by re-encoding the muxed stream). You might be able to convert to a multichannel MP3 with two channels by fixing the frame header flags and combining the data from each frame (or interleave the frames), but that's not trivial (it might not even be possible).

I haven't (yet) found any mp3 file which uses the multichannel type encoding for stereo files, and so I don't even know if existing decoders handle these correctly...

-Darkstar
Check out the REWiki!

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: MP3: mono to stereo without re-encoding?

Post by AlphaTwentyThree » Fri Jan 24, 2014 11:46 pm

Of course joint-stereo is not possible but what about genuine stereo? Aren't the two channels on MP3 processed independently? Sorry for sounding like a dork... ;)
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)

Darkstar
advanced
Posts: 67
Joined: Thu Jun 14, 2007 1:14 pm
Location: Southern Germany
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: MP3: mono to stereo without re-encoding?

Post by Darkstar » Sat Jan 25, 2014 3:39 pm

As I said, I've never seen an actual (non-joint-)stereo mp3 file. Here's a draft of the Layer III bitstream spec, maybe you (or someone else) finds the answer you need in there
Check out the REWiki!

merlinsvk
ultra-veteran
ultra-veteran
Posts: 411
Joined: Mon Oct 27, 2008 12:11 am
Location: Slovakia
Has thanked: 35 times
Been thanked: 117 times

Re: MP3: mono to stereo without re-encoding?

Post by merlinsvk » Sat Jan 25, 2014 4:28 pm

Something like this?
Create a stereo output from two mono inputs:

Code: Select all

ffmpeg -i left.mp3 -i right.mp3 -ac 2 output.wav
or with the amerge audio filter:

Code: Select all

ffmpeg -i left.mp3 -i right.mp3 -filter_complex amerge output.mka
https://trac.ffmpeg.org/wiki/AudioChann ... monostereo

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 621 times

Re: MP3: mono to stereo without re-encoding?

Post by AlphaTwentyThree » Sat Jan 25, 2014 4:44 pm

without re-encoding! That includes decoding as well...

Seems there's no actual possibility. :-\
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)

Post Reply