[FFmpeg-user] Re-encode single frame

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Dec 20 10:23:43 CET 2013


Roelof van Wyk <RWyk <at> irdeto.com> writes:

> 1.       Decode a H264 stream and identify a certain B 
> frame/picture
> 
> 2.       Perform some modifications to the frame
> 
> 3.       Re-encode _only_ that frame and insert back into the 
> original stream, without any modifications to the surrounding 
> frames. I do not want to re-encode the entire stream
> 
> So if the input GOP is IBBPBBPBBP..., the output GOP must be 
> IBBPB'PBBP...

Please do not cross-post, this is (always) considered rude.

The FFmpeg API certainly allows you to extract NAL's from H264 
streams (and it obviously allows to write them in an output 
stream) but I wouldn't be surprised if you have to make 
major changes to libx264 to allow inserting a frame into an 
existing unchanged stream.
Note that B-frames are allowed to be reference frames, for 
such cases what you want is impossible afaict.

Carl Eugen



More information about the ffmpeg-user mailing list