title: Detect Video Duration on Upload
body: <p>Have a WordPress Gravity Forms standard upload field where users can upload a video file.</p>
  
  <p>I'd like to limit uploads to be 60 seconds or less. If I can get the number of seconds of the uploaded video into a php variable, I should be able to take care of the validation from there.</p>
  
  <p>This SO shows how to do it in javascript (though that example seems to work in Chrome but not Safari) <a href="https://stackoverflow.com/questions/27550529/how-to-check-length-duration-of-an-uploaded-video-in-javascript">How to Check Length / Duration of an Uploaded Video in JavaScript</a>. Getting that javascript value to php would be a challenge I imagine, so hoping to find more a php solution if possible to be used in a custom wordpress function?</p>
  
  <p>Unless there is a way to get that javascript seconds value into php. I saw a question using, "ffmpeg" but that was for a video already uploaded this would be for validating before form submission.</p>
  
  <p>While noted above, just adding again this is in regards to accomplishing it in PHP (the other questions I've seen are in regards to accomplishing in javascript) and ultimately I need the value sent to a php wordpress function.</p>