Posts: 964
Joined: Aug 2009
Reputation:
27
Popeye
Posting Freak
Posts: 964
I wounder if anyone of the developers could explain why it's not possible to start playing partial rar sets of movies? Is it on purpose or ?
I have tested and verified its possible to trick XBMC to start playing a movie by creating empty rar files (only 7 byte rar header). Once started its possible to remove all empty files.
Apparently XBMC scans for the files at start and only plays a few frames if the set is not complete.
Anyone got any pointers to the code where this might be fixed?
Background: Have developed a nzb streaming addon and would really like to skip tricking XBMC to play partial rar sets...
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
it's actually almost supported.
see FileRar.cpp l174. 'noidx' refers to mplayer -noidx from the xbox days.
you need to use this code to set the the is_streamed flag in the demuxer, see DVDDemuxFFmpeg.cpp l310
Posts: 964
Joined: Aug 2009
Reputation:
27
Popeye
Posting Freak
Posts: 964
Thanks! I'll look into if I understand anything ;D
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
not really, the SEEK_POSSIBLE is the new wine, written after the code you quote. basically, you have to do that test when SEEK_POSSIBLE is performed, and return false if we can't seek. the is_streamed flag should then be set iirc and all is good.
Posts: 964
Joined: Aug 2009
Reputation:
27
Popeye
Posting Freak
Posts: 964
Does the is_streamed flag stop you from jumping/seeking in the stream?
Is the SEEK_POSSIBLE test really correct to do? in the case of a incomplete rar set, from the moment the movie start it's just possible to seek to the end of the last downloaded rar, but this is constantly changing as the download continues..
Actually I'm not 100% sure what happens when I make the "fake" rars ...
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
is_streamed is the way to go about it. it will
1) allow growing files
2) disable seeking.
in particular for avi's, where the index is stored at the end of the file, 2) is imperative. if it's not done, an index will be calculated, only containing entries for the data that was avail when the index is created, thus you can't have growing files.