Honestly, you’re probably better off just downloading the whole VOD from Twitch and then using FFmpeg to splace as needed.
There’s not an easy way to download VODs, as Twitch intentionally obfuscates it I think. You need to hit an endpoint to get a token which is then used to hit another endpoint to get the raw file url.
Starting with this: https://api.twitch.tv/api/vods/221111315/access_token
Where 221111315 is the VOD id. Using the returned token and sig, you can access the raw video file, but I forgot the endpoint for that.