[FFmpeg-user] How can I find the keyframe information for a mp4 video ?

catalin cacealma2000 at yahoo.com
Fri Feb 3 14:26:20 CET 2012

I have managed to get the info using -vstats_file stats.txt argument when
compiling a video and extract the data I'm interested in with awk

The problem is that no matter what value I use for -g the keyframes are
always the same

This is the encoding command I'm using:

ffmpeg -i input -s 320x240 -an -pass 1 -vcodec libx264 -vpre
medium_firstpass -b 300k -g 4 -threads 0 -y out_pass1.mp4 && ffmpeg -i input
-vstats_file stats.txt -pass 2 -vcodec libx264 -vpre medium -b 300k -g 4 -s
320x240 -threads 0 -acodec libfaac -ab 40k output_pass2

This is the keyframe sequence:

16 19 174 301 452 516 588 732 845 1005 1103 1195 1343 1417 1507 1726

I have also edited the preset files to suit my needs (g=25 keyint_min=10):

Any ideas ?

View this message in context: http://ffmpeg-users.933282.n4.nabble.com/How-can-I-find-the-keyframe-information-for-a-mp4-video-tp4349687p4354592.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.

More information about the ffmpeg-user mailing list