Artifacts in recording when VLC restarts in preparation time
The situation here is that we have a lot of short clips that are streamed by VLC. Once the clip is finished, VLC starts again. This causes a Continuity error.
So tvheadend starts its preparation 30s before the actual recording. If this clip restart happens within this 30s time period, the remainder of clip will be full of artifacts. Once VLC restarts, the recording restores itself and plays fine from then onwards.
A solution for this is to decrease the 30s timer to 2s (chance that restart falls in this 2s, is much smaller), but I can imagine that it is there for a reason. It is not a big deal, as I can adapt the timer myself.
I have attached a good recording (restart falls outside this period) and a bad one (falls in this period)