Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to extract attachments from an MKV file by following the documentation at

Direct quote from documentation:

To extract all attachments to files determined by the filename tag:  
ffmpeg -dump_attachment:t "" INPUT

The command I'm running on my computer is this:

ffmpeg -i test.mkv -dump_attachment:t "" INPUT

However I keep getting the following error:

[NULL @ 0x7f981182ae00] Unable to find a suitable output format for 'INPUT'
INPUT: Invalid argument

How can I extract attachments from my test.mkv file? Am I misunderstanding what INPUT is supposed to be?

I've tried:

ffmpeg -dump_attachment:t "" test.mkv 

and FFmpeg prompts me with this:

File 'test.mkv' already exists. Overwrite ? [y/N]. 

Entering y replaces test.mkv with a 0 byte file, and no attachments are extracted.

Additional Information:

I installed ffmpeg via brew using the following command:

brew install ffmpeg --with-freetype --with-libass --with-tools
share|improve this question
up vote 3 down vote accepted

The documentation was wrong. This bug has been fixed now. The examples were missing an -i flag to properly designate the input file:

ffmpeg -dump_attachment:t "" -i test.mkv

This worked for me in FFmpeg 1.1.2 and above. Note that FFmpeg will still complain about no output file being specified. Don't worry about this though: The attachments will still be extracted.

You can also extract attachments from MKV files with MKVToolNix. This set of programs can be easily downloaded from the website for all operating systems, or in OS X installed with brew install mkvtoolnix.

Look at the IDs of your attachments:

mkvmerge -i <mkv-file>

Then extract them:

mkvextract attachments <mkv-file> <attachment-id>:<file-name>

See the mkvextract documentation. If the <file-name> is empty, a name will be chosen automatically. You can also specify multiple pairs of <attachment-id>:<file-name>, of course.

share|improve this answer
Thanks! This works very nicely! – Derek Kwok Feb 23 '13 at 14:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .