Re: [rtcweb] H.261 encoding samples at typical bitrates - sign language example

Basil Mohamed Gohar <basilgohar@librevideo.org> Tue, 03 December 2013 04:23 UTC

Return-Path: <basilgohar@librevideo.org>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 96B251ADF95 for <rtcweb@ietfa.amsl.com>; Mon, 2 Dec 2013 20:23:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FliToMqsqT5J for <rtcweb@ietfa.amsl.com>; Mon, 2 Dec 2013 20:23:47 -0800 (PST)
Received: from mail.zaytoon.hidayahonline.net (zaytoon.hidayahonline.net [173.193.202.83]) by ietfa.amsl.com (Postfix) with ESMTP id 7996E1ADFB5 for <rtcweb@ietf.org>; Mon, 2 Dec 2013 20:23:47 -0800 (PST)
Received: from [192.168.1.100] (d60-65-38-134.col.wideopenwest.com [65.60.134.38]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: basilgohar@librevideo.org) by mail.zaytoon.hidayahonline.net (Postfix) with ESMTPSA id 39B6B9DA3EC for <rtcweb@ietf.org>; Mon, 2 Dec 2013 23:23:44 -0500 (EST)
Message-ID: <529D5CCD.8070801@librevideo.org>
Date: Mon, 02 Dec 2013 23:23:41 -0500
From: Basil Mohamed Gohar <basilgohar@librevideo.org>
Organization: Libre Video
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version: 1.0
To: "<rtcweb@ietf.org>" <rtcweb@ietf.org>
References: <529D4A06.4080708@librevideo.org>
In-Reply-To: <529D4A06.4080708@librevideo.org>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [rtcweb] H.261 encoding samples at typical bitrates - sign language example
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb/>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 04:23:51 -0000

On 12/02/2013 10:03 PM, Basil Mohamed Gohar wrote:
> Let's let any further discussions about the usability of H.261, or any
> other codec for that matter, use actual examples going forward.
> 
> The following is a VERY quick test of ffmpeg's h261 encoder in the
> context of the IETF's rtcweb working group's discussion of an MTI
> (mandatory-to-implement) video codec.
> 
> sine_irene_cif.y4m taken from derf's collection:
> 
> http://media.xiph.org/video/derf/y4m/sign_irene_cif.y4m
> 
> ffmpeg version N-58565-gc122e69
> 
> bitrate=64k,128k,256k,512k
> 
> ffmpeg -i sign_irene_cif.y4m -codec:v h261 -b:v $bitrate -g 30
> sign_irene_cif.y4m-$bitrate.h261
> 
> http://media.basilgohar.com/rtcweb/sign_irene_cif.y4m-64k.h261
> (real rate: 157.8kbits/s)
> 
> http://media.basilgohar.com/rtcweb/sign_irene_cif.y4m-128k.h261
> (real rate: 165.6kbits/s)
> 
> http://media.basilgohar.com/rtcweb/sign_irene_cif.y4m-256k.h261
> (real rate: 289.5kbits/s)
> 
> http://media.basilgohar.com/rtcweb/sign_irene_cif.y4m-512k.h261
> (real rate: 541.8kbits/s)
> 
> I apologize for the bitrate inflation, but if I had more time I can
> tweak the settings for a more accurate number.  These are simply the
> rates that ffmpeg produced with such a short clip at the given requested
> rates.
> 

I've updated the encoding settings as follows to get more accurate
resulting bitrates, but ffmpeg's h261 encoder seems to bottom-out at
around ~140kbps, so the only examples from above that are close (after
using the new settings) are 256k and 512k.

for bitrate in {1..512}k; do ffmpeg -i ../sign_irene_cif.y4m -codec:v
h261 -b:v $bitrate -minrate $bitrate -maxrate $bitrate -bufsize $bitrate
-qmax 1024 -g 30 -y sign_irene_cif.y4m-$bitrate.h261; done;

All the above posted examples can be viewed with mplayer and a bash
command line using the following, if you're interested:

mplayer
http://media.basilgohar.com/rtcweb/sign_irene_cif.y4m-{64,128,256,512}k.h261

The full integer range of bitrates from 1 to 512 can be found here:

http://media.basilgohar.com/rtcweb/h261/

Target bitrate and actual bitrate start to match around 150kbps with
these new settings.

I am currently exploring other codecs with the same methodology and will
share the results accordingly.

-- 
Libre Video
http://librevideo.org