I have made a command for a bot of mine where it will take a screenshot of the stream and send this to Discord.
However, when trying on different channels, I see that in some channels it doesn’t work as intended, but instead I see a “Preparing your stream” Twitch generated image. (Using twitch-m3u8 to get the m3u8 source and then ffmpeg to capture the frame)
The only supported way to access the Twitch stream is through the Twitch Player (such as on Twitch itself, an embed, or through one of the Twitch apps). You’re trying to access the stream through unsupported methods, and as such are getting unexpected results, and likely wont get any help or support here as you’re doing something you shouldn’t be doing.
A more appropriate way would be to take a screenshot from the source itself, such as OBS on the broadcasters machine capturing the frame and relaying that back to your app.