Kodi Community Forum

Full Version: Streaming over http: a question to Kodi developers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
While developing my YATP plugin, I've noticed that when playing videofiles via http Kodi usually issues 3 http requests: 1 HEAD, and 2 GETs. The 1-st HEAD is to check if a videofile is available and to request its metadata, the 2-nd requests the file for playback and contaings 'Range' header from the beginning of the file, and the 3-rg request check the end of the file (using a 'Range' request close to the end of the file) if it is actually available. For mp4 and mkv files this "end check" requests exactly 64 KB (65536 bytes) from the end of the file. But for avi files the situation is different. It seems that dealing with avi files Kodi determines a range for the "end check" on case by case basis, because I've seen different values - from somewhere around 200 KB to more than 5 MB.
So I have a question to Kodi developers: how Kodi determines a range to be requested at the end of an .avi videofile, and what is the maximum range that Kodi can request from an .avi file when doing this "end check"?