I allow my users to upload videos to the website and each file is checked by a php script to see if it's a valid video file. This includes frame rate, resolution, video length, mime type.
A few days ago I got a message from one user that he can not upload 3gp video files from his mobile phone (3gp is default video format in his ZTE phone).
The mime type of 3gp files should be "video/3gpp" but in reality it's "application/octet-stream".
I tried:
$ftyp = mime_content_type($uploaded_file);
and
$finfo = new finfo;
$ftyp = $finfo->file($uploaded_file, FILEINFO_MIME_TYPE);
Both report that "application/octet-stream" is the mime type of 3gp video files.
My question are:
1) I am doing sometging wrong or 3gp files really have this mime type (or don't have any mime type at all).
2) How can I check these files to see that they are video files? If I allow to upload any "application/octet-stream" files, the users will be able to upload pdf, doc etc files that have the same mime type.