https://stackoverflow.com/questions/...-ffmpeg-output
here are some interesting ideas to try -- you don't need php
Code:
The program 'avconv' is currently not installed. You can install it by typing:
sudo apt install libav-tools
...pvid/porno$ avconv -i \
Wife_sharing_her_husband_with_horny_lesbian_friend_Video.flv\
2>&1 | grep Duration | sed 's/Duration: \(.*\), start.*/\1/g'
00:39:16.04