Skip to content

Commit

Permalink
Enable faststart for videos
Browse files Browse the repository at this point in the history
Fixes #4
  • Loading branch information
tribut authored and rprieto committed Jun 18, 2018
1 parent f8c62c0 commit 1a79451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ exports.video = function (source, target, options, callback) {
// create target folder if needed
mkdirp.sync(path.dirname(target))
// always output to mp4 which is well read on the web
const args = ['-i', source, '-r', '25', '-vsync', '2', '-y', target, '-f', 'mp4', '-vcodec', 'libx264', '-ab', '96k']
const args = ['-i', source, '-r', '25', '-vsync', '2', '-movflags', '+faststart', '-y', target, '-f', 'mp4', '-vcodec', 'libx264', '-ab', '96k']
// AVCHD/MTS videos need a full-frame export to avoid interlacing artefacts
if (path.extname(source).toLowerCase() === '.mts') {
args.push('-vf', 'yadif=1', '-qscale:v', '4')
Expand Down

0 comments on commit 1a79451

Please sign in to comment.