title: Architecture for streaming an endless video queue with mysql datasource
body: <p>right now i'm building a webinterface. It should be something like a media control system. In this interface a user can select some vid's from a coverflow'ish style and put the videos in a queue. The queue is visualized like a timeline. This interface is webbased, made with TYPO3 FLOW. So i got in my database data to play/stream.</p>
  
  <p>I'm trying to figure out how to stream my selected data. I'd prefer a webbased solution but i'm open for everything.</p>
  
  <p>Could anyone please give me a hint what kind of technique would fit best? This is what i need:</p>
  
  <ul>
  <li>the playlist/queue is stored in a database (not the videos itself but the meta-data and file-urls)</li>
  <li>people can add items to the queue over a webinterface (already implemented)</li>
  <li>if the queue / playlist is empty i'd like to play some random videos</li>
  <li>if someone adds a video to the playlist / queue this video needs to be played at a given time (mostly now()+60sec if the queue is empty, endtime last clip +x when not)</li>
  <li>if i open the stream while a video is started in the queue the video should start at that time should be at</li>
  </ul>
  
  <p>So i need to stream dynamicly videos with in an endless loop. I'd love to have a webbased solution. Like something with node.js and vidStreamer.js but i'm not familiar with it yet. Would it be possible to play content dynamically, based on mysql input?</p>