[FFmpeg-user] Use force_key_frames to obtain keyframes at exactly the same positions as in the input stream?

Henk D. Schoneveld belcampo at zonnet.nl
Fri May 1 19:33:16 CEST 2015


> On 01 May 2015, at 13:06, Haris Zukanovic <haris.zukanovic74 at gmail.com> wrote:
> 
> Is the decision about exactly which frame to make an IDR frame made in x264 or ffmpeg?
In general I-frames are placed at scene-changes, this can happen random. Additionally you can can force an I-frame every arbitrary amount of frames by specifying the gop-size. The function of an I-frame is to hold max frame info P and B frames build on that complete I-frame. It doesn’t make sense from an encoding viewpoint to skip an I-frame at a scene-change, it’s just impossible.
Adding more than ‘a minimum amount’ of I-frames only makes sense for seeking purposes, at the cost of less compression/higher then necessary bitrate.
> Any pointer or advice on where to look for this in the code?
> 
> 
> On 4/29/15 8:54 PM, Anatol wrote:
>> No responses on that one?
>> It is very important issue.
>> 
>> On Mon, Apr 27, 2015 at 11:47 PM, Haris Zukanovic <
>> haris.zukanovic74 at gmail.com> wrote:
>> 
>>> Hello,
>>> Can I use force_key_frames in some way to produce keyframes (IDR, not
>>> I-frames) at exactly the same PTS in output streams as they are found in
>>> the live input stream? Both input and output are h264 and live streaming.
>>> 
>>> Something analogous to using 2 pass encoding for VOD and in the second
>>> pass keyframes are inserted exactly where they are recorded in the first
>>> pass... Is that something like that even theoretically doable for live
>>> streaming?
>>> 
>>> 
>>> 
>>> thanx
>>> 
>>> --
>>> --
>>> Haris Zukanovic
>>> 
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>> 
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> -- 
> --
> Haris Zukanovic
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list