ffmpeg slides to video with padding shows only one image











up vote
0
down vote

favorite












I usually create video clips of still images using something very similar to
This StackOverflow example. However, this time, I have a set of images of varying sizes, so clipped in options from This OTHER StackOverflow example to pad the images to a set size
to come up with this:



ffmpeg -r 1 -i slide_%2d.png  -filter_complex "fps=25,format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" -y tmp.mp4


Of course it doesn't work as hoped, but this is the 21st Century, 'Google It' way!



What I'm attempting to do is create a command which feeds contiguously-numbered png images (starting at 01), in the current directory, at the rate of one per second, and outputs them as an mp4 file, suitably padded to a 16:9 ratio image size, with an eye-bleeding green background/surround (it's a test rig – I want to see what's what, quickly) at an arbitrary rate of 25 frames per second on the output (all 25 frames to be of the same input input image, of course).



What I get is the last frame of the image set for a duration that varies, depending on the contents of the -r flag.



Could somebody help me out here, please, and show me where I'm going wrong? I can spend delighted hours searching and tinkering, but I should be wasting my time on other fascinating projects now.



All the best,
QuinB



ffmpeg v. N-92396-g55e021f39b



OS Win10










share|improve this question






















  • Works here. Share full log.
    – Gyan
    Dec 3 at 20:24










  • Here y'go. tmplog_20181203a.txt Thanks for taking a look.
    – Quin Benson
    Dec 3 at 21:20












  • Cutting back the command to: ffmpeg -framerate 1 -i "test_%2d.png" "out03.mp4" produces output showing multiple images viewable in ffplay (although, obviously, not scaled as required) Adding in fps produces a short clip with a single image. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "fps=25" "out06.mp4" omitting fps but scaling and formatting produces output showing multiple images ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768" "out07.mp4" Adding in force_original_aspect_ratio=decrease gives 1 image
    – Quin Benson
    Dec 4 at 9:23










  • however, adding in the pad sequence creates an output showing multiple images. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out10.mp4" "Eh, what?"
    – Quin Benson
    Dec 4 at 9:47












  • ffmpeg -framerate 1 -i "test_%2d.png" -framerate 25 -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out15.mp4" This produces output, as required, at 25fps who knows why.
    – Quin Benson
    Dec 4 at 9:57















up vote
0
down vote

favorite












I usually create video clips of still images using something very similar to
This StackOverflow example. However, this time, I have a set of images of varying sizes, so clipped in options from This OTHER StackOverflow example to pad the images to a set size
to come up with this:



ffmpeg -r 1 -i slide_%2d.png  -filter_complex "fps=25,format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" -y tmp.mp4


Of course it doesn't work as hoped, but this is the 21st Century, 'Google It' way!



What I'm attempting to do is create a command which feeds contiguously-numbered png images (starting at 01), in the current directory, at the rate of one per second, and outputs them as an mp4 file, suitably padded to a 16:9 ratio image size, with an eye-bleeding green background/surround (it's a test rig – I want to see what's what, quickly) at an arbitrary rate of 25 frames per second on the output (all 25 frames to be of the same input input image, of course).



What I get is the last frame of the image set for a duration that varies, depending on the contents of the -r flag.



Could somebody help me out here, please, and show me where I'm going wrong? I can spend delighted hours searching and tinkering, but I should be wasting my time on other fascinating projects now.



All the best,
QuinB



ffmpeg v. N-92396-g55e021f39b



OS Win10










share|improve this question






















  • Works here. Share full log.
    – Gyan
    Dec 3 at 20:24










  • Here y'go. tmplog_20181203a.txt Thanks for taking a look.
    – Quin Benson
    Dec 3 at 21:20












  • Cutting back the command to: ffmpeg -framerate 1 -i "test_%2d.png" "out03.mp4" produces output showing multiple images viewable in ffplay (although, obviously, not scaled as required) Adding in fps produces a short clip with a single image. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "fps=25" "out06.mp4" omitting fps but scaling and formatting produces output showing multiple images ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768" "out07.mp4" Adding in force_original_aspect_ratio=decrease gives 1 image
    – Quin Benson
    Dec 4 at 9:23










  • however, adding in the pad sequence creates an output showing multiple images. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out10.mp4" "Eh, what?"
    – Quin Benson
    Dec 4 at 9:47












  • ffmpeg -framerate 1 -i "test_%2d.png" -framerate 25 -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out15.mp4" This produces output, as required, at 25fps who knows why.
    – Quin Benson
    Dec 4 at 9:57













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I usually create video clips of still images using something very similar to
This StackOverflow example. However, this time, I have a set of images of varying sizes, so clipped in options from This OTHER StackOverflow example to pad the images to a set size
to come up with this:



ffmpeg -r 1 -i slide_%2d.png  -filter_complex "fps=25,format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" -y tmp.mp4


Of course it doesn't work as hoped, but this is the 21st Century, 'Google It' way!



What I'm attempting to do is create a command which feeds contiguously-numbered png images (starting at 01), in the current directory, at the rate of one per second, and outputs them as an mp4 file, suitably padded to a 16:9 ratio image size, with an eye-bleeding green background/surround (it's a test rig – I want to see what's what, quickly) at an arbitrary rate of 25 frames per second on the output (all 25 frames to be of the same input input image, of course).



What I get is the last frame of the image set for a duration that varies, depending on the contents of the -r flag.



Could somebody help me out here, please, and show me where I'm going wrong? I can spend delighted hours searching and tinkering, but I should be wasting my time on other fascinating projects now.



All the best,
QuinB



ffmpeg v. N-92396-g55e021f39b



OS Win10










share|improve this question













I usually create video clips of still images using something very similar to
This StackOverflow example. However, this time, I have a set of images of varying sizes, so clipped in options from This OTHER StackOverflow example to pad the images to a set size
to come up with this:



