N
N
nikesport2015-01-22 15:23:40
fmpeg
nikesport, 2015-01-22 15:23:40

How to create a 5 second video from one image in ffmpeg?

How to make a 5 second video from one image? There is a command: ffmpeg -framerate 1/5 -i img.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4 but here the duration can only be changed by the -r parameter, i.e. the number of frames, but then I can’t convert it later I will stream this video to mpg that if I set the -r 1/5 parameter, then the duration is 5 seconds and the number of frames per second turns out to be such that ffmpeg cannot convert this video to mpg if I set the -r 1 parameter, then it is converted
2. And another question is how to merge two mp4 videos in ffmpeg? concat:"video1|video2" only glues mpg, the concat filter gives out exceptions that are not understandable, forwarded all the commands that are on the Internet on different forums, they all give errors. Then [out] strem.. then [a] strem.. xt then there filter no such: [0:v]/ Who dealt with this garbage please help

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
NerVik, 2015-01-29
@NerVik

video generation:
mp4 gluing:
convert in a couple of seconds to .ts
glue .ts and convert to mp4:

ffmpeg -i "concat:in1.ts|in2.ts|in3.ts|in4.ts" -c copy -bsf aac_adtstoasc out.mp4

J
jon_vy, 2019-03-01
@jon_vy

Here is
ffmpeg -filter_complex aevalsrc=0 -loop 1 -i black.png -t 5 out.mp4
doesn't work.
The video is generated, but in place of the picture.png the background is gray.
Tell me how to fix

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question