[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Converting *.mp4 to *.mp3 or *.ogg



When the date was Thursday 15 of July 2010, AG wrote:

> Hey all
> 
> What recommendations would you have for an app to convert *.mp4 to
> either *.mp3 or *.ogg?
> 
> Thanks for any suggestions.
> 
> AG
> 

I used a script like this (I just rewrote it from the top of my head, so 
this one is untested):

EXT="mp4"
DEST="/home/michael/music"

for F in *.${EXT}; do
    N=${F/$EXT/wav}
    mplayer -vc dummy -vo null -ao pcm -aofile "${DEST}/${N}" "$F"
    normalize "${DEST}/${N}"
    lame --verbose -q 2 --abr 192 "${DEST}/${N}" "${DEST}/${F/$EXT/mp3}"
done

The catch with this over-engineered and occasionally inefficient script was 
that I would use it for both random audio formats and video files to extract 
the audio track (think presentation-to-podcast-like conversion).

-- 
 Michael Iatrou


Reply to: