Score:0

Create video from images using ffmpeg and piping

cn flag
SEU

I'd like to make a video of the last 10 images in a particular folder. I am trying to do this in a single line command instead of creating a list. I was trying the following, but it errors out like below. Any suggestions?

echo `find ./folder1 -type f | grep .png | sort | tail -10 ;`| ffmpeg -f image2 -i - test.mp4

[image2 @ 0x21bf1c0] Could find no file with path 'pipe:' and index in the range 0-4
pipe:: No such file or directory
pLumo avatar
in flag
Wy do you think that `-i -` would take a list of files as input?
Score:2
jp flag

ffmpeg expects image/video data, not a literal list of files unless you're using the concat demuxer. Adding cat will provide the data.

cat $(find . -maxdepth 1 -name '*.png' -print | sort | tail -10) | ffmpeg -framerate 25 -i - -vf format=yuv420p -movflags +faststart output.mp4
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.