FFMPEG How "smart join" h.264 (or h.265) clips without re-encoding?

Hi,
is it possible join some clips of h.264 (or h.265) without re-encoding, (or minumum re-encoding, only where clips touch themself?
Thanks!