A Unified Framework for Video Summarization, Browsing & Retrieval: with Applications to Consumer and Surveillance Video