iPhone / Quicktime / Etags

1,159 views
Skip to first unread message

dad...@gmail.com

unread,
Jul 6, 2007, 2:35:01 PM7/6/07
to iPhoneWebDev
Greetings all. I can post a .MOV or .MP3 file that has been encoded
according to the Apple spec, on any of my normal webservers, pull up
that URL and have the file play back beautifully over the iPhone.

Where I am stuck, is that we have a app that has a custom webserver
built into it. This server responds fine to every device and browser
so far in serving mp3 or quicktime files (including on Safari 2 & 3 on
OSX).

However when accessing QT content on the iPhone that plays fine from
an IIS or Apache server, it is not playing at all when served from our
custom webserver. (I get a QT logo with the Ghostbusters icon on
it ;)

>From deduction, I believe that there is something malformed about our
response.headers on the quicktime content. The only thing I could see
was that we were not making use of Etag in the response.header. I
have been trying to determine the format for creating this tag, and
was left thinking that any Unique ID would work, however it seems
something is still amiss.

Wondering if any server peeps know about Safari's use of Etag. From
my research it seems that it is becoming very common to use them as a
way to improve caching of sites and files. But any clue why not
having Etag would stop my QT content from playing on an iPhone? Our
server is kind of based on Apache, but I am not sure if I need to get
CURL working to enable that, or if I can just make up my own Etag
somehow?
Here are a few sample headers so you can see where I am at. Thanks
for any help!

//////////////////////
DOESNT WORK FROM MY CUSTOM WEBSERVER
(although this plays on OSX Safari it doesnt play on iPhone)
The Etag shown is also a custom Unique ID that I am using, but I
realize it is probably not the right format.

Content-Length: 5060891
Content-Type: video/quicktime
Last-Modified: Wed, 04 Jul 2007 18:42:13 GMT
Accept-Ranges: bytes
Server: DOT.TUNES
Etag: "BF3993F8FCE43384"
Date: Thu, 05 Jul 2007 15:29:55 GMT

200 OK

//////////////////////
WORKS FINE ON MY DEV WIN2K server

Server: Microsoft-IIS/5.0
X-Powered-By: ASP.NET
Date: Fri, 06 Jul 2007 15:21:29 GMT
Content-Type: video/quicktime
Accept-Ranges: bytes
Last-Modified: Mon, 02 Jul 2007 07:39:46 GMT
Etag: "0d68297cbcc71:cfa"
Content-Length: 5060891

200 OK

//////////////////////

WORKS FINE ON MY PROD WIN2K3 server

Content-Length: 5060891
Content-Type: video/quicktime
Last-Modified: Wed, 04 Jul 2007 18:42:13 GMT
Accept-Ranges: bytes
Etag: "adaab96bbec71:9ef"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Fri, 06 Jul 2007 15:10:26 GMT
Connection: close

200 OK

/////////////////////////
WORKS FINE ON OSX DARWIN SERVER (on my laptop)

Date: Fri, 06 Jul 2007 15:18:29 GMT
Server: Apache/1.3.33 (Darwin)
Last-Modified: Fri, 04 Jun 2004 03:30:38 GMT
Etag: "c12ef-4caf07-40bfecde"
Accept-Ranges: bytes
Content-Length: 5025543
Content-Type: video/quicktime

200 OK

Ankur Jain

unread,
Jul 6, 2007, 2:40:53 PM7/6/07
to iphone...@googlegroups.com
You were able to listen to stream music through .mp3 file. This is great!

Could you please send the link to your website to the group?

-Ankur

Christopher Allen

unread,
Jul 6, 2007, 2:49:21 PM7/6/07
to iphone...@googlegroups.com
On 7/6/07, dad...@gmail.com <dad...@gmail.com> wrote:
> Greetings all. I can post a .MOV or .MP3 file that has been encoded
> according to the Apple spec, on any of my normal webservers, pull up
> that URL and have the file play back beautifully over the iPhone.
>
> Where I am stuck, is that we have a app that has a custom webserver
> built into it. This server responds fine to every device and browser
> so far in serving mp3 or quicktime files (including on Safari 2 & 3 on
> OSX).

