specify stream input format and detect errors

making ffmpeg guess the input stream format is time consuming and somethings it gets it wrong.

also if (bizarrely) the input stream has an error, this needs to be handled -