Linux play video as you download
#1
Just like to know if it is possible to play video on xbmc as you download them or do you still have wait till the whole media file is fully downloaded? the media is of type "real media"

Sorry for nooby question but how does xbmc player handle the stream given that it is also not 100% fully formed file.
Reply
#2
(2013-05-17, 03:51)tweakmy Wrote: how does xbmc player handle the stream given that it is also not 100% fully formed file.
What part of the code is it that you do not understand?
Reply
#3
It uses the 'Content-Range' http header to only fetch the currently interesting portion of the file from the server. Live streams work basically the same, but the protocol used is different
Reply
#4
thank you very much for the answer for http
But does it work the same for local file?

What happen is that I am downloading a media file through propietary connection and it is not http(the network stream works like the teamviewer) where they can bypass firewall. Nobody could decode the file transfers method they use. Many had guess but they guess it wrong.

However, I would like to know the possibility of play a local file which is being downloaded? any thoughts.

I tried using ffmpeg to play the file before but ffmpeg do not wait for section/segment(or I dont know how to configure it) and the section/segment where it had not fully completed would become distorted otherwise audio works great.
Reply
#5
We also play recordings which are still recording. I think this use case is similar to yours, right? As long as we don't get eof or error on read we continue reading. ffmpeg has no problem with this.
The issue is that length of the file may not be re-evaluated by the input stream. This results in wrong display times and progress bar. Seeking using percentage may also fail.

Quote:that it is also not 100% fully formed file.

I missed this in the first post. You would need to create some input method which knows how to deal with whatever the format is.
Reply
#6
(2013-05-20, 16:13)FernetMenta Wrote: We also play recordings which are still recording. I think this use case is similar to yours, right? As long as we don't get eof or error on read we continue reading. ffmpeg has no problem with this.
The issue is that length of the file may not be re-evaluated by the input stream. This results in wrong display times and progress bar. Seeking using percentage may also fail.

Quote:that it is also not 100% fully formed file.

I missed this in the first post. You would need to create some input method which knows how to deal with whatever the format is.

I didnt understand about the input method? Can you give some examples? The file that I normally worked for now is of rmvb format.
Reply
#7
For a local file it uses the OS's seek implementation to jump to the correct part of the file. Unfortunately, if you jump to a part of the file which hasn't been written yet, it gives an error on read which causes it to fail.
Reply

Logout Mark Read Team Forum Stats Members Help
play video as you download0