I use ffmpeg to convert my files, but when I do so, I lose the keyframes metadata from my flv files.

The command I use right now is:

$/usr/local/bin/ffmpeg -i %s -ab 96k -ar 44100 -b 500k -r 25 -f flv %s

How can I avoid ffmpeg to delete the keyframes info?




Even though the metadata can be lost during any conversion step, it is always possible to regenerate them later.

There are a few tools that can be used to regenerate keyframe informations, including:


Try adding the following argument:

-map_meta_data 0:0

This should copy the metadata of the first stream of the input file to the first stream of the output file. More information can be found here: http://ffmpeg.org/ffmpeg-doc.html#SEC12

  • Did not work, this is how my command looks after adding the argument you told me: '/usr/local/bin/ffmpeg -i %s -map_meta_data 0:0 -ab 96k -ar 44100 -b 500k -r 25 -f flv %s' – Zeeshan Rang May 19 '11 at 21:31
  • Is this correct? I am sorry, I am new to linux. – Zeeshan Rang May 19 '11 at 21:32
  • You might need to look at the documentation there to see if the option I showed needs to be modified for the video you are using. – Justin Pearce May 20 '11 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.