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

Re: mp4 video file to mp3 audio file



ronggui wong:
> I have some MTV in *.mp4 format, and I would to convert them to mp3
> format. What software should I use?
> I try ffmpeg using ffmpeg -i in.mp4 out.mp3, but it seems something
> goes wrong as I can not play the out.mp3 with audacious player.

Never tried it myself, but AFAIK it goes like this:

    ffmpeg -i in.mp4

A lot of information shows up.
Look at the lines that start with 'Stream' near the end, one for video,
one for audio.
If the 'Audio' stream mentions mp3, then use this command:

    ffmpeg -i in.mp4 -vn -acodec copy out.mp3

The -vn switch tells ffmpeg not to bother itself with the video.
'-acodec copy' means that the audio codec remains the same.

If the 'Audio' stream mentions something different from mp3, then this
would be the command to use:

    ffmpeg -i in.mp4 -vn -acodec libmp3lame out.mp3


Reply to: