In javascript this is very limited for security reasons.
The size I know is possible through this.files[0].size
and the name, through this.files[0].name
used an event handler in jQuery. Then to format to be noticeable you can use a function like this:
function humanFileSize(bytes, si) {
var thresh = si ? 1000 : 1024;
if(bytes < thresh) return bytes + ' B';
var units = si ? ['kB','MB','GB','TB','PB','EB','ZB','YB'] : ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];
var u = -1;
do {
bytes /= thresh;
++u;
} while(bytes >= thresh);
return bytes.toFixed(1)+' '+units[u];
};
Example: link
In PHP I found this answer which suggests a external library getID3 that supports different formats. Taking a look at the page supports the most common formats.
So in PHP it would be:
$getID3 = new getID3;
$file = $getID3->analyze($filename);
echo("Duration: ".$file['playtime_string'].
" / Dimensions: ".$file['video']['resolution_x']." wide by ".$file['video']['resolution_y']." tall".
" / Filesize: ".$file['filesize']." bytes<br />");