Support for "m2ts" format (and smaller video example)

pull/28/head
Romain Prieto 10 years ago
parent 066024070e
commit 1ca3cfe7df

Binary file not shown.

Binary file not shown.

@ -49,7 +49,7 @@ exports.build = function(opts) {
buildStep({
condition: opts.originalVideos,
message: 'Original videos',
ext: 'mp4|mov|mts',
ext: 'mp4|mov|mts|m2ts',
dest: '/original/$path/$name.$ext',
func: copyFile
}),
@ -70,21 +70,21 @@ exports.build = function(opts) {
buildStep({
message: 'Videos (resized)',
ext: 'mp4|mov|mts',
ext: 'mp4|mov|mts|m2ts',
dest: '/large/$path/$name.mp4',
func: thumbs.videoWeb
}),
buildStep({
message: 'Videos (poster)',
ext: 'mp4|mov|mts',
ext: 'mp4|mov|mts|m2ts',
dest: '/large/$path/$name.jpg',
func: thumbs.videoLarge
}),
buildStep({
message: 'Videos (thumbs)',
ext: 'mp4|mov|mts',
ext: 'mp4|mov|mts|m2ts',
dest: '/thumbs/$path/$name.jpg',
func: thumbs.videoSquare
}),

@ -27,7 +27,7 @@ exports.update = function(opts, callback) {
nonull: false,
nocase: true
};
glob('**/*.{jpg,jpeg,png,mp4,mov,mts}', globOptions, callback);
glob('**/*.{jpg,jpeg,png,mp4,mov,mts,m2ts}', globOptions, callback);
}
function pathAndDate(filePath, next) {
@ -72,7 +72,7 @@ exports.update = function(opts, callback) {
}
function mediaType(fileInfo) {
return fileInfo.relative.match(/\.(mp4|mov|mts)$/i) ? 'video' : 'photo';
return fileInfo.relative.match(/\.(mp4|mov|mts|m2ts)$/i) ? 'video' : 'photo';
}
function writeToDisk() {

@ -69,12 +69,6 @@ exports.videoSquare = function(task, callback) {
metadata: task.metadata
}, next);
}
// exports.videoLarge.bind(this, task),
// exports.photoSquare.bind(this, {
// src: task.dest,
// dest: task.dest,
// metadata: {exif: {}}
// })
], callback);
};

Loading…
Cancel
Save