INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable  (Read 5985 times)

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« on: January 07, 2012, 06:38:43 am »

Why does MC DLNA server report "HTTP/1.1 416 Requested Range Not Satisfiable" in response to a valid Range request?

Below is a capture of two transactions; in the first MC reports "Accept-Ranges: bytes", but in the second transaction having a valid Range request, it responds with "HTTP/1.1 416".

What is going wrong here? And how can it be fixed?

Code: [Select]
Send : GET /Music/F31.flac HTTP/1.1
Accept: */*
Connection: close
Cache-Control: no-cache
Host: 192.168.1.31:52100
User-Agent: Whitebear/2.2 UPnP/1.0 Delphi-UPnP-Components/1.7


Recv : HTTP/1.1 200 OK
transferMode.dlna.org: Streaming
Content-Type: audio/flac
Server: Microsoft-Windows-XP/2002, UPnP/1.1 DLNADOC/1.50, JRiver/2.0
Content-Length: 179951677
Accept-Ranges: bytes
Connection: close
Date: Sat, 7 Jan 2012 12:21:30 GMT

fLaC   "   ....


++++++


Send : GET /Music/F31.flac HTTP/1.1
Accept: */*
Connection: close
Cache-Control: no-cache
Host: 192.168.1.31:52100
User-Agent: Whitebear/2.2 UPnP/1.0 Delphi-UPnP-Components/1.7
Range: 97121927-


Recv : HTTP/1.1 416 Requested Range Not Satisfiable
Server: Microsoft-Windows-XP/2002, UPnP/1.1 DLNADOC/1.50, JRiver/2.0
Date: Sat, 7 Jan 2012 12:21:38 GMT

Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?
Re: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« Reply #1 on: January 07, 2012, 06:40:37 am »

Hi Andrew,
Which build of MC are you using?

Thanks,

Jim
Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« Reply #2 on: January 07, 2012, 10:13:14 am »

Which build of MC are you using?
I am still on 16.181
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?
Re: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« Reply #3 on: January 07, 2012, 10:21:11 am »

Could you try MC17?  I sent you a license this morning.  16.0 is frozen now.

Download here:
http://yabb.jriver.com/interact/index.php?topic=68990.0
Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« Reply #4 on: January 08, 2012, 04:29:53 am »

Could you try MC17?  I sent you a license this morning.
Hi Jim,

Many thanks for the license.

I tried it also with MC v17 but unfortunately the same transaction still reports "416 Requested Range Not Satisfiable".
Note: this error occurs when trying to seek within a flac track. On the other hand when seeking within a pcm (L16 uncompressed - no header) a similar request works perfectly with a 206 success code as you would expect.
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« Reply #5 on: January 09, 2012, 11:55:02 am »

By the way, I can report that when I play the flac track within MC itself, then seek works fine. Whereas when a remote player downloads the same track from MC and uses Http Range requests to attempt to seek, it fails (with aforesaid Http 416 error)...
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« Reply #6 on: January 09, 2012, 01:37:27 pm »

What are your settings for Audio Conversion under Tools->Options->Media Network->Add or configure DLNA servers... -> "server name" ->Audio?

I've got conversion turned off and the range command on .flac files works as expected. Are the files that MC is accessing local or on a NAS or other server?
I'm unable to duplicate this on my machine with a flac file and conversion off.
Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« Reply #7 on: January 10, 2012, 06:20:17 am »


What are your settings for Audio Conversion ?
It is set to "Never Convert" -- so presumably the track is being served as is. { And by contrast, when it is set it to "Always Convert" / "Uncompressed L16 - No Header" the seek function works just fine. }

Are the files that MC is accessing local or on a NAS or other server?

They are local. And they play just fine. It is only the seek function that does not work.
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« Reply #8 on: January 10, 2012, 09:48:41 am »

I tested the Range Request with MC using curl and got the desired results.

I'm going to setup a test to duplicate your conditions. I need to know all of the details of your setup.

What I've got is MC as server and controller pushing the flac file to WhiteBear which pushes it to the Slim server and along to the device. MC is NOT on the same PC as WhiteBear and the Logitech Media Server.

What is your setup? I assume you are using the latest Logitech Media Server? I'm probably a bit behind on my WhiteBear Media Server, I'll check for an update..

edit: I installed the latest WhiteBear server and with my above setup, I can seek with L16 and I see the Range and it works but when I switch back to unconverted flac and I try to seek in MC it does nothing. When I look at the wireshark dump, I don't see any GET's with a range request, just the GET for the whole file.



Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« Reply #9 on: January 11, 2012, 06:25:07 am »

edit: I installed the latest WhiteBear server and with my above setup, I can seek with L16 and I see the Range and it works but when I switch back to unconverted flac and I try to seek in MC it does nothing. When I look at the wireshark dump, I don't see any GET's with a range request, just the GET for the whole file.

I am working with a not yet released test build of Whitebear, so maybe I messed something up. I will also test it with a production version and see if I can replicate the issue.

What version of Squeezebox Server are you using? I think perhaps the older versions v7.6.x were Ok, but that the newer builds v7.7.x also messed things up.

I will get back to you...
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« Reply #10 on: January 11, 2012, 03:25:07 pm »

I will get back to you...

The story gets wierder and wierder.... Following are extracts from two wire captures. One of which succeeds, and the other which fails.

Capture 1)  Foobar UPnP doing a GET with Range request against MC v17 => succeeds

Code: [Select]
GET /Music/F89.flac HTTP/1.1
Host: 192.168.1.31:52100
Range: bytes=9395326-
Connection: close
User-Agent: foobar2000/1.1.10
Accept: */*
Icy-MetaData:1

HTTP/1.1 206 Partial Content
transferMode.dlna.org: Streaming
Content-Range: bytes 9395326-18080315/18080316
Content-Type: audio/flac
Server: Microsoft-Windows-XP/2002, UPnP/1.1 DLNADOC/1.50, JRiver/2.0
Content-Length: 8684990
Accept-Ranges: bytes
Connection: close
Date: Wed, 11 Jan 2012 20:57:08 GMT

Capture 2)  My work in progress test version of Whitebear doing a GET with Range request against the same URL on MC v17 => fails !!

Code: [Select]
GET /Music/F89.flac HTTP/1.1
Accept: */*
Connection: close
Cache-Control: no-cache
Host: 192.168.1.31:52100
User-Agent: Whitebear/2.2 UPnP/1.0 Delphi-UPnP-Components/1.7
Range: 10044615-

HTTP/1.1 416 Requested Range Not Satisfiable
Server: Microsoft-Windows-XP/2002, UPnP/1.1 DLNADOC/1.50, JRiver/2.0
Date: Wed, 11 Jan 2012 21:03:21 GMT

The only significant differences I can detect between the two requests ar ii) the order of the Http request headers, and ii) the missing Icy-MetaData header. In theory such differences should be quite irrelevant. Also there is a slight difference in the Range request value, but it represents a point about halfway through the file, so the latter request is certainly not exceeding the end of the flac file.

What do you think?

Edit: Duuh!! I noticed my own error when reading back my post. The second request is "Range: 10044615-" whereas it should be "Range: bytes=10044615-". Sorry for wasting your time.

Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: MC DLNA Server: HTTP/1.1 416 Requested Range Not Satisfiable
« Reply #11 on: January 12, 2012, 09:07:20 am »


Edit: Duuh!! I noticed my own error when reading back my post. The second request is "Range: 10044615-" whereas it should be "Range: bytes=10044615-". Sorry for wasting your time.

No problem, nice catch, I missed it too.
Logged
Pages: [1]   Go Up