Sunday 1 November 2015

BRAINSTORM: Building an in-expensive Digital Media Advertisement Solution

Pre-requisits:
  • 1080p HDMI-TV
  • A Good Cheap WIFI capable Android Mini-PC, those from Allwinner or Rockchip will do the trick, but i did mine on an Intel Compute Stick and the Nvidia TK1 which is good enough to display 1080p.
  • A Internet Host, maybe Digital Ocean's $5 a month 1Core, 512MB, 20GB HDD Ubuntu Server
  • Python running Tornado
    - API to get a playlist
    - Websocket for push so we can send commands to the device
    - Dashboard so we can get those realtime analytics
    - CMS for maybe advertisers or content owners to slot in their videos/still images
  • Rethink.DB to update our RealTime Dashboard
  • Normally i will recommend a HYBRID app on this but rule of thumb for me if you're to use webview, make sure they are only simple and minimal css, else it'll screw up everything. So I think i'll stick with NATIVE on this.
The Solution:
  • Android App that will first login using their device-id which is registered with the server, this is to identify the device's location and what kind of content we could display on it, we don't want M18 content to be delivered to PG locations wouldn't we...
  • Once connection is established with the server and device identified, the correct playlist will be sent to the device for parsing
  • The Device will store the parsed playlist (json format), store it on a sqlite database for easier retrieval.
  • The Device then will execute the first item on the playlist in-which it will check if the content is available locally, if it does then display it else it will initiate a background download and move on to the next item in the playlist, if the next item is also not available locally, it will then schedule download for this item and this loops goes on till the end of the list. While waiting for download, it will display a default image or animation with the progressbar for each of the content download. As soon as the first content is completely downloaded it will playback that content.
  • At any given time if the device receive a websocket request, it will check for try to decode it using the PSK that it's embedded with if the decode is good, then it will execute the command, there are 3 types of commands:-
    - background task (executes after download and current item is playist has played)
    - foreground task (happens immediately, regardless of content status)
    - scheduled task (happens immediately if the schedule time has reached)
  • The media display will have 6 display elements:-
    - Title / Text (Size)
    - content 1 / image (url/duration) ,text (size), video (url/start/end)
    - content 2 / image (url/duration) ,text (size), video (url/start/end)
    - content 3 / image (url/duration) ,text (size), video (url/start/end)
    - Background Image for Title
    - Font (ttf only)
  • After each playback the app will thru websocket send a play done with their device-id which the server will write into Rethink.db which will have an event to update the realtime dashboard in which the content owner can monitor.
  • Next is the content owners CMS which enables them to create playlist based on a grouping of device-id. Upload of Images/videos and such can be stored to the server or thru certain APIs to dropbox or some other online storage services (google drive, skydrive, etc...) just make sure it's publicly available so that the android boxes can download them later.
Well this is all i can think of for now... I think all this can be done within a week if i really try, let's see what i end up with ...


No comments:

Post a Comment