vid capture - new working code