Can someone explain VLC's strange HTTP Range Requests

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
mdescher
Blank Cone
Blank Cone
Posts: 10
Joined: 04 May 2012 19:07

Can someone explain VLC's strange HTTP Range Requests

Postby mdescher » 08 Jan 2014 14:14

I have a Java server which handles requests to media files, e.g. MP4 videos. When I use VLC to access such a file, I can see lots of HTTP Range Requests in my server. The server can handle the requests, but I do not understand what VLC tries to achieve. To make sure it has nothing to do with my server I also tried putting the media file into an Apache server and I can see dozens of requests as well, so I assume they are the same. Here is part of my log file:

Code: Select all

2014-01-08 13:56:39,472 [qtp32485379-86] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=0-". 2014-01-08 13:56:45,520 [qtp32485379-87] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=1787495-". 2014-01-08 13:56:45,869 [qtp32485379-84] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=4520980-". 2014-01-08 13:56:46,233 [qtp32485379-83] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=1048907462-". 2014-01-08 13:57:12,350 [qtp32485379-85] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=4558050-". 2014-01-08 13:57:12,560 [qtp32485379-82] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=85229234-". 2014-01-08 13:57:13,037 [qtp32485379-84] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=4558050-". 2014-01-08 13:57:13,241 [qtp32485379-83] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=85267932-". 2014-01-08 13:57:13,573 [qtp32485379-86] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=4558050-". 2014-01-08 13:57:13,784 [qtp32485379-87] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=85267932-". 2014-01-08 13:57:14,117 [qtp32485379-82] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=4558050-". 2014-01-08 13:57:15,352 [qtp32485379-83] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=85267932-". 2014-01-08 13:57:15,685 [qtp32485379-85] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=4754410-". 2014-01-08 13:57:15,896 [qtp32485379-87] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=85267932-". 2014-01-08 13:57:16,229 [qtp32485379-86] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=4754410-". 2014-01-08 13:57:16,435 [qtp32485379-82] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=85267932-". 2014-01-08 13:57:16,768 [qtp32485379-83] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=4754410-". 2014-01-08 13:57:16,980 [qtp32485379-85] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=85267932-". 2014-01-08 13:57:17,324 [qtp32485379-87] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=4754410-". 2014-01-08 13:57:17,546 [qtp32485379-86] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=85267932-". 2014-01-08 13:57:17,878 [qtp32485379-82] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=4754410-". 2014-01-08 13:57:18,089 [qtp32485379-83] DEBUG de.codewave.utils.servlet.StreamSender - Received range request with 'Range' header "bytes=85267932-".
This goes on and on. VLC requests the same ranges over and over again. After some seconds the requested ranges change but then the same ones are requests over and over again. Also for each of the requests I get an error in my server because VLC closes the connection before reading the complete response. So in fact VLC seems to request the same data over and over again but does not seem to be interested in the complete response.

Rémi Denis-Courmont
Developer
Developer
Posts: 15317
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Can someone explain VLC's strange HTTP Range Requests

Postby Rémi Denis-Courmont » 08 Jan 2014 19:05

VLC puts range requests even from offset 0 to determine if the server supports seeking. There are unfortunately no other ways with HTTP 1.x.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mdescher
Blank Cone
Blank Cone
Posts: 10
Joined: 04 May 2012 19:07

Re: Can someone explain VLC's strange HTTP Range Requests

Postby mdescher » 08 Jan 2014 19:36

What I am concerned about are the dozens of requests like

Received range request with 'Range' header "bytes=4754410-".

several per second

Rémi Denis-Courmont
Developer
Developer
Posts: 15317
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Can someone explain VLC's strange HTTP Range Requests

Postby Rémi Denis-Courmont » 08 Jan 2014 20:38

That looks normal. You'll need to be more specific.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mdescher
Blank Cone
Blank Cone
Posts: 10
Joined: 04 May 2012 19:07

Re: Can someone explain VLC's strange HTTP Range Requests

Postby mdescher » 08 Jan 2014 20:46

One such request would be okay for me. But why is it requesting the exact same range 20 or 30 times and never reads the complete response?

meinhard
New Cone
New Cone
Posts: 1
Joined: 17 Jul 2016 00:46

Re: Can someone explain VLC's strange HTTP Range Requests

Postby meinhard » 17 Jul 2016 00:54

same issue here. @mdescher: did you find the cause of this?

i am writing my own http server for answering range requests and did follow the rfc guidelines.

from vlc i get these debug message after the second or third seek (vlc stops playback at this point, buffers the whole file and shows corrupt video data):

[00007feef0000e88] http access error: failed to read answer
[00007feef0000e88] http access error: seek failed

on the server i receive tons of range requests like this (from my debug log):

[17-Jul-2016 00:33:46 Europe/Berlin] range: 8537303-
[17-Jul-2016 00:33:46 Europe/Berlin] range: 8590597-
[17-Jul-2016 00:33:46 Europe/Berlin] range: 8537303-
[17-Jul-2016 00:33:46 Europe/Berlin] range: 8590597-
[17-Jul-2016 00:33:46 Europe/Berlin] range: 8537303-
[17-Jul-2016 00:33:47 Europe/Berlin] range: 8594348-
[17-Jul-2016 00:33:47 Europe/Berlin] range: 8537303-
[17-Jul-2016 00:33:47 Europe/Berlin] range: 8594348-
[17-Jul-2016 00:33:47 Europe/Berlin] range: 8537303-
[17-Jul-2016 00:33:47 Europe/Berlin] range: 8594348-

when opening the same stream with chromium, the seeking behaviour looks normal.

vlc version: 2.2.2, ubuntu 16.04

any ideas?

Rémi Denis-Courmont
Developer
Developer
Posts: 15317
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Can someone explain VLC's strange HTTP Range Requests

Postby Rémi Denis-Courmont » 17 Jul 2016 09:24

That error means the server connection failed before VLC could receive the HTTP response header.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 37 guests