title: How to combine video and audio through API or JS?
body: <p>I am working to design a system which does the following:</p>
  
  <ol>
  <li><p>User uploads a video, JS code finds the length of the video.</p></li>
  <li><p>Performs HTTP calls to an already-existing service to retrieve an audio track of the same length.</p></li>
  <li><p>Synchronize and combine the audio and video (which are the exact same length). The best thing I could think to do is to play them both at the same time (entirely doable with HTML5), but I want to be able to have a user download a combined file, or be able to say... upload it to YouTube through their API.</p></li>
  </ol>
  
  <p>I have been doing lots of googling, and so far have not found any services or code which might be able to do this.</p>
  
  <p>I am familiar with JavaScript, Ruby on Rails, HTML, CSS, jQuery, and both AngularJS and Backbone.js. If a solution exists in one of those languages, or perhaps something I can access through HTTP, that would be wonderful.</p>