  In this paper, we determine a constant occurring in a local analogue of the
Siegel-Weil formula, and describe the behavior of the formal degrees under the
local theta correspondence for quaternionic dual pairs of almost equal rank
over a non-Archimedean local field of characteristic $0$. As an application, we
prove the formal degree conjecture of Hiraga-Ichino-Ikeda for the non-split
inner forms of ${\rm Sp}_4$ and ${\rm GSp}_4$.
