Rough implementation of new transcoding script

WIP