media_get_attr — retrieve the requested parameter for the specified media file
use Wacs;
use Wacs::WacsId;
scalar media_get_attr( | filename, | |
attribute) ; |
scalar filename
;scalar attribute
;parameter | description |
---|---|
height | The height of the video/photo in pixels |
width | The width of the video/photo in pixels |
format | The format of the file: JPEG, PNG, TIFF for images; MOV, MPEG, WMV, for videos |
codec | The Codec format used - Windows Media, MPEG-2, etc |
duration | The running time of a video clip |
creation | The creation date in the corrext format for the current database |
resolution | Text name of the resolution: LD, SD, ID, HD, UHD, Mobile etc |
aspectratio | The actual numeric aspect ratio as a decimal number |
aspect | The generalised aspect ratio expressed as a ratio: 4:3, 16:9, etc |
durhrs | The video clip duration broken up into parts - the hours component |
durmin | The video clip duration - the minutes component |
dursec | The video clip duration - the seconds component |
The media_get_attr
function fetches the
specified result (attribute) of the media file named in the filename
parameter. This is the filename provided by a previously run call
to media scan to perform the actual scan itself. A number of different
media scans can be queried at the same time so long as they do not have
the same file name. The results are all obtained and stored during the
media_scan call and are simply retrieved from a results array when
using media_get_attr
.