There's definitely something wrong. You should see the output "Stream xxxx ended" in the file. It seems as if the CODEC does not trigger a start and end event. I'll have to contemplate this further. Inbetween I strongly suggest to use a different video format.