Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Compression Techniques FFMPEG Audio Encoding

  • FFMPEG Audio Encoding

    Posted by James Zeng on July 19, 2012 at 9:02 am

    Hi, how do you extract a audio file from a video but also specifying the codec: such as -acodec aac or such.

    I’ve tried to encode audio too, however, all that occurs is an error saying operation not supported. Please help.

    Stephen Dixon replied 13 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Stephen Dixon

    July 19, 2012 at 12:42 pm

    ffmpeg -i inputfile.ext -vn -acodec codecname outputfile.ext

    -vn just means no video.

    You’ve got to make sure you output format (specified by ext) matches your codec, so if you’re saving with aac you’ll need to save as outputfile.aac or if you’re using WAV you might want pcm_s16be or so on.

    The aac codec is not a good one to use. Are you getting messages that tell you to use “-strict experimental” if you want to use it? You could compile with libfaac support (you can see if it’s already supported by doing ffmpeg -version and seeing if it comes up), or you can use libaacplus.

    If that doesn’t work, post the commands your using and the results you get.

    Stephen Dixon
    Editor, Animator, Motionographer
    Museum Victoria

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy