[kde-linux] Sound conversion from .rm to.mp3 (LM---)

Sergey Kulikov flux at hotbox.ru
Wed Jan 23 06:38:31 UTC 2008

LM--- wrote:
> James Richard Tyrer wrote:
>>> First, you need to realize that any GUI application for audio is a front 
>>> end for an application that can be accessed from the command line.
>>> So, if I wanted to convert file <x>.rm to Vorbis I could use the command:
>>> 	mplayer -ao pcm <x>.rm | oggenc -o <x>.ogg -
>>> {note the "-" at the end; this IS required}
>>> should convert <x>.rm to <x>.ogg IF, and only if, mplayer can play the file.
>>> I don't seem to have an <x>.rm file available, so I can't try this.
>>> IAC, if MPlayer won't do it, there are other Linux players (e.g. Xine & 
>>> FFMPEG) that might work.  There might be a GUI front end that would do 
>>> this, I don't really know. Perhaps someone else knows.
>> I guess mplayer -ao pcm <x>.rm | oggenc -o <x>.ogg - won't work. Because 
>> you try to perform on-fly encoding from stdout. -ao pcm argument won't 
>> perform any stdout output and will write audiodump.wav on your hard 
>> disk. So you can't use this kind of piping. I guess that would be a 
>> better idea to solve the problem in a single line:
>> $ mplayer file.rm -ao pcm && lame -m s --cbr -b 320 -s 44.1 
>> audiodump.wav file.mp3 && rm -f audiodump.wav
>> Will encode file.rm -> file.mp3 with CBR/320Kbps/44Khz/Stereo
>> Best wishes,
>> flux
> Hello Sergey, hello James Richard, hello everyone, Well Sergey, yours
> LOOKS more like the answer I was looking for - at least because I read
> .mp3 in it. Is it really the right one? I won't be able to say before I
> try and will I manage that? Not sure, because well, sorry, I'm old
> fashioned: I LOVE graphics and my umpteen fenestras on my desktop
> between which I can switch with a plain Alt-Tab key combination... But,
> well, even though I'm not a specialist of consoles (well I do use one
> every now and then, even to do "apt-get" something), I'll try that one
> if you tell me I'll not destroy anything in the process!... Further
> questions: I read that mplayer is a video player. Is it also a sound
> converter? Synaptic offers me to install 15 different libraries with
> mplayer: is that necessary? Is kmplayer the "frontend" to mplayer? Can I
> install it and get the same ease of function to convert audio files as
> with mplayer on the command line in a console? Apart from that, here is
> my contribution to the discussion on Konqueror. I have been using
> Konqueror both as a file manager and a web browser side by side with the
> Iceweasel web browser and I have been very satisfied with that
> combination. I am very pleased with the versatility and the
> possibilities offered by Konqueror, especially as far as settings are
> concerned, I find it quite flexible. I appreciated for instance that it
> was able to make use a flash plug-in that was originally designed for
> Iceweasel.
> Best regards
> Ludovic
> ___________________________________________________
> This message is from the kde-linux mailing list.
> Account management:  https://mail.kde.org/mailman/listinfo/kde-linux.
> Archives: http://lists.kde.org/.
> More info: http://www.kde.org/faq.html.
Hello, Ludovic! Let me try to explain what this command really means:
mplayer file.rm -ao pcm && lame -m s --cbr -b 320 -s 44.1 audiodump.wav 
file.mp3 && rm -f audiodump.wav

First part of it...
mplayer file.rm -ao pcm
This tells mplayer to use PCM audio output driver while playing file.rm. 
It won't play any sound on your stereo system, it will write audio 
output in a file instead (on your hard disk in a current directory). 
Default output file is called audiodump.wav as we know from mplayer's 
manual page. Next... If this operation succeed (&& in a command line) we 
issue the next command:
lame -m s --cbr -b 320 -s 44.1 audiodump.wav file.mp3
This will encode audiodump.wav file generated by mplayer to file.mp3. We 
use lame mp3 encoder for this task. A little bit about the arguments...: 
-m s: mode is Stereo, --cbr: force constant bitrate, -b 320: bitrate to 
use (320Kbps), -s 44.1: frequency (44KHz). All these arguments can be 
found in a manual page of lame mp3 encoder. Next... If this operation 
succeed (&& in a command line) we issue the next command:
rm -f audiodump.wav
This will erase audiodump.wav file from your current directory. We don't 
need this file anymore!

In this way you can encode sound not only from .rm files. Mplayer, as 
you tell, is a video player and an audio player as well, of course. If 
mplayer can play a file, it can redirect its audio output as well. 
Remember, -ao command line argument.

Yes, kmplayer is the GUI "frontend" to mplayer. But the command line 
possibilities of mplayer itself are more comprehensive. Thus I prefer to 
use command line interface, and I'm really not sure that kmplayer or 
anything else in GUI can solve this problem with format convertion in 
such an easy way.

P.S. Do not be afraid issuing this command. It won't destroy anything.

Best wishes,

More information about the kde-linux mailing list