Re: Issue with "bytes" Range Unit and live streaming

Craig Pratt <craig@ecaspia.com> Fri, 15 April 2016 20:06 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B3C5912E02E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 15 Apr 2016 13:06:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.193
X-Spam-Level:
X-Spam-Status: No, score=-7.193 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.996, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ecaspia-com.20150623.gappssmtp.com
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 8sgaRm1gMP3H for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 15 Apr 2016 13:06:03 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6B73C12DFED for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 15 Apr 2016 13:06:03 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ar9vm-0002G1-6j for ietf-http-wg-dist@listhub.w3.org; Fri, 15 Apr 2016 20:01:30 +0000
Resent-Date: Fri, 15 Apr 2016 20:01:30 +0000
Resent-Message-Id: <E1ar9vm-0002G1-6j@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <craig@caspiaconsulting.com>) id 1ar9vh-0002FF-2F for ietf-http-wg@listhub.w3.org; Fri, 15 Apr 2016 20:01:25 +0000
Received: from mail-pa0-f53.google.com ([209.85.220.53]) by lisa.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <craig@caspiaconsulting.com>) id 1ar9vf-00078z-5U for ietf-http-wg@w3.org; Fri, 15 Apr 2016 20:01:24 +0000
Received: by mail-pa0-f53.google.com with SMTP id er2so29693880pad.3 for <ietf-http-wg@w3.org>; Fri, 15 Apr 2016 13:01:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ecaspia-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:organization:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=1LFjnbtHmjba/VTqZqWPvLgas01sOlKKMNp+K8cHgGs=; b=scA2SvNwa8h1ibtci6s2l+IJ+Cq/NNTB5x30iVUEyzgBcN+CjOzeTgvQLCy2Pp7bdj o2nplxz2ZbZFQ6TM5GigNsmpL1WC/nveOkNygNA4fMmQ+MCAns+cJMYSutbbiMGnVASW Y5x4RRIeWQA17jGyxcoijPMv6hhMYLDH2OFWRXBlaStiSTtK2hKh0WbHA5jVKL6D7VdI QQMdaPV/4s1UIadl6fZWKHqwyFkmDSs9zkJZg0k5YvDbLvQeA4mRdyxijZqiILMaS0/Y ejwnl0ZapiVDYTsvHyZiEZVUkitpF4rhC8QEIWlAC9vDdlmrzbQdwjkZt/SYHdfn5yM/ gAzA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=1LFjnbtHmjba/VTqZqWPvLgas01sOlKKMNp+K8cHgGs=; b=H55hT0QG/XeT2ibNyUwu2vseQv4ilVFY9fHe8qAeVs5KLBCvy3hvLvgF+WP4/t4QWC XQXUjgouyhqckT+WCWLXnaKuomuQn9b3EcEvwf4nYU6Mh6dw3u2tMGqPTG+clDxvAphS N99eu6w/aSZ/baCDVwZ1+CNMk24lPQuD+e72EtsyaTYqbdf1MUz6yAGWgLHci2DosyxM edGPyxKvzTkJNbllweset+gXx0Jo5X6ElW4RuWiHeVXuo2+Eh47uXp6rJd5n0MVQzBJp 6M3WuDDyl38OcnGlRr+v/5Vr9GEWUgS/iF6A9mn/yeNdCDVwX5mjFUt7zUWKfWL/T39C JtEQ==
X-Gm-Message-State: AOPr4FXplNhZv52WFkFMPorFdq0SvwO1RWOUwmx9Sxdu58QO3df6iCdJ21TMEg8Y5x8olg==
X-Received: by 10.67.6.36 with SMTP id cr4mr32003758pad.146.1460750456668; Fri, 15 Apr 2016 13:00:56 -0700 (PDT)
Received: from [10.10.1.104] (50-193-209-61-static.hfc.comcastbusiness.net. [50.193.209.61]) by smtp.googlemail.com with ESMTPSA id m10sm66528786pfi.32.2016.04.15.13.00.55 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Apr 2016 13:00:55 -0700 (PDT)
To: Göran Eriksson AP <goran.ap.eriksson@ericsson.com>, "STARK, BARBARA H" <bs7652@att.com>, Remy Lebeau <remy@lebeausoftware.org>, IETF HTTP BIS <ietf-http-wg@w3.org>
References: <57102718.7010900@ecaspia.com> <571041E0.5020401@lebeausoftware.org> <2D09D61DDFA73D4C884805CC7865E61142655F7B@GAALPA1MSGUSRBF.ITServices.sbc.com> <D3370313.258AE%goran.ap.eriksson@ericsson.com>
From: Craig Pratt <craig@ecaspia.com>
Organization: Caspia Consulting
Message-ID: <57114878.1030606@ecaspia.com>
Date: Fri, 15 Apr 2016 13:00:56 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
MIME-Version: 1.0
In-Reply-To: <D3370313.258AE%goran.ap.eriksson@ericsson.com>
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=209.85.220.53; envelope-from=craig@caspiaconsulting.com; helo=mail-pa0-f53.google.com
X-W3C-Hub-Spam-Status: No, score=-3.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1ar9vf-00078z-5U b33895c2aaf002229e23c558fe232998
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Issue with "bytes" Range Unit and live streaming
Archived-At: <http://www.w3.org/mid/57114878.1030606@ecaspia.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31484
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Thanks Göran.

