P.S I’ve enever used XD. So I can’t help you out there, but it seems like a very bare-bones torrent client. qbittorrent recently added support for it but if you’re running a headless server, XD doesn’t seem like a bad option. Github says it has no DHT support? Not sure if that’s the best option, but good luck with it.
Correct. To be fair both XD and qBittorrent don't support DHT over I2P so they're kind of on the same level there. I think (?) neither support PEX over I2P either though I'm not 100% sure on XD about that.
https://github.com/qbittorrent/qBittorrent/issues/19913
I don't think it's possible, or at least not in the way you're thinking. Encoding a video with lossless flags usually results in a file size bigger or about the same as the source, and on top of that it takes a long time to actually do the encode.
Video is already highly compressed.
But for sure you can tinker around with ffmpeg (FOSS) & see how it goes for you. I've done it in the past just for kicks since some of the common video codec encoders do have lossless flags but it really wasn't worth the effort.
EDIT: That's just the video in the file, you also have to contend with the audio. That's a bit easier if you just want to use ffmpeg to dump everything into FLAC but again, I don't think you're saving much hard drive space if any.