ffmpeg - make a video from image getting error












0















My code is - getting an error



error occured: ffmpeg exited with code 1: Invalid file index 1 in filtergraph description [0:v]fade=t=out:st=4:d=1[v0];[1:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1];[2:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2];[3:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3];[4:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4];[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v].



      ffmpeg().addInput(__dirname + '/test/fixtures/FullSizeRender-%1d.jpg')
.complexFilter(

[
'[0:v]fade=t=out:st=4:d=1[v0]',
'[1:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1]',
'[2:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2]',
'[3:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3]',
'[4:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4]',
'[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v]',

// {
// filter: 'zoompan',
// options: {

// x: 'iw/2-(iw/zoom/2)',
// y: 'ih/2-(ih/zoom/2)',
// z: 'if(lte(zoom,1.0),1.5,max(1.001,zoom-0.0040))',
// d: '125',
// s: "200x200",


// },
// },


]
)

.format('mp4')
.videoBitrate('1024k')
.videoCodec('mpeg4')
.output(finalVideoPath)
.on("error", function (er) {
console.log("error occured: " + er.message);
})
.on('end', function (data) {
console.log('Finished processing', data);

}).run();

});


}



please help me










share|improve this question























  • I don't know node.js at all, but it appears you have one input, however your filtergraph has 5 inputs. If you want to fade images like that you have to declare each image as a single input. An example ffmpeg command is shown in Create video with 5 images with fadeIn/out effect in ffmpeg.

    – llogan
    Nov 16 '18 at 18:06


















0















My code is - getting an error



error occured: ffmpeg exited with code 1: Invalid file index 1 in filtergraph description [0:v]fade=t=out:st=4:d=1[v0];[1:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1];[2:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2];[3:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3];[4:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4];[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v].



      ffmpeg().addInput(__dirname + '/test/fixtures/FullSizeRender-%1d.jpg')
.complexFilter(

[
'[0:v]fade=t=out:st=4:d=1[v0]',
'[1:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1]',
'[2:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2]',
'[3:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3]',
'[4:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4]',
'[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v]',

// {
// filter: 'zoompan',
// options: {

// x: 'iw/2-(iw/zoom/2)',
// y: 'ih/2-(ih/zoom/2)',
// z: 'if(lte(zoom,1.0),1.5,max(1.001,zoom-0.0040))',
// d: '125',
// s: "200x200",


// },
// },


]
)

.format('mp4')
.videoBitrate('1024k')
.videoCodec('mpeg4')
.output(finalVideoPath)
.on("error", function (er) {
console.log("error occured: " + er.message);
})
.on('end', function (data) {
console.log('Finished processing', data);

}).run();

});


}



please help me










share|improve this question























  • I don't know node.js at all, but it appears you have one input, however your filtergraph has 5 inputs. If you want to fade images like that you have to declare each image as a single input. An example ffmpeg command is shown in Create video with 5 images with fadeIn/out effect in ffmpeg.

    – llogan
    Nov 16 '18 at 18:06
















0












0








0








My code is - getting an error



error occured: ffmpeg exited with code 1: Invalid file index 1 in filtergraph description [0:v]fade=t=out:st=4:d=1[v0];[1:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1];[2:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2];[3:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3];[4:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4];[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v].



      ffmpeg().addInput(__dirname + '/test/fixtures/FullSizeRender-%1d.jpg')
.complexFilter(

[
'[0:v]fade=t=out:st=4:d=1[v0]',
'[1:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1]',
'[2:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2]',
'[3:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3]',
'[4:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4]',
'[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v]',

// {
// filter: 'zoompan',
// options: {

// x: 'iw/2-(iw/zoom/2)',
// y: 'ih/2-(ih/zoom/2)',
// z: 'if(lte(zoom,1.0),1.5,max(1.001,zoom-0.0040))',
// d: '125',
// s: "200x200",


// },
// },


]
)

.format('mp4')
.videoBitrate('1024k')
.videoCodec('mpeg4')
.output(finalVideoPath)
.on("error", function (er) {
console.log("error occured: " + er.message);
})
.on('end', function (data) {
console.log('Finished processing', data);

}).run();

});


}



please help me










share|improve this question














My code is - getting an error



error occured: ffmpeg exited with code 1: Invalid file index 1 in filtergraph description [0:v]fade=t=out:st=4:d=1[v0];[1:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1];[2:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2];[3:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3];[4:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4];[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v].



      ffmpeg().addInput(__dirname + '/test/fixtures/FullSizeRender-%1d.jpg')
.complexFilter(

[
'[0:v]fade=t=out:st=4:d=1[v0]',
'[1:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1]',
'[2:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2]',
'[3:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3]',
'[4:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4]',
'[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v]',

// {
// filter: 'zoompan',
// options: {

// x: 'iw/2-(iw/zoom/2)',
// y: 'ih/2-(ih/zoom/2)',
// z: 'if(lte(zoom,1.0),1.5,max(1.001,zoom-0.0040))',
// d: '125',
// s: "200x200",


// },
// },


]
)

.format('mp4')
.videoBitrate('1024k')
.videoCodec('mpeg4')
.output(finalVideoPath)
.on("error", function (er) {
console.log("error occured: " + er.message);
})
.on('end', function (data) {
console.log('Finished processing', data);

}).run();

});


}



please help me







node.js ffmpeg






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 16 '18 at 5:53









Pramod GehlotPramod Gehlot

1211212




1211212













  • I don't know node.js at all, but it appears you have one input, however your filtergraph has 5 inputs. If you want to fade images like that you have to declare each image as a single input. An example ffmpeg command is shown in Create video with 5 images with fadeIn/out effect in ffmpeg.

    – llogan
    Nov 16 '18 at 18:06





















  • I don't know node.js at all, but it appears you have one input, however your filtergraph has 5 inputs. If you want to fade images like that you have to declare each image as a single input. An example ffmpeg command is shown in Create video with 5 images with fadeIn/out effect in ffmpeg.

    – llogan
    Nov 16 '18 at 18:06



















I don't know node.js at all, but it appears you have one input, however your filtergraph has 5 inputs. If you want to fade images like that you have to declare each image as a single input. An example ffmpeg command is shown in Create video with 5 images with fadeIn/out effect in ffmpeg.

– llogan
Nov 16 '18 at 18:06







I don't know node.js at all, but it appears you have one input, however your filtergraph has 5 inputs. If you want to fade images like that you have to declare each image as a single input. An example ffmpeg command is shown in Create video with 5 images with fadeIn/out effect in ffmpeg.

– llogan
Nov 16 '18 at 18:06














0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53332179%2fffmpeg-make-a-video-from-image-getting-error%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53332179%2fffmpeg-make-a-video-from-image-getting-error%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

The Sandy Post

Danny Elfman

Pages that link to "Head v. Amoskeag Manufacturing Co."