adding option to reopen a stream on EOF and adding a videofile example