I think the answer is fairly simple, your custom webserver isn't
handling byte-range requests.

As per: http://developer.apple.com/iphone/designingcontent.html#configure_your_server

[quote]
Configure Your Server

HTTP servers hosting media files for iPhone must support byte-range
requests, which iPhone uses to perform random access in media
playback. (Byte-range support is also known as content-range or
partial-range support.) Most, but not all, HTTP 1.1 servers already
support byte-range requests.

If you are not sure whether your media server supports byte-range
requests, you can open the Terminal application in Mac OS X and use
the curl command-line tool to download a short segment from a file on
the server:

curl -range 0-99 http://example.com/test.mov -o /dev/null
If the tool reports that it downloaded 100 bytes, the media server
correctly handled the byte-range request. If it downloads the entire
file, you may need to update the media server. For more information on
curl, see Mac OS X Man Pages.

Ensure that your HTTP server sends the correct MIME types for movie
family file suffixes shown in the following table.

File name suffix MIME type
.mov video/quicktime
.mp4 video/mp4
.m4v video/x-m4v
.3gp video/3gpp
Be aware that iPhone supports movies greater than 2 GB. However, some
older web servers are not able to serve files this large. Apache 2
supports downloading files greater than 2GB.

RTSP is not supported.
[/quote]

Let us know if this was the problem.

-- Christopher Allen

dad...@gmail.com

unread,
Jul 6, 2007, 3:29:32 PM7/6/07
to iPhoneWebDev
Thanks Christopher... We actually atarted there. The thing is we do
have built in byte range support, and can serve files to all sorts of
interfaces fine, whether normal browser, Wii, PS3, or PSP. The PSP
was the first non standard browser that required byte range support
and it has been working fine with that for a long time.

I really think that it has to do with the Etag although I could be
wrong. But being that iPhone is so standards reliant, I really think
that this is part of the problem.

Here are 2 examples of files which play fine on my regular server.
Just type them into the iPhone browser and it will pull them up.

http://www.triagency.com/Greetings.mp3
http://www.triagency.com/Marksmen.mov

Thanks everyone for the help and I can guarantee that your help will
be well rewarded with some coolness for your iPhone ;)

Phil


On Jul 6, 2:49 pm, "Christopher Allen" <Christoph...@iPhoneWebDev.com>
wrote:


> On 7/6/07, dad...@gmail.com <dad...@gmail.com> wrote:
>
> > Greetings all. I can post a .MOV or .MP3 file that has been encoded
> > according to the Apple spec, on any of my normal webservers, pull up
> > that URL and have the file play back beautifully over the iPhone.
>
> > Where I am stuck, is that we have a app that has a custom webserver
> > built into it. This server responds fine to every device and browser
> > so far in serving mp3 or quicktime files (including on Safari 2 & 3 on
> > OSX).
>
> I think the answer is fairly simple, your custom webserver isn't
> handling byte-range requests.
>

> As per:http://developer.apple.com/iphone/designingcontent.html#configure_you...


>
> [quote]
> Configure Your Server
>
> HTTP servers hosting media files for iPhone must support byte-range
> requests, which iPhone uses to perform random access in media
> playback. (Byte-range support is also known as content-range or
> partial-range support.) Most, but not all, HTTP 1.1 servers already
> support byte-range requests.
>
> If you are not sure whether your media server supports byte-range
> requests, you can open the Terminal application in Mac OS X and use
> the curl command-line tool to download a short segment from a file on
> the server:
>

> curl -range 0-99http://example.com/test.mov-o /dev/null

dad...@gmail.com

unread,
Jul 6, 2007, 3:47:00 PM7/6/07
to iPhoneWebDev
Also Christopher the odd thing is that when I run the test CURL on my
remote webserver and custom server on the same file I get the same
response.