Clarifications in-line.

cp

On 4/15/16 12:03 PM, Göran Eriksson AP wrote:
Hi,

Have a similar use case in a slightly different context. I find the draft
and discussion useful.

A few questions inline.



AFAICT, the existing ABNF for byte ranges *does* already support what you
are looking for, without having to introduce a new unit type:

   byte-range-spec = first-byte-pos "-" [ last-byte-pos ]

Simply omit the * and leave the second value empty:
   Range: bytes=1234567-



RFC 2616 Section 14.35.1 says:

"If the last-byte-pos value is absent, or if the value is greater than or
equal to the current length of the entity-body, last-byte-pos is taken to
be equal to one less than the current length of the entity- body in
bytes."

<bhs> Yes the client can make an open-ended request. The problem is the
server has no means of providing an open-ended response.

You mean response must contain content length?

[cp] Remy answered this: Content-Length is not expressly required (since that would prevent chunked and other transfer encodings). But the Content-Range header can only communicate a fixed response.
RFC 7233 Section 2.1 says:

"If the last-byte-pos value is absent, or if the value is greater than or
equal to the current length of the representation data, the byte range is
interpreted as the remainder of the representation (i.e., the server
replaces the value of last-byte-pos with
a value that is one less than the current length of the selected
representation)."

<bhs> Correct. The server is required to provide an actual value for
last-byte-pos. And that value is based on the current length. If the
server is recording
the content from a live stream, whatever value the server provides will
no longer be the last byte almost as soon as the value is sent. The
actual endpoint is constantly increasing.

Since the media is being recorded while streaming, the client can
randomly jump around within the recorded portion of the media all it
wants. Once jumped, it would simply be receiving media from the
recording, not the live feed.  To jump back to the live feed,
simply omit the "Range" header.

<bhs> The use case is not one of the client recording the stream. It is
of the server recording the stream. Let me see if I can explain the use
case better.
The user is watching content on a client that is being streamed from a
server. The server is recording the content from a live stream.
The client has limited
memory and can only buffer about 15 seconds worth of content.
The user pauses watching the content and comes back after 1 minute to
resume. The client sends the server a request to provide content from the
paused byte position
to “-“. 
The server is required to provide a response that has an actual last byte
value. The only last byte value the server has is the one for the precise
moment of
the request. After a minute, the server has a minute more of content but
has provided the client with the content up to that responded last byte.
Isn’t the server providing the client with a new manifest with the latest
‘last byte’ every 15 seconds or so? Or are you after a solution where this
approach is not used, instead with an “open request” in the request
template?

Would be good to know what kind of media player behaviour is assumed here,
especially the manifest part of it.
[cp] The media player in this case doesn't assume the presence of a manifest or any other kind of segmented content representation. Think of a single transport stream or fragmented MP4 (iso bmff) (represented by a single URI) that grows over time.

Shouldn’t the server stop sending bytes once it gets to the value of its
responded last-byte-pos? Even though
it has now a whole lot more bytes and we know that the user just wants
to keep watching? Should the client be expected to make continual
requests to keep up with the ever-increasing endpoint?
The purpose of this proposal is to allow the server to provide an
open-ended response, so the server can send bytes that it didn’t have at
the time of the original
request.

Barbara


    


--

craig pratt

Caspia Consulting

craig@ecaspia.com

503.746.8008