Tag: MP4

  • How to Use FFmpeg to Extract Audio from Video File Without Re-encoding

    Try -c copy:

    $ ffmpeg -i video.mp4 -c copy audio.aac
    

    How ever you have to know the original audio format to extract audio without re-encoding, for example:

    $ ffmpeg -i video.mp4
    ...
      Metadata:
        major_brand     : isom
        minor_version   : 1
        compatible_brands: isomavc1
        creation_time   : 2015-01-17 20:39:33
      Duration: 00:23:59.94, start: 0.000000, bitrate: 1983 kb/s
        Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 1787 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
        Metadata:
          creation_time   : 2015-01-17 20:39:33
          handler_name    : 264:[email protected]
        Stream #0:1(jpn): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s (default)
        Metadata:
          creation_time   : 2015-01-17 15:55:11
          handler_name    : Sound Media Handler
    ...
    

    Then you should know what format and which track to extract.