Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Wanted: Mono capable windows command line mp3/mp2 -> ogg converter (Read 7740 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Wanted: Mono capable windows command line mp3/mp2 -> ogg converter

Hi,

I'm looking for a simple mp3/mp2 -> ogg encoder recommendation for windows that
does not require installation and can encode a single file (or folder). The resulting ogg
file should be mono, to get it as small as possible.

I know that normally mp3->ogg conversions are a big No-No due to the loss of quality.

In my usage scenario this is not an issue: I want to convert radio (speech) programs so
that I can get as much as possible on a 2GB Ipod Nano (Rockbox) and don't mind if the
quality suffers a lot. I'll delete the files after listening to them anyway.
I plan to keep the encoder on the Ipod - to run without installation whenever needed.

The conversion has to be directly from mp3/mp2 to ogg - I normally do not have the 2GB
free hard disc space required to unpack the radio shows to WAV before encoding them.

The best thing I have so far is ffmpeg, called like this:
ffmpeg -i input.mp3 -acodec vorbis -aq 20 -ar 22050  output.ogg

Alas it only seems to do ogg in stereo, not mono.

Any recommendations?

Wanted: Mono capable windows command line mp3/mp2 -> ogg converter

Reply #1
You could lame to decode with a pipe, ie.
Code: [Select]
LAME -m mono --decode input.mp3 - | oggenc -whateveroptionsyouwant -input - -output file.ogg

Note that i made up the parameters for oggenc, cos i've never used it, so find out what options you need to do mono encoding with stdin as the input file (usually done by specifying '-' as the file name), Also I don't know if the -m mono switch works for decoding, but that shouldnt matter if you can get oggenc to do the mono conversion, or if the input mp3 is already mono.

Wanted: Mono capable windows command line mp3/mp2 -> ogg converter

Reply #2
You could lame to decode with a pipe, ie.
Code: [Select]
LAME -m mono --decode input.mp3 - | oggenc -whateveroptionsyouwant -input - -output file.ogg

Note that i made up the parameters for oggenc, cos i've never used it, so find out what options you need to do mono encoding with stdin as the input file (usually done by specifying '-' as the file name), Also I don't know if the -m mono switch works for decoding, but that shouldnt matter if you can get oggenc to do the mono conversion, or if the input mp3 is already mono.


Thank for replying. I'm using this on Windows XP and I don't know if the pipe it working.
Whatever oggenc - parameters I use, I always end up with a 1.mp3.wav file on my harddisc
(for which I do not have the harddisc space in real life)

The lame help also specifies the "--decode" option as
" --decode        input=mp3 file, output=wav"

Code: [Select]
C:\Temp\3>lame -m mono --decode 1.mp3 | oggenc2 -input -  --output=file.ogg
ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
input:  1.mp3  (44.1 kHz, 2 channels, MPEG-1 Layer III)
output: 1.mp3.wav  (16 bit, Microsoft WAVE)
skipping initial 1105 samples (encoder+decoder delay)
Frame#    12/10694  192 kbps   MS    oggenc2: invalid option -- i
Frame#    13/10694  160 kbpsWARNING: Unknown option specified, ignoring->
Frame# 10694/10694   32 kbps   MS
ERROR: Input file "(stdin)" is not a supported format

Wanted: Mono capable windows command line mp3/mp2 -> ogg converter

Reply #3
Hi,

I'm looking for a simple mp3/mp2 -> ogg encoder recommendation for windows that
does not require installation and can encode a single file (or folder). The resulting ogg
file should be mono, to get it as small as possible.

I know that normally mp3->ogg conversions are a big No-No due to the loss of quality.

In my usage scenario this is not an issue: I want to convert radio (speech) programs so
that I can get as much as possible on a 2GB Ipod Nano (Rockbox) and don't mind if the
quality suffers a lot. I'll delete the files after listening to them anyway.
I plan to keep the encoder on the Ipod - to run without installation whenever needed.

The conversion has to be directly from mp3/mp2 to ogg - I normally do not have the 2GB
free hard disc space required to unpack the radio shows to WAV before encoding them.

The best thing I have so far is ffmpeg, called like this:
ffmpeg -i input.mp3 -acodec vorbis -aq 20 -ar 22050  output.ogg

Alas it only seems to do ogg in stereo, not mono.

Any recommendations?

You could try my xcLAME command line program. It will encode wav -> mp3, wav -> ogg, mp3 -> ogg and ogg -> mp3. It's based on LAME3.92 and the 1.0 release of ogg vorbis. I've not kept it fully up to date as there was never great interest in it. I did it for fun, but it does work. Since you say quality is no big issue, this should do the job and it's a bit 'cleaner' than messing with pipes.

You can d/l from: http://homepage.ntlworld.com/jfe1205/LAME/xcLAME.zip 

Wanted: Mono capable windows command line mp3/mp2 -> ogg converter

Reply #4
Code: [Select]
C:\Temp\3>lame -m mono --decode 1.mp3 | oggenc2 -input -  --output=file.ogg

You are missing the stdout "-" for LAME's output and -input is not a parameter for oggenc2

Use:
lame --help
and
oggenc2 --help
and reference the options (I'd tell you myself, but I don't remember off the top of my head)
Vorbis-q0-lowpass99
lame3.93.1-q5-V9-k-nspsytune

Wanted: Mono capable windows command line mp3/mp2 -> ogg converter

Reply #5

Code: [Select]
C:\Temp\3>lame -m mono --decode 1.mp3 | oggenc2 -input -  --output=file.ogg

You are missing the stdout "-" for LAME's output and -input is not a parameter for oggenc2



I got it to work - with both mp3 and mp2 source files.

it now looks like this for a 48000 kHz radio file:
Code: [Select]
lame --decode input.mp2 - | oggenc2 - --downmix -q -2 --resample 24000 --output=output.ogg


The resulting file plays fine on an Ipod Nano with Rockbox.

Thanks. (Also thanks to john33 for the other suggestion)

Wanted: Mono capable windows command line mp3/mp2 -> ogg converter

Reply #6
(Original follow up question removed)

I asked as a follow-up how to do this using ffmpeg.

This is how:
Code: [Select]
ffmpeg.exe -i input.ts -acodec pcm_s16le -f wav - | oggenc2 - --raw --output =output.ogg