I dealt with this issue in the past. In my case I was trying to retrieve info from an mp4 files: title, bitrate, size, framerate ...
I used mediainfo which is available for many platforms as a CLI. You can call mediainfo from PHP using exec() then retrieve the information from the output and parse for the information you are looking for.