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?

Regards

Zeeshan

link|improve this question
feedback

migrated from stackoverflow.com May 20 '11 at 5:46

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 1 down vote accepted

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:

link|improve this answer
feedback

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

link|improve this answer
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
feedback

Your Answer

 
or
required, but never shown

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