[FFmpeg-user] Altering motion vectors in B- and P- frames

Mark Filipak markfilipak.imdb at gmail.com
Sun May 26 21:32:15 EEST 2024


On 26/05/2024 14.18, Bart Westenenk wrote:
> Hello all,
> 
> I want to alter the motion vectors of B and P frames in a H.264 video. The point of doing this is 
> watermarking / steganography, the goal is to change the motion vectors' width / height based on the 
> watermark.

Motion vectors don't work like you're visualizing, Bart. Motion vectors move macroblocks measuring 
16x16 pixels from a reference picture to the current picture, then apply individual pixel 
corrections to finish the destination picture's macroblock. It's more complex than that because the 
destination macroblock will not be on macroblock boundaries, so the moved macroblock needs to be 
merged into the destination's macroblock geometry.

Your plan to somehow use motion vectors to watermark is not feasible.



More information about the ffmpeg-user mailing list