Some hacks for Python 3 compatibility and to work with SMPTE content.