Re: [codec] requirements #8 (new): Sample rates?

"Pascal Pochol" <Pochol@WebfootGames.com> Thu, 27 January 2011 18:14 UTC

Return-Path: <Pochol@WebfootGames.com>
X-Original-To: codec@core3.amsl.com
Delivered-To: codec@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 653AF3A65A5 for <codec@core3.amsl.com>; Thu, 27 Jan 2011 10:14:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 52UFaMO60gtL for <codec@core3.amsl.com>; Thu, 27 Jan 2011 10:14:48 -0800 (PST)
Received: from mail.webfootgames.com (mail.webfootgames.com [68.248.244.61]) by core3.amsl.com (Postfix) with ESMTP id 025023A681F for <codec@ietf.org>; Thu, 27 Jan 2011 10:14:46 -0800 (PST)
Received: from mail.WebfootGames.com (softdnserr [::ffff:127.0.0.1]) (AUTH: LOGIN pochol) by mail.webfootgames.com with esmtp; Thu, 27 Jan 2011 12:18:34 -0600 id 000010A0.4D41B6FB.00000822
Message-ID: <2194e1f874a6ac4cc576cb63e010b1be@WebfootGames.com>
Date: Thu, 27 Jan 2011 12:18:35 -0600
From: Pascal Pochol <Pochol@WebfootGames.com>
To: Butrus Damaskus <butrus.butrus@gmail.com>
In-Reply-To: <AANLkTimvVA_K+JLAqrP7SjFYD6HkqrbnxUAXxcMGWEt3@mail.gmail.com>
References: <1485847861.1415843.1296076736111.JavaMail.root@lu2-zimbra> <4D4091A5.40604@octasic.com> <088d003d65f78906dd3464e0fde1e22d@WebfootGames.com> <AANLkTimvVA_K+JLAqrP7SjFYD6HkqrbnxUAXxcMGWEt3@mail.gmail.com>
X-Mailer: Webfoot's WebMail 1.6-CVS
x-priority: 3
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mime-Autoconverted: from 8bit to 7bit by courier 0.64
Cc: codec@ietf.org
Subject: Re: [codec] requirements #8 (new): Sample rates?
X-BeenThere: codec@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: Pochol@WebfootGames.com
List-Id: Codec WG <codec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/codec>, <mailto:codec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/codec>
List-Post: <mailto:codec@ietf.org>
List-Help: <mailto:codec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/codec>, <mailto:codec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Jan 2011 18:14:49 -0000

Brutus,

> Well, but you probably need at least one bit to signal header/data
> packets, no?

for what we do, no. We open a stream we can easily assume the header is at
the beginning and everything after that is data packets. We don't have
anything that can join in midstream or change the format midstream or
anything like that. Again this is very specific to what we do it might not
fit others needs. I wouldn't even have a problem if we simply had to call a
few api functions before encoding to set everything up and call a few api
functions before decoding with the same type of parameters to let the
decoder know what it's about to receive and not even use a header. Since we
write both encoder and decoder programs to fit our needs and nobody else
reads our encoded data.

when we used speex we started with the standard speexenc/speexdec format
encapsulated into an ogg. But that was too complex so we dropped the ogg
container and used samplexenc.c and sampledec.c instead. We made our
version of sampleenc.c spit out a tiny header at the beginning that would
give us some basic information that we needed in order to decode
everything. I don't remember off hand what it contained one was the
original number of samples I think. And we loaded that in our decoder and
that was it. the rest of the files were all the smallest speex packets we
could make. We noticed that the first byte was a constant size of the frame
so we dropped that out as well and moved it into the header. That saved a
few hundreds to a few thousands bytes for each file (a few thousands of
files total) for a huge saving. For us a byte is still a full 8 bits which
can be used to store a lot of information, so I perfectly understand and
appreciate this group's concern about adding a few bits to each packets. My
personal vote for opus-custom would be to use api calls and not store any
more data than absolutely necessary in the stream. Since using the custom
mode mean using custom code on both ends it's not a problem for us.

-Pascal