Import from https://code.google.com/p/ltpv/