Text this: Effective Video Encoding in Lossless and Near-lossless Modes