diff --git a/core/config.js b/core/config.js index 7dede1c5..449a5c98 100644 --- a/core/config.js +++ b/core/config.js @@ -321,6 +321,24 @@ function getDefaultConfig() { longDescUtil : 'Exiftool', }, // + // Video + // + 'video/mp4' : { + desc : 'MPEG Video', + shortDescUtil : 'Exiftool2Desc', + longDescUtil : 'Exiftool', + }, + 'video/x-matroska ' : { + desc : 'Matroska Video', + shortDescUtil : 'Exiftool2Desc', + longDescUtil : 'Exiftool', + }, + 'video/x-msvideo' : { + desc : 'Audio Video Interleave', + shortDescUtil : 'Exiftool2Desc', + longDescUtil : 'Exiftool', + }, + // // Images // 'image/jpeg' : { diff --git a/util/exiftool2desc.js b/util/exiftool2desc.js index d94f5d75..210c800d 100755 --- a/util/exiftool2desc.js +++ b/util/exiftool2desc.js @@ -17,6 +17,7 @@ const FILETYPE_HANDLERS = {}; [ 'AIFF', 'APE', 'FLAC', 'OGG', 'MP3' ].forEach(ext => FILETYPE_HANDLERS[ext] = audioFile); [ 'PDF', 'DOC', 'DOCX', 'DOCM', 'ODB', 'ODC', 'ODF', 'ODG', 'ODI', 'ODP', 'ODS', 'ODT' ].forEach(ext => FILETYPE_HANDLERS[ext] = documentFile); [ 'PNG', 'JPEG', 'GIF', 'WEBP', 'XCF' ].forEach(ext => FILETYPE_HANDLERS[ext] = imageFile); +[ 'MP4', 'MOV', 'AVI', 'MKV', 'MPG', 'MPEG', 'M4V', 'WMV' ].forEach(ext => FILETYPE_HANDLERS[ext] = videoFile); function audioFile(metadata) { // nothing if we don't know at least the author or title @@ -32,6 +33,10 @@ function audioFile(metadata) { return desc; } +function videoFile(metadata) { + return `${metadata.fileType} video(${metadata.imageSize}px, ${metadata.duration}, ${metadata.audioBitsPerSample}/${metadata.audioSampleRate} audio)`; +} + function documentFile(metadata) { // nothing if we don't know at least the author or title if(!metadata.author && !metadata.title) {