Render to cubemap - view transform?

I have a matrix (actually a series of matrices exported as a camera path from some 3d software) and I want to render a cubemap of a 3d vvvv scene, using this matrix to pose the view.

As the view transform doesn’t affect the rendering of a cubemap, to change the view I usually translate using the ‘source position’ of the dx9 texture, and rotate using a post process on the cubemap texture.

To get these values in this case I tried decomposing the above matrix. The translation values are correct, which I can use with source position, but the rotation regularly flips on a couple of the axis, I guess because there is not always a direct xyz rotation value for a given matrix transform?

I’ve tried decompose (quaternion) and have the same problem

Is there a way to either use the original matrix to transform the view, or a better way to extract the rotation without axis flipping?

cheers