curl -range 0-99 http://www.triagency.com/Marksmen.mov

is the format I am using... Any thoughts?

On Jul 6, 2:49 pm, "Christopher Allen" <Christoph...@iPhoneWebDev.com>
wrote:

> On 7/6/07, dad...@gmail.com <dad...@gmail.com> wrote:
>
> > Greetings all. I can post a .MOV or .MP3 file that has been encoded
> > according to the Apple spec, on any of my normal webservers, pull up
> > that URL and have the file play back beautifully over the iPhone.
>
> > Where I am stuck, is that we have a app that has a custom webserver
> > built into it. This server responds fine to every device and browser
> > so far in serving mp3 or quicktime files (including on Safari 2 & 3 on
> > OSX).
>
> I think the answer is fairly simple, your custom webserver isn't
> handling byte-range requests.
>

> As per:http://developer.apple.com/iphone/designingcontent.html#configure_you...


>
> [quote]
> Configure Your Server
>
> HTTP servers hosting media files for iPhone must support byte-range
> requests, which iPhone uses to perform random access in media
> playback. (Byte-range support is also known as content-range or
> partial-range support.) Most, but not all, HTTP 1.1 servers already
> support byte-range requests.
>
> If you are not sure whether your media server supports byte-range
> requests, you can open the Terminal application in Mac OS X and use
> the curl command-line tool to download a short segment from a file on
> the server:
>

> curl -range 0-99http://example.com/test.mov-o /dev/null

dkobe...@gmail.com

unread,
Jul 16, 2007, 3:41:23 AM7/16/07
to iPhoneWebDev
I think I figured it out. I was having the same problem. Check to
see if your server is responding with status 206 Partial Content. I'm
doing something with CGI.pm and had to put in a little hack to get it
to take my declaration of the status. Suddenly the content started
playing on the iphone. I guess the iphone doesn't like to make a
content-range request and get a status of 200.

On Jul 6, 12:47 pm, "dad...@gmail.com" <dad...@gmail.com> wrote:
> Also Christopher the odd thing is that when I run the test CURL on my
> remote webserver and custom server on the same file I get the same
> response.
>

> curl -range 0-99http://www.triagency.com/Marksmen.mov

dkobe...@gmail.com

unread,
Jul 16, 2007, 5:30:19 PM7/16/07
to iPhoneWebDev
Ok - try again. I spoke too quickly. The issue for me seemed to be
that my server wasn't sending "content-range" when iphone/quicktime
asked for all of the bytes by range. In other words, it appears to be
important that range be provided by the server when a range is
requested by the client, even if it's the whole range. I don't send a
range if none requested.

On Jul 16, 12:41 am, "dkoberst...@gmail.com" <dkoberst...@gmail.com>
wrote:

dad...@gmail.com

unread,
Jul 20, 2007, 12:11:39 AM7/20/07
to iPhoneWebDev
yeah we figured it out, the byte range request wasnt right initially.
as soon as that was fixed we were fine.

On Jul 16, 5:30 pm, "dkoberst...@gmail.com" <dkoberst...@gmail.com>
wrote:

dad...@gmail.com

unread,
Sep 2, 2007, 12:16:26 AM9/2/07
to iPhoneWebDev
Hey all not at all trying to spam here but thought I would follow up
to my original question and promise, and let you all know about the
official release of our application called DOT.TUNES that lets you
stream anything (except ITMS files or non-iphone encoded videos) to
your iPhone! Check it out at http://www.dottunes.net

Now that the project has launched I will have more time to spend here
learning all the latest tricks.

And hats off to Joe Hewitt as always for providing iUI which served as
a nice tutorial for what was possible!

Phil
TriAgency / DOT.TUNES development team

http://triagency.com
http://www.dottunes.net

dad...@gmail.com

unread,
Sep 2, 2007, 12:22:25 AM9/2/07
to iPhoneWebDev
oops one clarification and very important point. DOT.TUNES allows you
to stream any *iTunes* content to your iPhone.

