Question about how Twitch works

Does twitch just send screenshots every millisecond to it’s client to show the game data? I’d like to know how the streaming system works… the screenshot method is my only guess

twitch sends FLash Video

Is there a way to accept clicks from the flash stream on the client side?

what exactly do you mean?

If there is a way to send commands from the streaming flash page to the game? I wanna make an app that I can use to play my PC video games on my iPhone by streaming the game and desktop and hacking the buttons to adjusting to the iPhone

any idea? otherwise…ill use my screenshot per millisecond strategy=

Its possible, but not with Twitch. You need low latency (encoding + transport). You can use FFmpeg + x264 with zerolatency tune for encoding. Nginx for own rtmp serwer. You may use diffrent protocol than rtmp and then you can also use low latency audio codec like Opus (similiar to codec used by Skype). On iphone you can connect and watch it. These is just for watching, for inputs there is another work. I think its just too hard for beginners, but not so hard if you get some skills. Another question is if delay wouldnt be too high. 500 ms delay or lower should be possible.

Here is nice read about latency in x264 made by dev of x264