2

I have extracted all frames from an old video file, cleaned up video tape dropouts and film scratches frame by frame.

I now must reassemble the PNG files into a video .

I found this thread: https://stackoverflow.com/questions/24961127/how-to-create-a-video-from-images-with-ffmpeg

and modified what I found there to:

ffmpeg -r 1/5 -start_number 0 -i buggles%4d.png -c:v libx264 -vf "fps=25,format=yuv420p" out2.mp4

I have available only the first 500 frames @25 frames per second and am testing with that. It should yield a 20 second video

Instead I get a video of 41:35 in length that changes frames about every second and VLC reports 25 FPS.

Maybe I need to define that each image is on screen for only a single frame, but how?

3
  • Any chance you have a large number of duplicates of the input files somewhere in the input directory? Sep 29, 2019 at 6:26
  • -r 1/5 - this option seems strange.
    – Qwertiy
    Sep 29, 2019 at 6:34
  • Remove -r 1/5 unless you want each image to last for 5 seconds.
    – Gyan
    Sep 29, 2019 at 7:41

1 Answer 1

1

I can confirm that removing the -r 1/5 seems to work and reduces the length of the video.

5
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review Sep 30, 2019 at 23:38
  • 1
    @music2myear Tekno Geekz can't critique or request clarification from the author, because he is the author who self-answered his own question.
    – karel
    Oct 1, 2019 at 0:38
  • (1) You say “removing the -r 1/5 seems to work and reduces the length of the video.”  Does it reduce it to the 20 seconds you were expecting? (2) Please phrase this as a free-standing (self-sufficient) answer (giving credit to Gyan for suggesting it) rather than as an acknowledgement of a comment. … … … … … … … … … … … … … … … … … … … … Please do not respond in comments; edit your answer to make it clearer and more complete. Oct 1, 2019 at 0:42
  • Oh, ah. Thanks for correcting me. Oct 1, 2019 at 1:41
  • Yes it reduces it to the expected 2o seconds 1/25 sec per frame. The only issue I have now is that if the frames are numbered like test01234.png test01235.png test01236.png test01237.png test11000.png test11001.png test11003.png The output video goes only to test01234.png and never moves on to test11000.png Oct 5, 2019 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.