Hi Adrian,

Is this something you'd be interested in working on? I've worked a bit on
guacenc myself, so I can give you some information that I've found from
working on it.

I'm not confident that you need to think about keyframes much at all from
the perspective of guacenc. From my understanding (and I welcome anyone who
might differ from my understanding or explanation here to jump in), since
the Guacamole Protocol attempts to only send changes, guacenc renders a new
image in memory for each new instruction in the recording file, based on
the previously rendered image. Each new image is just a mutation of the
previous, but itself is a full image. These images are sent to libavcodec
on a periodic that matches the target framerate. This is done because the
guacamole protocol doesn't have a framerate, so to square the circle of
converting to a video with a time base, guacenc holds the image in memory
so that it can repeat sending unchanged frames to libavcodec if no
guacamole protocol instructions mutated the in-memory image. This
implicitly means that each image guacenc sends can be a keyframe, so you
could potentially start the encoding at any frame you'd like.

I'd recommend you look at the logic of video.c
<https://github.com/apache/guacamole-server/blob/master/src/guacenc/video.c>
in the guacenc source to get a better idea about how this process works.

Sean

On Sun, Mar 15, 2020 at 5:17 PM Adrian Owen <[email protected]> wrote:

> Hi Sean,
>
>
> Thanks!
>
>
> I believe that Keyframes are written to video stream, done as work for the
> Player.
>
>
> So I guess it would be StartKeyFrame    EndKeyFrame.
>
>
> It would have to start at StartKeyFrame and run 'n' keyframes and stop.
>
>
> So its a matter of scanning the video stream file for keyframes.
>
>
> That is challenging. I am a C programmer, but know not how to identify a
> keyframe while reading the stream.
>
>
>
>
> Adrian
>
>
>
> ------------------------------
> *From:* Sean Reid <[email protected]>
> *Sent:* 15 March 2020 20:02
> *To:* [email protected]
> *Subject:* Re: guacenc new parameters
>
> Hi Adrian,
>
> I don't see a reason that this wouldn't be possible. I think it would be
> done by guacenc, though, not by ffmpeg. I'd think that guacenc just
> wouldn't start sending the frames to be encoded until, while reading the
> input file, guacenc has reached the start time and stop sending frames to
> be encoded at end time.
>
> Sean
>
> On Sun, Mar 15, 2020 at 1:55 PM Adrian Owen <[email protected]> wrote:
>
>> Hi,
>>
>> ffmpeg allows getting a section of a video file by specifying start
>> seconds and end seconds,
>>
>> Now the Guacamole video steam may not know seconds but:
>>
>> Could Guacenc support  extra parameters: StartPoint Endpoint?
>>
>> And then only generate MV4 between those points.
>>
>>
>> This is a theoretical question,
>>
>>
>> Many thanks, Adrian
>>
>>

Reply via email to