soycharliente Posted April 21, 2010 Share Posted April 21, 2010 Is it possible to find the length of a video file using PHP before the file is uploaded to the server through a form? I found this thread, but that seems to be more about doing in manually via the command line. Quote Link to comment https://forums.phpfreaks.com/topic/199290-length-of-video-file/ Share on other sites More sharing options...
premiso Posted April 21, 2010 Share Posted April 21, 2010 You will most likely use the command line via the system or exec commands, as you will need access to ffmpeg to retrieve it. As far as I am aware, PHP does not have this support built into PHP. Use the commandline guide you posted, just run a system / exec command. I would store the retrieved value in the database that way you are not constantly running it on video files, if you have a database backend. Only update it if the video has been updated. Quote Link to comment https://forums.phpfreaks.com/topic/199290-length-of-video-file/#findComment-1046039 Share on other sites More sharing options...
soycharliente Posted April 21, 2010 Author Share Posted April 21, 2010 Sounds to be exactly what I need and fairly straight forward. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/199290-length-of-video-file/#findComment-1046046 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.