accept video/*
fix some bugs and cleanup