I've 2 smart TVs that play virtually everything but can't handle Divx encoded AVI files, but are happy with Xvid encoded ones.

As the title asks how can I code a PRF to enable transcoding to take place for Divx files but just stream Xvid ones?