title: ffmpeg convert any user video file to run on mobiles h264 mp4
body: <p>So, i have kind of accepted this task on work but im really not sure if its possible.</p>
  
  <p>We are going to build a website where users can upload videos from their computers and mobile phone browsers. The video files can be a large range of aspect ratios, width, height, codex and file formats. </p>
  
  <p>I will have access to ffmpeg from php exec command on a web server.</p>
  
  <p>Is it possible to use this to convert the user files to <strong>one</strong> file format that works on computers, android and iphone. </p>
  
  <p>The requirements is that we can set a max width, to witch the video will be scaled, dynamically to match height.</p>
  
  <p>Does anyone know is this can be done, and be done in a reasonable amount of time. Will do project on 2 days. And if so some pointers in the right direction would be nice.</p>