Specify custom HTTP header / HTTP referrer for XBMC to use when opening video stream?
#1
Question 
I'm currently not able to stream a video in XBMC due to a missing HTTP 'Referer' header.

The file is:
http://openmedia.yale.edu/cgi-bin/open_y...011607.mov

It requires a Referer header in order to return the video stream, see below:

Without the referer header:
Code:
$ curl -i "http://openmedia.yale.edu/cgi-bin/open_yale/media_downloader.cgi?file=/courses/spring07/astr160/mov/astr160_01_011607.mov"
HTTP/1.1 200 OK
Date: Sun, 09 Jan 2011 04:52:02 GMT
Server: Apache/2.2.3 (Red Hat)
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

No file available for download.

With referer:
Code:
$ curl -I -e "http://oyc.yale.edu/astronomy/frontiers-and-controversies-in-astrophysics/content/downloads" "http://openmedia.yale.edu/cgi-bin/open_yale/media_downloader.cgi?file=/courses/spring07/astr160/mov/astr160_01_011607.mov"
HTTP/1.1 200 OK
Date: Sun, 09 Jan 2011 04:52:57 GMT
Server: Apache/2.2.3 (Red Hat)
Content-Disposition: attachment; filename="astr160_01_011607.mov"
Connection: close
Content-Type: application/octet-stream

How can I remedy this situation? Can I add a custom HTTP header somehow? Should I download the video myself and play from disk?

Thanks,
Jon

xbmc.log
Reply
#2
Randomly found the answer to my question while reading ticket #8971

Found this blurb in one of the comments:
Quote:Currently we support protocol options by adding a pipe symbol after the url (used for http user agent).

So if anyone else has this question, simply append 'key=val' after a '|' to the end of your url.

Code:
http://openmedia.yale.edu/cgi-bin/open_yale/media_downloader.cgi?file=/courses/spring07/astr160/mov/astr160_01_011607.mov|referer=http://oyc.yale.edu/astronomy/frontiers-and-controversies-in-astrophysics/content/downloads
Reply
#3
Thumbs Up 
Thanks!
This helped a lot! Smile
Reply
#4
thnks jbel
that simple answer helped me too a lot Smile
Reply
#5
I cannt play this, can you help me with this stream:

GET http://193.124.176.120/swf/130.m3u8?sf=d...kCsyHX1i9w HTTP/1.1
Host: 193.124.176.120
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
X-Requested-With: ShockwaveFlash/24.0.0.186
Accept: */*
Referer: http://bro.adca.st/stream.php?id=130&cac...rm&p=1&c=0
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
If-None-Match: "5878f00f-212"
If-Modified-Since: Fri, 13 Jan 2017 15:19:43 GMT

on vlc working fine like this:

#EXTM3U
#EXTINF:0, Sky Sports 1
#EXTVLCOPT:http-referrer=http://bro.adca.st/stream.php?id=130&cache=4&width=100%&height=100%&stretching=uniform&p=1&c=0
#EXTVLCOPT:http-user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
http://193.124.176.120/swf/130.m3u8?sf=d...kCsyHX1i9w

but in kodi not working like this:

#EXTM3U

#EXTINF:0, Sky Sports 1
http://193.124.176.120/swf/130.m3u8?sf=d...rm&p=1&c=0
Reply

Logout Mark Read Team Forum Stats Members Help
Specify custom HTTP header / HTTP referrer for XBMC to use when opening video stream?0