title: How would I resize and compress a video in cloud functions
body: <p>I've seen everywhere how to achieve the goal of the title but for images. I was just wondering how I'd do the same with videos? I'm making an app that only involves uploading videos of maximum 30 seconds, not images (apart from the users profile picture) and I need some way of:</p>
  
  <ol>
  <li>Resizing the video so all videos have the same resolution and size on all iPhones</li>
  <li>Compressing the video so if someone uploads a full 30 second clip in 4K then it won't take my whole storage bucket. </li>
  <li>Limit each video to 50MB in size but always prefer to keep HD quality.</li>
  </ol>
  
  <p>How would I do this?</p>
  
  <p>Thanks,
  Nathan</p>