modify code to read from file avi and added a programm to record from webcam