You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Andrew Kilgore <an...@gmail.com> on 2023/06/05 17:06:55 UTC

guacenc: Optimizing file size for periods of inactivity

Hi all,

As a test, I have a recording of an RDP session which, after initially
connecting to and displaying the remote display, remains inactive (no
further display updates or user input) for approximately 1 minute. The file
size of this recording is ~880K.

However, when I encode this session recording to m4v using guacenc (at 50%
width/height of the original recording) the size of the outputted m4v file
is ~12MB. This is almost 14x the size of the original recording.

I had speculated that this was possibly due to guacenc writing a frame on
every "sync" but even after updating guacenc to ignore a sync if there have
been no updates to the display the size of the outputted m4v file
remains the same (~12MB).

I don't really know too much about video encoding so am reaching out in the
hope that someone can suggest what might be happening and how I could
possibly alter the behavior of guacenc to "optimize" the file size of the
outputted file for such periods of inactivity in the session recording.

Thanks in advance,
Andrew.

Re: guacenc: Optimizing file size for periods of inactivity

Posted by Michael Jumper <mj...@apache.org>.
On 6/5/23 11:06, Andrew Kilgore wrote:
> Thanks Mike, will definitely check this out. I've been working on 1.3.0 
> so missed the addition of this.
> 
> I'm assuming that the playback is performed in a memory-efficient manner 
> ...

Yes, all temporary data is stored using Blobs and data within 
auto-generated keyframes is compressed using PNG.

> ... and doesn't require the entire recording to be loaded prior to playback 
> (as, if I recall correctly, was previously the case for the sample 
> in-browser player)
No, it needs to at least fully download the recording and perform basic 
processing (enumeration of frames). You can cancel that process if you 
want to stop retrieving the recording and just play back what has been 
downloaded so far.

If you seek forward beyond where the player has already played back, the 
player will need to take some time to reconstruct the intermediate 
frames. You can cancel that process, too, and play back from wherever 
the player has reached.

- Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: guacenc: Optimizing file size for periods of inactivity

Posted by Andrew Kilgore <an...@gmail.com>.
Thanks Mike, will definitely check this out. I've been working on 1.3.0 so
missed the addition of this.

I'm assuming that the playback is performed in a memory-efficient manner
and doesn't require the entire recording to be loaded prior to playback
(as, if I recall correctly, was previously the case for the sample
in-browser player)?

Thanks again,
Andrew.

On Mon, 5 Jun 2023 at 18:35, Michael Jumper <mj...@apache.org> wrote:

> On 6/5/23 10:06, Andrew Kilgore wrote:
> > Hi all,
> >
> > As a test, I have a recording of an RDP session which, after initially
> > connecting to and displaying the remote display, remains inactive (no
> > further display updates or user input) for approximately 1 minute. The
> > file size of this recording is ~880K.
> >
> > However, when I encode this session recording to m4v using guacenc (at
> > 50% width/height of the original recording) the size of the outputted
> > m4v file is ~12MB. This is almost 14x the size of the original recording.
> >
> > I had speculated that this was possibly due to guacenc writing a frame
> > on every "sync" but even after updating guacenc to ignore a sync if
> > there have been no updates to the display the size of the outputted m4v
> > file remains the same (~12MB).
> >
> > I don't really know too much about video encoding so am reaching out in
> > the hope that someone can suggest what might be happening and how I
> > could possibly alter the behavior of guacenc to "optimize" the file size
> > of the outputted file for such periods of inactivity in the session
> > recording.
>
> Unless the video format allows for variable frame durations, it's not
> going to be able to match up with the space efficiency of Guacamole's
> recordings (which do). To my knowledge, there is no video format
> available to guacenc that would allow the output video to be as
> efficiently encoded as the original Guacamole recording in that respect.
>
> The Guacamole web application now supports directly playing back
> recordings in-browser. I'd recommend using that instead, and leveraging
> "guacenc" only for the cases where you truly need to share a video.
>
> See: https://guacamole.apache.org/doc/gug/recording-playback.html
>
> - Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
> For additional commands, e-mail: user-help@guacamole.apache.org
>
>

Re: guacenc: Optimizing file size for periods of inactivity

Posted by Michael Jumper <mj...@apache.org>.
On 6/5/23 10:06, Andrew Kilgore wrote:
> Hi all,
> 
> As a test, I have a recording of an RDP session which, after initially 
> connecting to and displaying the remote display, remains inactive (no 
> further display updates or user input) for approximately 1 minute. The 
> file size of this recording is ~880K.
> 
> However, when I encode this session recording to m4v using guacenc (at 
> 50% width/height of the original recording) the size of the outputted 
> m4v file is ~12MB. This is almost 14x the size of the original recording.
> 
> I had speculated that this was possibly due to guacenc writing a frame 
> on every "sync" but even after updating guacenc to ignore a sync if 
> there have been no updates to the display the size of the outputted m4v 
> file remains the same (~12MB).
> 
> I don't really know too much about video encoding so am reaching out in 
> the hope that someone can suggest what might be happening and how I 
> could possibly alter the behavior of guacenc to "optimize" the file size 
> of the outputted file for such periods of inactivity in the session 
> recording.

Unless the video format allows for variable frame durations, it's not 
going to be able to match up with the space efficiency of Guacamole's 
recordings (which do). To my knowledge, there is no video format 
available to guacenc that would allow the output video to be as 
efficiently encoded as the original Guacamole recording in that respect.

The Guacamole web application now supports directly playing back 
recordings in-browser. I'd recommend using that instead, and leveraging 
"guacenc" only for the cases where you truly need to share a video.

See: https://guacamole.apache.org/doc/gug/recording-playback.html

- Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org