阅读背景:

Node handbrakejs运行代码但不输出

来源:互联网 

So I have the following code:

所以我有以下代码:

    var hbjs = require('handbrake-js');
    var encodingOptions = {
        input: media.file.path,
        output:  media.targetDir+"helloWorld.m4v",
        quality: 17,
        optimize: '',
        encoder: "x264"
    };
    hbjs.spawn(encodingOptions)
        .on("begin",function(){
            console.log('begin')
        })
        .on("error", function(err){
            // invalid user input, no video found etc
            console.log('error!')
        })
        .on("progress", function(progress){
            console.log(
                "Percent complete: %s, ETA: %s",
                progress.percentComplete,
                progress.eta
            );
        })
        .on("complete", function (complete) {
            console.log('hello');
        })
   



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: