I was thinking of categorizing HD clips into a folder and thought it could be done using the function below. The function returns the width and height of a video, so I thought I can use that to add those videos that are 720 or more into that HD folder.
Does this work, or have I forgot to think about something else?
For example, if you have stretched / re-encoded a video to 720, then this will not be a good method for finding videos with good quality I guess.
Hi @qrazyneo1, if you want to be really sure perhaps ffmpeg should come to the rescue but you will need a server to handle it. Otherwise you may be able to find a somewhat reliable formula combining resolution, file size and duration.
I took a look at it but have some trouble getting stderr into a text file.
The code below works from shell / promt, but not when I run it through php. However, it works through php if I ignore “2> out.txt”, which is the line that writes the output to the text file. (So it’s necessary)