After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744642 - Screen recorder timestamps buffers incorrectly, breaking A/V sync
Screen recorder timestamps buffers incorrectly, breaking A/V sync
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-02-17 08:39 UTC by Sebastian Dröge (slomo)
Modified: 2015-02-19 08:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-shell-recorder-Timestamp-buffers-from-the-pipeline-c.patch (4.04 KB, patch)
2015-02-17 08:39 UTC, Sebastian Dröge (slomo)
committed Details | Review
Example app to test audio sync (1.60 KB, application/javascript)
2015-02-17 08:41 UTC, Alexander Larsson
  Details

Description Sebastian Dröge (slomo) 2015-02-17 08:39:07 UTC
Created attachment 296988 [details] [review]
0001-shell-recorder-Timestamp-buffers-from-the-pipeline-c.patch

Currently the screen recorder puts wrong timestamps on buffers. It just uses the wall clock, while it should use the pipeline clock as it's even written in one of the comments there.

This causes e.g. A/V sync to be completely off if you add an audio branch to the pipeline as alexl noticed.

Attached patch fixes that.
Comment 1 Alexander Larsson 2015-02-17 08:41:25 UTC
Created attachment 296989 [details]
Example app to test audio sync

Here is a small gjs app that uses the screencast dbus API to record audio+video together. Without the patch the audio is off by ~2 sec for me.
Comment 2 drago01 2015-02-18 22:14:19 UTC
Review of attachment 296988 [details] [review]:

Make sense.
Comment 3 Sebastian Dröge (slomo) 2015-02-19 08:20:18 UTC
Ok, thanks! Pushed the commit :)

commit c4a775e94a8f4c22bca85289e37ee468916bde40
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Feb 17 10:16:44 2015 +0200

    shell-recorder: Timestamp buffers from the pipeline clock, not the wall clock
    
    This should give more accurate timestamps on the video buffers, and especially
    keep A/V sync when audio is also recorded.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744642