<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">hello there,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I'm prototyping an idea of streaming slides (like powerpoint slides.).</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">The content of a slide is almost static. Once in a few seconds, the presenter can flip the slide to the next one. There could be some animation in a slide, or there could be transition animation between two slides.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">because I'm not familiar with video codec and the content is mostly static, my first prototype is actually based on png image. Whenever the slides have changed, I capture the current frame, compress it as a png image, and send it to the client via tcp.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">It works mostly ok, but I could notice some latency when animation happens. I suspect that the png frame is too large. I want to use a video codec to reduce latency. But I have some questions.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I looked at the avcodec document as well as the vp8 document. It seems to me that, when I call the encoding function to encode a frame, I can't guarantee to get the encoded result immediately. the codec function can delay the generation of a frame. I don't understand what triggers (flush) frame generation.  Does decoding the next frame trigger the generation of the previous frame?</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">In my case, since the content is static, I don't need to call the encode function very often. only when the frame changes. Will that cause frame losing?</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">How does a video codec decide which frame is the key frame? when the content is static, can I always stream key frames?</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Also, is it easy to change the frame resolution dynamically?</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">for example, I start the video in 1080p, but while I'm streaming it, the stream video resolution changes to 800*600?</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Thanks,</div><div class="" style="margin:2px 0px 0px;font-family:arial,sans-serif;font-size:13px">
</div></div>