sorry long week this week with the launch and all :p


On Sep 2, 12:16 am, "dad...@gmail.com" <dad...@gmail.com> wrote:
> Hey all not at all trying to spam here but thought I would follow up
> to my original question and promise, and let you all know about the
> official release of our application called DOT.TUNES that lets you
> stream anything (except ITMS files or non-iphone encoded videos) to

> your iPhone! Check it out athttp://www.dottunes.net


>
> Now that the project has launched I will have more time to spend here
> learning all the latest tricks.
>
> And hats off to Joe Hewitt as always for providing iUI which served as
> a nice tutorial for what was possible!
>
> Phil
> TriAgency / DOT.TUNES development team
>

> http://triagency.comhttp://www.dottunes.net

shelly

unread,
Sep 2, 2007, 3:58:50 PM9/2/07
to iPhoneWebDev
Sounds pretty cool, similiar to what we are doing. our opensource
product will allow you to stream any unprotected content from any upnp
enabled media server, and find content published via bonjour.

We launch an alpha on sourceforge next week.

www.mooncatventures.com or mooncatventures.blogspot.com for a youtube
video of our offering.

The final product will work on the iphone in an ajax enabled interface
or just about any other device that supports a web browser, content is
adjusted to the device playing it. obviously video on the iphone is
limited to mp4 and h264 and on a wm mobile device wmv.

Wish you luck with your offering, I know the issues of trying to
launch, still having research issues (bugs) and trying to get a public
facing web presence up.

> > > > > > > -- Christopher Allen- Hide quoted text -
>
> - Show quoted text -

Andy Fuchs

unread,
Sep 3, 2007, 4:16:40 AM9/3/07
to iphone...@googlegroups.com, dad...@gmail.com
Hi Phil,

maybe I did something wrong, but

- when I downloaded DOT.TUNES (OSX) and clicked GetKey (without entering
data) it hung and I had to kill it in order to be able to continue.

- I don't see anything special for iPhones there - except that I could buy
an iPhone-Plugin. Not sure what that is supposed to do, except loading a
couple of different CSS.

best

andy


--
Andy Fuchs

-----------------------------------------------------------------
Elgato Systems GmbH Nymphenburger Straße 14
http://www.elgato.com D-80335 München, Germany

Amtsgericht München, HRB 108591 Geschäftsführer: Dr. Markus Fest
-----------------------------------------------------------------

shelly

unread,
Sep 3, 2007, 1:37:26 PM9/3/07
to iPhoneWebDev
So how is this any better than using an apache webserver with the
docroot pointed at my itunes directory.
Or a simple php apps that reads the apple xml and produces an html
listing . there are about a dozen of those for the iphone all free. I
believe you have to buy this plugin.

On Sep 3, 4:16 am, Andy Fuchs <a...@elgato.com> wrote:
> Hi Phil,
>
> maybe I did something wrong, but
>
> - when I downloaded DOT.TUNES (OSX) and clicked GetKey (without entering
> data) it hung and I had to kill it in order to be able to continue.
>
> - I don't see anything special for iPhones there - except that I could buy
> an iPhone-Plugin. Not sure what that is supposed to do, except loading a
> couple of different CSS.
>
> best
>
> andy
>
> at 02.09.2007 6:16 Uhr, dad...@gmail.com wrote:
>
>
>
>
>
>
>
> > Hey all not at all trying to spam here but thought I would follow up
> > to my original question and promise, and let you all know about the
> > official release of our application called DOT.TUNES that lets you
> > stream anything (except ITMS files or non-iphone encoded videos) to

> > your iPhone! Check it out athttp://www.dottunes.net

> Elgato Systems GmbH Nymphenburger Straße 14http://www.elgato.com D-80335 München, Germany


>
> Amtsgericht München, HRB 108591 Geschäftsführer: Dr. Markus Fest

