A recursive script to encode media. Written in python