For every bivariate polynomial $$p(z_1, z_2)$$p(z1,z2) of bidegree $$(n_1, n_2)$$(n1,n2), with $$p(0,0)=1$$p(0,0)=1, which has no zeros in the open unit bidisk, we construct a determinantal representation of the form $$\begin{aligned} p(z_1,z_2)=\det (I - K Z ), \end{aligned}$$p(z1,z2)=det(I-KZ),where $$Z$$Z is an $$(n_1+n_2)\times (n_1+n_2)$$(n1+n2)×(n1+n2) diagonal matrix with coordinate variables $$z_1$$z1, $$z_2$$z2 on the diagonal and $$K$$K is a contraction. We show that $$K$$K may be chosen to be unitary if and only if $$p$$p is a (unimodular) constant multiple of its reverse. Furthermore, for every bivariate real-zero polynomial $$p(x_1, x_2),$$p(x1,x2), with $$p(0,0)=1$$p(0,0)=1, we provide a construction to build a representation of the form $$\begin{aligned} p(x_1,x_2)=\det (I+x_1A_1+x_2A_2), \end{aligned}$$p(x1,x2)=det(I+x1A1+x2A2),where $$A_1$$A1 and $$A_2$$A2 are Hermitian matrices of size equal to the degree of $$p$$p. A key component of both constructions is a stable factorization of a positive semidefinite matrix-valued polynomial in one variable, either on the circle (trigonometric polynomial) or on the real line (algebraic polynomial).