Transcoding gives broken video with working audio

Seems the problem is 4:4:4 related. Here is another thread with my exact problem.