ffmpeg - Decoding - Extract a separate Video file and separate Audio file

Extract an audio only and then a video only copy from the input

ffmpeg -i inputfile.mkv -map 0:1 audio.mp3 -map 0:0 video.mp4

NOTE: -map: just replaces Stream #.

  • Stream 0:0 is the video stream.
  • Stream 0:1 is the audio stream.