From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail.toke.dk; spf=pass (mailfrom) smtp.mailfrom=irif.fr (client-ip=2001:660:3301:8000::1:2; helo=korolev.univ-paris7.fr; envelope-from=jch@irif.fr; receiver=) Received: from korolev.univ-paris7.fr (korolev.univ-paris7.fr [IPv6:2001:660:3301:8000::1:2]) by mail.toke.dk (Postfix) with ESMTPS id E864495A076 for ; Sun, 17 Apr 2022 22:08:09 +0200 (CEST) Received: from mailhub.math.univ-paris-diderot.fr (mailhub.math.univ-paris-diderot.fr [81.194.30.253]) by korolev.univ-paris7.fr (8.14.4/8.14.4/relay1/82085) with ESMTP id 23HK897w006868 for ; Sun, 17 Apr 2022 22:08:09 +0200 Received: from mailhub.math.univ-paris-diderot.fr (localhost [127.0.0.1]) by mailhub.math.univ-paris-diderot.fr (Postfix) with ESMTP id 25B33227F5 for ; Sun, 17 Apr 2022 22:08:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at math.univ-paris-diderot.fr Received: from mailhub.math.univ-paris-diderot.fr ([127.0.0.1]) by mailhub.math.univ-paris-diderot.fr (mailhub.math.univ-paris-diderot.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id rKgSZ4eEi53v for ; Sun, 17 Apr 2022 22:08:07 +0200 (CEST) Received: from pirx.irif.fr (unknown [78.194.40.74]) (Authenticated sender: jch) by mailhub.math.univ-paris-diderot.fr (Postfix) with ESMTPSA id 91E6E227F0 for ; Sun, 17 Apr 2022 22:08:07 +0200 (CEST) Date: Sun, 17 Apr 2022 22:08:07 +0200 Message-ID: <87k0bnfp7c.wl-jch@irif.fr> From: Juliusz Chroboczek To: galene@lists.galene.org User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.1 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (korolev.univ-paris7.fr [194.254.61.138]); Sun, 17 Apr 2022 22:08:09 +0200 (CEST) X-Miltered: at korolev with ID 625C73A9.001 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 625C73A9.001 from mailhub.math.univ-paris-diderot.fr/mailhub.math.univ-paris-diderot.fr/null/mailhub.math.univ-paris-diderot.fr/ X-j-chkmail-Score: MSGID : 625C73A9.001 on korolev.univ-paris7.fr : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-j-chkmail-Status: Ham Message-ID-Hash: 2UVPJJ6QMMX436HFK74XOVRZPP32S3E6 X-Message-ID-Hash: 2UVPJJ6QMMX436HFK74XOVRZPP32S3E6 X-MailFrom: jch@irif.fr X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.5 Precedence: list Subject: [Galene] Saving to disk reworked again List-Id: =?utf-8?q?Gal=C3=A8ne_videoconferencing_server_discussion_list?= Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi, I've just done some work on saving to disk. I'll be testing myself, but please feel free to test in the meantime. Saving to disk was pretty broken before 0.5.1. In 0.5.1, I managed to get it to work reasonably well even with massive packet loss, but the result was that we got pretty bad audio-video desynchronisation. I've now implemented audio-video synchronisation almost correctly. We properly parse remote NTP timestamps, correlate them with RTP timestamps, and use the data to compute MKV timestamps. The only remaining issue is what happens before we receive NTP information from the remote. In that case, we use the reception timestamp, which yields a desynchronisation on the order of 100-200ms in my experiments. We resynchronise when the first sync packet arrives, but in many cases it causes Matroska timestamps going backwards, which is illegal. I've tried working around the issue by buffering packets until the first sync timestamp, but I've found that the browsers only send audio sync information after a couple of seconds, which means we need to buffer hundreds of packets. I've kept the code (see the branch "diskwriter-buffer"), but haven't decided whether to merge it yet. Please test! -- Juliusz