divx an xvid are codecs, if you're talking about a downloaded movie being encoded with divx and it's in .avi or mp4 format, then your blu-ray player will play them as they are...so u just need to burn it to a disc like you would a music cd.
if your movie isn't in divx and you're asking how to make it divx, you can't...it needs to be encoded with the codec. so you would have to re-encode the movie and add the divx codec. and encoding is more complicated than it sounds, and takes a good amount of time