> ------------------------------------------------------------------ Hide quoted text -

dad...@gmail.com

unread,
Sep 4, 2007, 10:32:50 AM9/4/07
to iPhoneWebDev
Hi Andy sorry for your installation troubles, may I ask if you are
using OSX or the Windows version? Were you able to get the app
installed finally? Any feed back you can provide is great. We have
an auto update feature built in to address any issues and fix them as
soon as they are identified. This honestly is the first time I heard
of this error.

If you would like to preview the interface on your iPhone go to
http://music.dottunes.net:9998 (no password needed for the Guest
account)

Also regarding your and Shelly's questions:

The iPhone plugin is in essence some extra CSS (along with lots of
backend coding), however there is more that goes into it than that.
The plugin will actually display your album art, as well as all Meta
data (Comments, Lyrics, etc) on the file detail page. Beside that,
the Share Plugin(s) functionality allow you to open up your DOTTUNES
to multiple users.

True there are home brew methods and other apps out there. Not only
does DT work on OSX and Windows it will run on any machine that has
iTunes on it. Doesnt need to be anything special. Not trying to be
the only solution and realize we never will. At the same time, we feel
that having all of the features that we do (SSL, Flash player, access
over multiple devices etc) we are a little different. I also realize
most of the people here reading this list are well smart enough to
whip something like this up on their own, however there are many
people who enjoy clicking a few buttons and getting access to their
entire iTunes library.

Again being that this is a developer's group and not a sales platform,
my whole reason for even following up is that I had posted the
question about Quicktime & Etags while I was in research mode, and
answered all related responses to it. This forum has helped me to
better understand the iPhone interface and I thought I would share the
results of our work!

As for why we are charging for the Plug-In, well the application has
been slowly built over the course of 4 years. My team came on board
with the web stuff 2 years ago. We recently made the decision to give
the core parts of the app away free, and allow people to customize it
with Plug-Ins based on their needs. I know some people will love this
and some will hate it. Like they say you can't please them all!

Once again, anyone with any development related questions I look
forward to jumping back into that part of the group. Now that this
project has launched I look forward to working with and learning from
you all back in R&D world.

Have a great day!

Phil


On Sep 3, 4:16 am, Andy Fuchs <a...@elgato.com> wrote:

> Hi Phil,
>
> maybe I did something wrong, but
>
> - when I downloaded DOT.TUNES (OSX) and clicked GetKey (without entering
> data) it hung and I had to kill it in order to be able to continue.
>
> - I don't see anything special for iPhones there - except that I could buy
> an iPhone-Plugin. Not sure what that is supposed to do, except loading a
> couple of different CSS.
>
> best
>
> andy
>
> at 02.09.2007 6:16 Uhr, dad...@gmail.com wrote:
>
>
>
>
>
> > Hey all not at all trying to spam here but thought I would follow up
> > to my original question and promise, and let you all know about the
> > official release of our application called DOT.TUNES that lets you
> > stream anything (except ITMS files or non-iphone encoded videos) to

> > your iPhone! Check it out athttp://www.dottunes.net

> Elgato Systems GmbH Nymphenburger Straße 14http://www.elgato.com D-80335 München, Germany

Andy Fuchs

unread,
Sep 4, 2007, 1:27:04 PM9/4/07
to iphone...@googlegroups.com
Hi Phil,

> Hi Andy sorry for your installation troubles, may I ask if you are
> using OSX or the Windows version?

MacOS X

> Were you able to get the app
> installed finally?

After killing the Dottunes.app and try again, yes. But that's a bad user
experience - sorry to say, but either should you disable the Get Key button,
if there's no data in the fields and/or verify the user's input before
hanging.

> Any feed back you can provide is great. We have
> an auto update feature built in to address any issues and fix them as
> soon as they are identified. This honestly is the first time I heard
> of this error.

Maybe you should try yourself?! ;-)

Best

andy

Reply all
Reply to author
Forward
0 new messages