Publitio Player has built-in error messaging. One message that may pop-up when trying to play your video is "Media Temporarily Unavailable" message as in image bellow:
The player will show this message after a 10 seconds timeout if it is unable to play the requested video. Sometimes the requested video may be broken (failed conversion) or the media server may go down briefly (big load, maintenance, etc.), but most of the times when you may see this message is during copying (caching) of the requested video from our object (cold) storage to local server (hot storage). If this copying (caching) process takes longer than 10 seconds this message may appear. After a few moments and a simple reload of the page message will be gone.
How does file caching work?
Once the file is requested via media.publit.io, we first check if a copy of the local file is present, if not we will copy (cache) file from object (cold) storage to local (hot) storage. If the file is present on local storage we will play/stream it to the browser right away. Files are getting purged (deleted) from local copy (cache) after 5 days of inactivity (no requests to file). If the file has been purged from local copy, on the next request we will repeat caching (copying) process of a file.
How long can copying (caching) of a file take?
Caching of files from object to local storage happens almost instantly for small files (like images or short clips). However, long videos (from 30-120 minutes in length) are also big in size (500-1000 MB in size) and copying of that large file can take 20-30 seconds sometimes. If the requested video is in HLS format, size can be up to 2GB so this copying process takes then even longer time (as HLS videos are packed as zip files and we need to unpack & prepare them for streaming on local storage).
Can this caching process be improved?
YES! Our engineers are constantly working on improving and speeding up this whole process. In the meantime, it really comes down to a little bit of patience and understanding how this process works: 1 request to file creates cached version of file for serving of next 1000+ requests, and after some time cache from local storage can be purged and this process may repeat.
Comments
0 comments
Please sign in to leave a comment.