INTERACT FORUM

Please login or register.

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

Author Topic: FLAC and chunked-encoding or no content-length  (Read 1235 times)

philippe_44

  • Recent member
  • *
  • Posts: 20
FLAC and chunked-encoding or no content-length
« on: February 03, 2019, 02:59:53 am »

Yet another question, sorry ...

I also can't get the JRiver renderer to work with flac when using chunked-encoding. I've tested my "chunked-encoder" with many other system w/o problem, but with JRiver, the whole file is sent and then nothing happens. As soon as I move to non-chunked encoding and send a file with a content-length, playback happens normally.

I've also tried to send a file without chunked-encoding but without a content-length as well and I have the same problem, so the issue seems to be content-length which of course shall not be set with chunked-encoding transfer mode.

Note that my files have a normal flac header, they are not "just" streams. But regardeless, as JRiver's HTTP client says it's HTTP 1.1, I think chunked-encoding shall work, no?
Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: FLAC and chunked-encoding or no content-length
« Reply #1 on: February 03, 2019, 03:44:05 am »

UPNP renderers, including MC, usually need to be given a Content-Length header so that they can calculate (or at least estimate) the duration for purposes of setting their play progress bar etc.

Of course instead of reading Content-Length from the HTTP header, they could resp. should get this value (and the duration too) directly from the meta data that is pushed in SetAVTransportURI (or SetNext). But most renderers (including MC) seem not to bother to parse that meta data at all. I don’t know why.

EDIT: as you imply, the renderers could also in theory read some meta data from within the actual stream itself. So in theory there could be three parallel / redundant sources of meta data — the HTTP headers, SetAVT, and embedded in the file. A good UPNP implementation (like mine) should parse all three sources in order to gain the most complete picture of all meta data. However MC is not (yet) that good in this respect..

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

philippe_44

  • Recent member
  • *
  • Posts: 20
Re: FLAC and chunked-encoding or no content-length
« Reply #2 on: February 03, 2019, 12:24:09 pm »

Thanks - But that would mean that the duration is always known, which is not the case (in my example) and isn't it why chunked-encoding was introduced in HTTP 1.1? to transmit content when you don't know size? Typically a live radio stream.
Other renderers when they don't receive any duration, just display a progress bar showing how much time elapsed, but not a % or ratio of a total.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72543
  • Where did I put my teeth?
Re: FLAC and chunked-encoding or no content-length
« Reply #3 on: February 05, 2019, 04:26:30 am »

Logged
Pages: [1]   Go Up