Some caching and various changes

Not my changes
Add MP4 support

@crossborne