Paladin of the Pegasos
Posts: 1282 from 2010/1/6
From: EU-Austria (Wien)
There is a simple way to decode/encode nearly almost any video-formats to mp3 with MENCODER!
I've written a small, primitive Arexx-script which you can use.......
Be carefull with amplification - in most cases you need only "1" - you'll have to play a little bit with......
/*Video2MP3 by KBS ®2010*/
/* Note: Ram Disk must be named as RAM_DISK. It is possible to set an assign RAM_DISK: to "RAM DISK"
MP3 will always saved in source-file directory. The name (file.xxx) will automatically changed
to file.mp3. MENCODER has to be in following path: sys:utilities/mplayer/mencoder
If not - change path in arexx-programm!
*/
/*---------Öffne Fenster */
open('out','syscon:300/100/800/300/Video2mp3/close')
call writeln 'out','VIDEO to MP3 - Decode videostreams and extract MP3....! (®KbS. 2010)'
call writeln 'out',''
call writeln 'out','Attention: MP3-file will be stored in same directory as source-file!'
/*---------lade Filmdatei */
address command 'requestfile > env:getvideo title "Choose video-file......"'
open(getvideo,'env:getvideo')
answer=readln(getvideo)
/*----------Brich ab wenn keine Datei gewählt */
if answer='""'
then do
call writeln 'out',''
call writeln 'out','No file - break! - Press ENTER!'
call readln 'out'
exit
end
else do
/*----------hole Dateinamen */
Videoname=strip(translate(answer,'','"'))
Videoname=space(Videoname,1,'_');
close(getvideo)
address command 'delete env:getvideo quiet'
/*---------wähle Audioverstärkung*/
address command 'requestchoice > env:getnum "Volume" "amplification (default=1, no amplification)" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"'
open(getnum,'env:getnum')
k=readln(getnum)
close(getnum)
address command 'delete env:getnum quiet'
if k='' then k=1 ;/*defaultwert ist 1*/
/*---------Erzeuge Name.mp3 aus Filmnamen...*/
i=length(Videoname);say
Zieldatei = delstr(Videoname,i-3)||'.mp3'
/*---------Encodiere MP3 mit MENCODER (Achtung auf Pfad zu Mencoder) */
call writeln 'out','Encoding ' answer ' to "' Zieldatei '" with amplification ' k
call writeln 'out','Please wait......'; call writeln 'out', ''
address command 'sys:utilities/mplayer/mencoder' answer '-ovc raw -of rawaudio -oac mp3lame -lameopts vol='k':cbr:br=128 -o 'Zieldatei; call writeln 'out',''
/*---------Beenden */
call writeln 'out','Ready! - new MP3-file >' Zieldatei '< writen.'
call writeln 'out','Press ENTER to stop! ';call writeln 'out',''
call readln 'out'
end
If you wish different quality of mp3: Increase/drecrease bitrate in MENCODER-command line......
You can use this script in Ambient-custom-menu (with Crabum) - very usefull!
Peg2, 3xPowerMac G5, 2xPowerbookG4, 2x MacMiniG4, Efika (again), A3000T and life is never boring.....