Same-codec re-muxes (e.g. M4V → WebM where both can hold H.264) produce nearly-identical sizes. Codec changes can swing it dramatically: H.264 → VP9/AV1 typically cuts the file 30-50% at the same visual quality; H.264 → H.265 roughly halves it; VP9 → H.264 grows it.