[FFmpeg-user] live transcoding alignment

Claudiu Rad jazzman at misalpina.net
Mon Jul 28 09:38:31 CEST 2014

hello all,

using ffmpeg i want to live transcode an input live stream into multiple 
variants and push all of them (including the original) to the client. 
everything works all right except for one thing: i want all keyframes to 
be properly aligned between streams but it seems that over time, they 
get misaligned which is probably as expected because it would make sense 
for ffmpeg to treat each output and do its keyframe generation quite 
independently. however, the first question:

1. how can i enforce keyframe alignment between output transcoded 
(reencoded) streams in ffmpeg? i don't need P/B or other frame types to 
be aligned, but I-frames should be exactly on the same frame numbers on 
all streams

to extend this even further:

2. how can i enforce keyframe alignment also with input which i would 
like to simply -c copy ? this means that reencoded outputs should have 
the exactly same keyframe placements as the input, thus, internal codec 
heuristics should be disabled on this matter.

i am talking about a h264/x264 input/output.

thanks much.


More information about the ffmpeg-user mailing list