modified video_svm; code refactoring