ffmpeg -r 1 -i slide_%2d.png  -filter_complex "fps=25,format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" -y tmp.mp4


Of course it doesn't work as hoped, but this is the 21st Century, 'Google It' way!



What I'm attempting to do is create a command which feeds contiguously-numbered png images (starting at 01), in the current directory, at the rate of one per second, and outputs them as an mp4 file, suitably padded to a 16:9 ratio image size, with an eye-bleeding green background/surround (it's a test rig – I want to see what's what, quickly) at an arbitrary rate of 25 frames per second on the output (all 25 frames to be of the same input input image, of course).



What I get is the last frame of the image set for a duration that varies, depending on the contents of the -r flag.



Could somebody help me out here, please, and show me where I'm going wrong? I can spend delighted hours searching and tinkering, but I should be wasting my time on other fascinating projects now.



All the best,
QuinB



ffmpeg v. N-92396-g55e021f39b



OS Win10







video ffmpeg images






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 3 at 14:01









Quin Benson

32




32












  • Works here. Share full log.
    – Gyan
    Dec 3 at 20:24










  • Here y'go. tmplog_20181203a.txt Thanks for taking a look.
    – Quin Benson
    Dec 3 at 21:20












  • Cutting back the command to: ffmpeg -framerate 1 -i "test_%2d.png" "out03.mp4" produces output showing multiple images viewable in ffplay (although, obviously, not scaled as required) Adding in fps produces a short clip with a single image. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "fps=25" "out06.mp4" omitting fps but scaling and formatting produces output showing multiple images ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768" "out07.mp4" Adding in force_original_aspect_ratio=decrease gives 1 image
    – Quin Benson
    Dec 4 at 9:23










  • however, adding in the pad sequence creates an output showing multiple images. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out10.mp4" "Eh, what?"
    – Quin Benson
    Dec 4 at 9:47












  • ffmpeg -framerate 1 -i "test_%2d.png" -framerate 25 -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out15.mp4" This produces output, as required, at 25fps who knows why.
    – Quin Benson
    Dec 4 at 9:57


















  • Works here. Share full log.
    – Gyan
    Dec 3 at 20:24










  • Here y'go. tmplog_20181203a.txt Thanks for taking a look.
    – Quin Benson
    Dec 3 at 21:20












  • Cutting back the command to: ffmpeg -framerate 1 -i "test_%2d.png" "out03.mp4" produces output showing multiple images viewable in ffplay (although, obviously, not scaled as required) Adding in fps produces a short clip with a single image. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "fps=25" "out06.mp4" omitting fps but scaling and formatting produces output showing multiple images ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768" "out07.mp4" Adding in force_original_aspect_ratio=decrease gives 1 image
    – Quin Benson
    Dec 4 at 9:23










  • however, adding in the pad sequence creates an output showing multiple images. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out10.mp4" "Eh, what?"
    – Quin Benson
    Dec 4 at 9:47












  • ffmpeg -framerate 1 -i "test_%2d.png" -framerate 25 -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out15.mp4" This produces output, as required, at 25fps who knows why.
    – Quin Benson
    Dec 4 at 9:57
















Works here. Share full log.
– Gyan
Dec 3 at 20:24




Works here. Share full log.
– Gyan
Dec 3 at 20:24












Here y'go. tmplog_20181203a.txt Thanks for taking a look.
– Quin Benson
Dec 3 at 21:20






Here y'go. tmplog_20181203a.txt Thanks for taking a look.
– Quin Benson
Dec 3 at 21:20














Cutting back the command to: ffmpeg -framerate 1 -i "test_%2d.png" "out03.mp4" produces output showing multiple images viewable in ffplay (although, obviously, not scaled as required) Adding in fps produces a short clip with a single image. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "fps=25" "out06.mp4" omitting fps but scaling and formatting produces output showing multiple images ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768" "out07.mp4" Adding in force_original_aspect_ratio=decrease gives 1 image
– Quin Benson
Dec 4 at 9:23




Cutting back the command to: ffmpeg -framerate 1 -i "test_%2d.png" "out03.mp4" produces output showing multiple images viewable in ffplay (although, obviously, not scaled as required) Adding in fps produces a short clip with a single image. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "fps=25" "out06.mp4" omitting fps but scaling and formatting produces output showing multiple images ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768" "out07.mp4" Adding in force_original_aspect_ratio=decrease gives 1 image
– Quin Benson
Dec 4 at 9:23












however, adding in the pad sequence creates an output showing multiple images. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out10.mp4" "Eh, what?"
– Quin Benson
Dec 4 at 9:47






however, adding in the pad sequence creates an output showing multiple images. ffmpeg -framerate 1 -i "test_%2d.png" -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out10.mp4" "Eh, what?"
– Quin Benson
Dec 4 at 9:47














ffmpeg -framerate 1 -i "test_%2d.png" -framerate 25 -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out15.mp4" This produces output, as required, at 25fps who knows why.
– Quin Benson
Dec 4 at 9:57




ffmpeg -framerate 1 -i "test_%2d.png" -framerate 25 -filter_complex "format=yuv420p,scale=1024:768:force_original_aspect_ratio=decrease,pad=1024:768:x=(1024-iw)/2:y=(768-ih)/2:color=green" "out15.mp4" This produces output, as required, at 25fps who knows why.
– Quin Benson
Dec 4 at 9:57















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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',
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%2fsuperuser.com%2fquestions%2f1380410%2fffmpeg-slides-to-video-with-padding-shows-only-one-image%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • 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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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%2fsuperuser.com%2fquestions%2f1380410%2fffmpeg-slides-to-video-with-padding-shows-only-one-image%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

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