User agent not being passed to ffmpeg - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167) +--- Thread: User agent not being passed to ffmpeg (/showthread.php?tid=345263) |
User agent not being passed to ffmpeg - ShadowShack - 2019-07-09 I have a m3u link that needs a specific user agent to run. I added the user agent at the end of the stream link like so Quote:stream link|user-agent=myuseragentThis works.. As i get a 200 success status code (I used to get 403 unauthorized without the user agent before) But what happens is that this stream link gets the stream chunks from another host that also needs the same user agent. This is handled by ffmpeg(I think. SInce the error log showed [ffmpeg] prefix). Kodi is not passing the user agent to ffmpeg which is where I am getting a 403 unauthorized status code again. (got this info from the log) Is there any way I can fix the issue? I looked into the source code of kodi and found out there is a file which sets headers for ffmpeg. Any help would be appreciated. I am using OSMC on RPi 3b+ RE: User agent not being passed to ffmpeg - ShadowShack - 2019-07-09 I am using PVR Simple IPTV plugin. RE: User agent not being passed to ffmpeg - shamanNS - 2019-11-06 The problem is here: https://github.com/xbmc/xbmc/blob/master/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp#L246-L250 That code path is not being used when playing HTTP URLs through PVR IPTV Simple addon so the User-Agent and other HTTP headers are not passed down to ffmpeg (cURL uses them when making a request to check for media type). It is used when you playback your URL as a ".strm" file or playback your m3u playlist outside of PVR addon. You can easily confirm that fact: add you playlist (or .strm file with single link) to Kodi's playlist folder and them play it.. it should work. No idea what stream type value is set by official version od PVR IPTV Simple addon but it clearly isn't "DVDSTREAM_TYPE_FFMPEG". I'm using a Kodi fork together with a PVR IPTV Simple fork both originally made by CoreELEC devs to enable "archive/cutv/ server based timeshift" functionality and when in PVR addon settings you enable "archive" functionality the stream type gets set as "DVDSTREAM_TYPE_PVR_ARCHIVE" (that doesn't exist in official Kodi code base!) so I've also made changes to that code blocked linked at the above URL to make it forward HTTP headers to ffmpeg. And now headers are being forwarded when using PVR addon. RE: User agent not being passed to ffmpeg - phunkyfish - 2019-11-07 Can you give link example link that doesn’t work? If it’s an m3u8 file it should be handled by the ffmpeg input stream. If it’s not being handled correctly there is something different about the link. RE: User agent not being passed to ffmpeg - boogiepop - 2020-10-28 i dont want to necrro but for future reerence, i can confirm that with iptvsimple client ver 3.9.8, with kodi ver 18.9, header parameteres are are ignored by ffmpeg but taken into consideration in libbcurl. see below log: Code: 2020-10-27 23:37:49.177 T:139727801923328 INFO: ffmpeg[7F14E9FFB700]: [hls,applehttp] Opening 'https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1603859868/ei/PKGYX7H1J8qzgAeZ5r7YCQ/ip/188.194.212.160/id/deKH0pQ7-rg.1/itag/96/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D137/hls_chunk_host/r1---sn-h0jeenek.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/mh/Gz/mm/44/mn/sn-h0jeenek/ms/lva/mv/u/mvi/1/pl/24/dover/11/keepalive/yes/beids/23886215/mt/1603837762/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,goi,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRQIgBE_JQph58j4KKWzim9UgY-eLppuIS4FniI7Zp1ESATACIQCBkMJP5urNTqZOxjx2UubVoZV_vJ-W8rmECOpRysVpWA%3D%3D/lsparams/hls_chunk_host,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRQIhAMTMh1bHfCrBGQo2TruGirigWeAaJ65ixFe2Tw-dWulpAiBJoP70yvX8Lnjo8oYUl4CjN0uUVVVgUOa66rNu3Qrs5w%3D%3D/playlist/index.m3u8|User-Agent=Mozilla%2F5.0+%28X11%3B+Ubuntu%3B+Linux+x86_64%3B+rv%3A78.0%29+Gecko%2F20100101+Firefox%2F78.0' for reading |