Skip to content

TS Seek issue

Luis Fernandes edited this page Oct 21, 2017 · 1 revision

Apache vs Tvheadend 4.1

Apache:

2017-10-21 09:26:02.078047+0100 VLC-iOS-no-watch[3432:1012600] outgoing request:
GET /hts/1.ts HTTP/1.1
Host: bananapi1
Accept: */*
Accept-Language: en_US
User-Agent: VLC/3.0.0-git LibVLC/3.0.0-git
Range: bytes=0-

2017-10-21 09:26:02.086014+0100 VLC-iOS-no-watch[3432:1012600] incoming response:
HTTP/1.1 206 Partial Content
Server: Apache/2.4.10 (Debian)
Last-Modified: Fri, 07 Apr 2017 23:09:59 GMT
ETag: "d52e3aa0-54c9bb9899333"
Content-Type: video/MP2T
Content-Length: 3576576672
Accept-Ranges: bytes
Content-Range: bytes 0-3576576671/3576576672



SEEK:
2017-10-21 09:26:17.363379+0100 VLC-iOS-no-watch[3432:1012612] outgoing request:
GET /hts/1.ts HTTP/1.1
Host: bananapi1
Accept: */*
Accept-Language: en_US
User-Agent: VLC/3.0.0-git LibVLC/3.0.0-git
If-Match: "d52e3aa0-54c9bb9899333"
Range: bytes=244531984-

2017-10-21 09:26:17.384249+0100 VLC-iOS-no-watch[3432:1012612] incoming response:
HTTP/1.1 206 Partial Content
Date: Sat, 21 Oct 2017 08:26:19 GMT
Server: Apache/2.4.10 (Debian)
Last-Modified: Fri, 07 Apr 2017 23:09:59 GMT
ETag: "d52e3aa0-54c9bb9899333"
Accept-Ranges: bytes
Content-Length: 3332044688
Content-Range: bytes 244531984-3576576671/3576576672
Content-Type: video/MP2T

Tvheadend 4.1

GET /dvrfile/6e8765f02c9394b97e4b9364f9549d1c HTTP/1.1
Host: 192.168.2.54:9981
Accept: */*
Accept-Language: en_US
User-Agent: TvhClient/788 LibVLC/3.0.0-git
Range: bytes=0-

2017-10-21 09:31:40.847752+0100 TvhClient[3452:1016588] incoming response:
HTTP/1.1 206 Partial Content
Server: HTS/tvheadend
Last-Modified: Sat, 21 Oct 2017 08:31:42 GMT
Expires: Sat, 21 Oct 2017 08:31:52 GMT
Cache-Control: max-age=10
Connection: Keep-Alive
Content-Type: application/octet-stream
Content-Length: 3576576672
Accept-Ranges: bytes
Content-Range: bytes 0-3576576671/-718390624

Seek:
2017-10-21 09:31:47.277233+0100 TvhClient[3452:1016593] outgoing request:
GET /dvrfile/6e8765f02c9394b97e4b9364f9549d1c HTTP/1.1
Host: 192.168.2.54:9981
Accept: */*
Accept-Language: en_US
User-Agent: TvhClient/788 LibVLC/3.0.0-git
If-Unmodified-Since: Sat, 21 Oct 2017 08:31:42 GMT
Range: bytes=4088415515507163136-

2017-10-21 09:31:47.287017+0100 TvhClient[3452:1016593] incoming response:
HTTP/1.1 200 OK
Server: HTS/tvheadend
Cache-Control: no-cache
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 137
2017-10-21 09:31:47.287106+0100 TvhClient[3452:1016593] cannot seek (to offset 4088415515507163136)
2017-10-21 09:31:47.288603+0100 TvhClient[3452:1016588] Can't read TS packet at 4088415515507163136

Most notably, Apache replies

Content-Length: 3576576672
Content-Range: bytes 0-3576576671/3576576672

and tvheadend replies

Content-Length: 3576576672
Content-Range: bytes 0-3576576671/-718390624

Notice the /-718390624 part, which then leads to really weird byte range for the seek command Range: bytes=4088415515507163136- , although Content-Length is correct but it seems vlc does not care about that one.

Clone this wiki locally