Create temporary directories closed to when needed
Move final muxing to a separate file
Move encoding include files to match stage names