Adds support for PGM writing on videos.