perl video encoding