Sweeping the trail renderer to a mesh

I’ve looked around but haven’t found the solution to this issue yet. I’d like a script that generates a tube or rope like mesh from the trail renderer. This seems necessary for sending renders to octane or just using the HDRP with the trail renderer. If anyone could point me in the right direction I would appreciate it. I would need it to be fairly performant (900 trails). Could this be accomplished with a geometry shader?
Thanks in advance.

Like the sweep NURB in Cinema 4d.