new processing code for videos