i wonder how progressive videostreambuffering works. Currently i try to create a media player for Android that is able to play progressive streamed video files. For that i use vitamio library. Its a very powerfull Android medialibrary. It also supports progressive straming and several videoformats. The only Problem with vitamio is that it dos not continue buffering when you Pause the playback. So you are not able to watch videos on slow networks.
So my current workaround to solve this is open a httpinputstream to the videofile i want to stream. Then i read the size of the videofile. Let's say it is 80MB. Then i create an empty dummyfile on my hdd with exactly this size (80MB). This file is currently filled up with zeros. Then i start to read the data from the httpinputstream and overwrite the dummyfile from . If i have 10MB downloaded i put this file into the videoplayer and start playback. In this moment the videofile on my hdd is still 80MB big but the readable and valid videodata are 10MB. During playback i continue downloading and filling up the dummy file until it is done.
Sometimes this works very good and sometimes not. The playback stops with several errors (frame not found and so on) although the play position is at 5% and the download has been 15%yet. It does not work very reliable and i cannot imagine that this is the common way of progressive streaming. So my question is: how does this technically work? What differs my method of progressive streaming from the common way?
thank you