ffmpegquicktime

How to extract audio in ffmpeg from mov file


I have a ProRes422 file with a .mov container: FINAL.mov. I would like to save out the audio track to a new file (no encoding or anything, just save it out). In QuickTime there is an option to save "Audio Only" --

enter image description here

What would be the equivalent way to do this within ffmpeg ? From basic research it seems something along the lines of:

$ ffmpeg \
    -i FINAL.mov \
    -vn # remove video? \
    ?? # keep audio \ 
    MYAUDIO_FINAL.mov

$ ffmpeg -i gives:

Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'FINAL.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2016-01-11T19:23:10.000000Z
    com.apple.finalcutstudio.media.uuid: CE6F1278-8982-4B98-9E46-AE7C329436EF
    com.apple.quicktime.player.movie.audio.gain: 1.000000
    com.apple.quicktime.player.movie.audio.treble: 0.000000
    com.apple.quicktime.player.movie.audio.bass: 0.000000
    com.apple.quicktime.player.movie.audio.balance: 0.000000
    com.apple.quicktime.player.movie.audio.pitchshift: 0.000000
    com.apple.quicktime.player.movie.audio.mute:
    com.apple.quicktime.player.movie.visual.brightness: 0.000000
    com.apple.quicktime.player.movie.visual.color: 1.000000
    com.apple.quicktime.player.movie.visual.tint: 0.000000
    com.apple.quicktime.player.movie.visual.contrast: 1.000000
    com.apple.quicktime.player.version: 7.6.6 (7.6.6)
    com.apple.quicktime.version: 7.7.3 (2826.24) 0x7738000 (Mac OS X, 10.9.5, 13F34)
  Duration: 00:01:59.58, start: 0.000000, bitrate: 154872 kb/s
    Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 1920x1080, 153307 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 23976 tbn, 23976 tbc (default)
    Metadata:
      creation_time   : 2016-01-11T19:23:10.000000Z
      handler_name    : Apple Alias Data Handler
      encoder         : Apple ProRes 422 (HQ)
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2016-01-11T19:23:10.000000Z
      handler_name    : Apple Alias Data Handler

And a second file with 8 channel audio:

  Duration: 01:10:12.00, start: 0.000000, bitrate: 173231 kb/s
    Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 1920x1080, 164007 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default)
    Metadata:
      handler_name    : Apple Alias Data Handler
      encoder         : Apple ProRes 422 (HQ)
    Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (FL), s32 (24 bit), 1152 kb/s (default)
    Metadata:
      handler_name    : Apple Alias Data Handler
    Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (FR), s32 (24 bit), 1152 kb/s (default)
    Metadata:
      handler_name    : Apple Alias Data Handler
    Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
    Metadata:
      handler_name    : Apple Alias Data Handler
    Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (LFE), s32 (24 bit), 1152 kb/s (default)
    Metadata:
      handler_name    : Apple Alias Data Handler
    Stream #0:5(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (BL), s32 (24 bit), 1152 kb/s (default)
    Metadata:
      handler_name    : Apple Alias Data Handler
    Stream #0:6(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (BR), s32 (24 bit), 1152 kb/s (default)
    Metadata:
      handler_name    : Apple Alias Data Handler
    Stream #0:7(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (DL), s32 (24 bit), 1152 kb/s (default)
    Metadata:
      handler_name    : Apple Alias Data Handler
    Stream #0:8(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (DR), s32 (24 bit), 1152 kb/s (default)
    Metadata:
      handler_name    : Apple Alias Data Handler
At least one output file must be specified

Solution

  • ffmpeg -i input.mov -map 0:a -c copy output.mov