[Libav-user] use video codec to stream slides?

Shi Yan billconan at gmail.com
Tue Mar 26 06:53:01 CET 2013


hello there,

I'm prototyping an idea of streaming slides (like powerpoint slides.).

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.

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.

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.

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?

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?

How does a video codec decide which frame is the key frame? when the
content is static, can I always stream key frames?


Also, is it easy to change the frame resolution dynamically?

for example, I start the video in 1080p, but while I'm streaming it, the
stream video resolution changes to 800*600?


Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130325/a3c52ae1/attachment.html>


More information about the Libav-user mailing list