Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4DC88492D for ; Mon, 9 May 2011 22:05:46 +0000 (UTC) Received: (qmail 85766 invoked by uid 500); 9 May 2011 22:05:44 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 85739 invoked by uid 500); 9 May 2011 22:05:44 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 85731 invoked by uid 99); 9 May 2011 22:05:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 22:05:44 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robert.newson@gmail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bw0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 22:05:39 +0000 Received: by bwj24 with SMTP id 24so7118213bwj.11 for ; Mon, 09 May 2011 15:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=V94HOF7HCWkpAi5VASPP4V0cpW5J1+lbZlgV2izcRXg=; b=H4dG7XguVOxqVIg6jZ384bvLH7hVFHyxW+R8qpmW7Q0e3CuyDFAr4r9Wgu2Cnaq5P9 vYR8ZseUIfbsHWZAkWx5AwhUhstgBNYPAaWOA+gJ5tvL5hLp8H/tOh1JKQ1AhD7thgcn f8bgQWypNYTbxYlacH+44gbv5ulbOSiPmwGAA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=FEhvxVY6qFp5fIVcyp7zD00LdfJxXpsoIopKiesFO2hzu5v5zM6DqrfLggBxWXoS8H 8Lf9XWncDMWgozifRZwwzrG93oJAIFHlRgdZl/XUQn7Hw0X7Vrbveyr7A61Cnqqv7h00 cmCkP35t59w7gAwdibMnTFqOu3LTYZS55KL9Q= MIME-Version: 1.0 Received: by 10.204.39.68 with SMTP id f4mr6557980bke.17.1304978663359; Mon, 09 May 2011 15:04:23 -0700 (PDT) Received: by 10.204.171.1 with HTTP; Mon, 9 May 2011 15:04:23 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 May 2011 23:04:23 +0100 Message-ID: Subject: Re: Streaming video from couchdb From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Chrome is a blindingly fast, immaculately curated collection of bugs. B. On 9 May 2011 22:54, John wrote: > Hi Robert > > Thanks for the info. I noticed the issue in Chrome however I've now check= ed it on FF4 and Safari 5 and they work, in so much as they download the en= tire movie clip and then play. This isn't what I want but it proves your po= int. > > I'll have a go with 1.1 and see if streaming works. In any case I'm not p= roposing that we use couchdb to store audio/video attachments long term as = I've presumed that it's not going to scale very well! It's just convenient = for a small trial we're starting with. > > Thanks > > John > > On 9 May 2011, at 22:35, Robert Newson wrote: > >> Hi John, >> >> I added support for Content-Range in the upcoming 1.1 release. >> However, it's perfectly kosher to return a 200 in the case that the >> server does not support ranges w.rt RFC 2616; couchdb is not >> 'failing'. >> >> B. >> >> On 9 May 2011 18:49, Ryan Ramage wrote: >>> Range request headers were added in couch 1.1, which is not yet >>> released, but you can get a build of it in many places. Try that. >>> >>> On Mon, May 9, 2011 at 9:41 AM, John wrote: >>>> Hi >>>> >>>> I've been trying to use couchdb in a scenario where I stream video bac= k to an html5 web app without success. I'm requesting it as partial content= but couch returns it with status code 200 instead of 206. I've tried doing= exactly the same thing towards a web server and it replies as expected wit= h a status code of 206 (Partial Content) and the browser is then able to pl= ay the stream. >>>> >>>> I'm using couchdb version 1.0.2. >>>> >>>> Any ideas? Perhaps there is some config setting for the web server use= d by couch? >>>> >>>> Regards >>>> >>>> John >>>> >>>> >>>> Curl command to emulate equivalent browser request: >>>> >>>> curl -i http://localhost:5984/holla/e75a25e04eb78c77d990081d0e000f32/j= aws.mp4 -H"Accept:application/xml,application/xhtml+xml,text/html;q=3D0.9,t= ext/plain;q=3D0.8,image/png,*/*;q=3D0.5" -H"Accept-Charset:ISO-8859-1,utf-8= ;q=3D0.7,*;q=3D0.3" -H"Accept-Encoding:gzip,deflate,sdch" -H"Accept-Languag= e:en-US,en;q=3D0.8" -H"Connection:keep-alive" -H"Host:192.168.47.10:8182" -= H"If-Range:'16-2472c1779e6519bc15106fc9480c44a4'" -H"Range:bytes=3D5934716-= 5934716" -H"User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) Apple= WebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.57 Safari/534.24" >>>> >>>> >>>> Request/Response received for couchdb and web server respectively. >>>> >>>> Couchdb (FAILS): >>>> >>>> Request URL:http://localhost:5984/holla/e75a25e04eb78c77d990081d0e000f= 32/jaws.mp4 >>>> Request Method:GET >>>> Status Code:200 OK >>>> >>>> Request Headers >>>> Accept:application/xml,application/xhtml+xml,text/html;q=3D0.9,text/pl= ain;q=3D0.8,image/png,*/*;q=3D0.5 >>>> Accept-Charset:ISO-8859-1,utf-8;q=3D0.7,*;q=3D0.3 >>>> Accept-Encoding:gzip,deflate,sdch >>>> Accept-Language:en-US,en;q=3D0.8 >>>> Cache-Control:max-age=3D0 >>>> Connection:keep-alive >>>> Host:localhost:5984 >>>> If-Range:"16-2472c1779e6519bc15106fc9480c44a4" >>>> Range:bytes=3D327680-327680 >>>> User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/= 534.24 (KHTML, like Gecko) Chrome/11.0.696.57 Safari/534.24 >>>> >>>> Response Headers >>>> Cache-Control:must-revalidate >>>> Content-Encoding:identity >>>> Content-Length:126246489 >>>> Content-Type:video/mp4 >>>> Date:Fri, 06 May 2011 09:40:51 GMT >>>> ETag:"16-2472c1779e6519bc15106fc9480c44a4" >>>> Server:CouchDB/1.0.2 (Erlang OTP/R14B) >>>> >>>> Web Server (SUCCEEDS): >>>> >>>> Request URL:http://localhost:8182/holla/Jaws.mp4 >>>> Request Method:GET >>>> Status Code:206 Partial Content >>>> >>>> Request Headers >>>> Accept:application/xml,application/xhtml+xml,text/html;q=3D0.9,text/pl= ain;q=3D0.8,image/png,*/*;q=3D0.5 >>>> Accept-Charset:ISO-8859-1,utf-8;q=3D0.7,*;q=3D0.3 >>>> Accept-Encoding:gzip,deflate,sdch >>>> Accept-Language:en-US,en;q=3D0.8 >>>> Connection:keep-alive >>>> Host:localhost:8182 >>>> If-Range:Fri, 06 May 2011 08:22:56 GMT >>>> Range:bytes=3D3036301-3036301 >>>> User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/= 534.24 (KHTML, like Gecko) Chrome/11.0.696.57 Safari/534.24 >>>> >>>> Response Headers >>>> Accept-Ranges:bytes >>>> Content-Language:en >>>> Content-Length:1 >>>> Content-Location:http://localhost:8182/holla/Jaws.mp4 >>>> Content-Range:bytes 3036301-3036301/126246489 >>>> Content-Type:video/mp4 >>>> Date:Fri, 06 May 2011 09:22:20 GMT >>>> Expires:Fri, 06 May 2011 09:32:20 GMT >>>> Last-Modified:Fri, 06 May 2011 08:22:56 GMT >>>> Server:Restlet-Framework/@major-number@.@minor-number@@release-type@@r= elease-number@ >>>> Vary:Accept-Charset, Accept-Encoding, Accept-Language, Accept >>>> >>>> >>> > >