guacamole-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Jumper (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GUACAMOLE-110) Guacenc framerate rounding results in incorrect video length
Date Tue, 04 Oct 2016 03:56:21 GMT

    [ https://issues.apache.org/jira/browse/GUACAMOLE-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15544255#comment-15544255
] 

Michael Jumper commented on GUACAMOLE-110:
------------------------------------------

Thanks, Roman. I've [merged this to master|https://git-wip-us.apache.org/repos/asf?p=incubator-guacamole-server.git;a=commit;h=3c459100d7d957a850fc4f6e92a4da417bc3be4a],
but the GitHub mirror is not updating for some reason. I've opened an issue with Infra to
hopefully figure out what's going on: INFRA-12699.

> Guacenc framerate rounding results in incorrect video length
> ------------------------------------------------------------
>
>                 Key: GUACAMOLE-110
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-110
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole-server
>            Reporter: Roman
>            Assignee: Michael Jumper
>             Fix For: 0.9.10-incubating
>
>
> guacenc produces video shorter than the actual length (based on the timestamps in the
input file). In one of my tests: 16s vs 22s. This is caused by timestamp deltas being rounded
to frames in guacenc_video_advance_timeline.
> Sample patch:
> {code:none}
> @@ -209,6 +209,8 @@
>  int guacenc_video_advance_timeline(guacenc_video* video,
>          guac_timestamp timestamp) {
>  
> +    guac_timestamp next_timestamp = timestamp;
> +
>      /* Flush frames as necessary if previously updated */
>      if (video->last_timestamp != 0) {
>  
> @@ -219,6 +221,10 @@
>          /* Keep previous timestamp if insufficient time has elapsed */
>          if (elapsed == 0)
>              return 0;
> +
> +        /* Use frame time, not the current timestamp for last_timestamp */
> +        next_timestamp = video->last_timestamp
> +                       + elapsed * 1000 / GUACENC_VIDEO_FRAMERATE;
>  
>          /* Flush frames to bring timeline in sync, duplicating if necessary */
>          do {
> @@ -228,7 +234,7 @@
>      }
>  
>      /* Update timestamp */
> -    video->last_timestamp = timestamp;
> +    video->last_timestamp = next_timestamp;
>      return 0;
>  
>  }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message