[FFmpeg-user] libx264 keyframes ?

TobiasP tobias_petry at hotmail.com
Thu Apr 28 20:42:50 CEST 2011


Hi,
i have got an m2ts h264 fullhd camera video with the only keyframe at frame
1, and want to cut hundreds of small parts of this video.

For fast time completion i first transcode a small chunk (skipping video to
some point, transcoding a few seconds with keyframes every full second):
ffmpeg -ss 300 -i video.m2ts -r 25 -g 25 -t 15 -b 750k -s 480x352 -vpre
libx264-medium -acodec copy -threads 0 -y video_part1_tmp.mp4


The problem now is, that the first keyframe in video_part1_tmp.mp4 is not at
frame 1 and then every full second - as i excepted and a 2 years old built
did.
Did i make anything wrong or is there any special trick to accomplish having
frames 1, 26, 51, ... as keyframe for correct cutting?
At the moment the keyframes are at position 17 + i * 25

Tobias

--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/libx264-keyframes-tp3481848p3481848.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list