Does anyone have script to convert XYZ file to XTD file?

Hi All,

Does anyone have a script to convert XYZ file to XTD file?

I have XDATCAR file from VASP, I want to make a movie clip from geometry optimization.

Thanks.