Just an opinion here, but I don't think that it should be necessary to defrag every time you do the coversion. Obviously, it's fixing your issue with shutting down the computer, but I think it stems from something else. Can you delete the large video file off the computer BEFORE attempting to shut down the computer? Does that help?

Have you updated the graphics drivers on your computer to the most current? Drivers can cause shutdown conflicts.

When creating and converting the large files, do you shut down all other unnecessary programs and services, such as antivirus, firewall, etc?

If you allow it to shut off normally, but slowly, after creating the files, then restart the machine, does it shut down correctly from then on? If so, it may be the large swap file use because of insufficient RAM. If you only have 512 MB of RAM, I suggest you add as much as you can, probably the maximum would be best.

Hope this helps.