0

With a project I am working on, I am taking one video, extracting frames from within the middle, from 00:55:00 to 00:57:25. After I extract these images, I am modifying them via code and I then need to compile these images back into a video. To finish it off, I will then merge the video back into the original video.

Ive already pulled the frames from the video, modified them, but now I need to merge them back together into a video.

I used this question to check the format, but I am not getting the correct output.

https://superuser.com/questions/563570/use-ffmpeg-for-video-to-frames-then-frames-to-video-with-original-sound

Here is my current input to FFMPEG:

-r 24.97 -i "C:\Users\scott\AppData\Local\Temp\iOs91azj0.Bmp" -r 24.97 -i "C:\Users\scott\AppData\Local\Temp\iOs91azj1.Bmp" -r 24.97 -i "C:\Users\scott\AppData\Local\Temp\iOs91azj2.Bmp" -r 24.97 -i "C:\Users\scott\AppData\Local\Temp\iOs91azj3.Bmp" -r 24.97 -i "C:\Users\scott\AppData\Local\Temp\iOs91azj4.Bmp" -r 24.97 -i "C:\Users\scott\AppData\Local\Temp\iOs91azj5.Bmp" -r 24.97 -i "C:\Users\scott\AppData\Local\Temp\iOs91azj6.Bmp" -r 24.97 -i "C:\Users\scott\AppData\Local\Temp\iOs91azj7.Bmp" -r 24.97 -i "C:\Users\scott\AppData\Local\Temp\iOs91azj8.Bmp" -an -r 24.97 "C:\Users\scott\AppData\Local\Temp\ewELJdA8.mp4"

EDIT

My current output gives me a video that doesn't play. So for some reason, the merging of frames isn't the correct format and FFMPEG isn't giving me a reasonal output to work with.

How do I merge frames together into a video?

Community
  • 1
  • 1
SpoiledTechie.com
  • 9,951
  • 19
  • 73
  • 98
  • 1
    Check out [this](http://stackoverflow.com/a/12376324/465495) answer as it probably addresses the same problem. It suggests using [AForge.NET](http://www.aforgenet.com/) which does interact with FFMPEG. – yazanpro Oct 30 '15 at 22:01
  • Crossposting the [same question](http://superuser.com/questions/994073/use-ffmpeg-to-combine-frames-into-video) to multiple Stack Exchange sites is discouraged, and anyway your question appears to be offtopic here on SO. – llogan Oct 30 '15 at 22:02
  • I only cross posted because superuser and stackoverflow handle both FFMPEG questions. 1.9k on SU and 8.9k on SO. – SpoiledTechie.com Nov 02 '15 at 14:57

1 Answers1

0

There are several ways to accomplish this. The first using a pattern to merge all images that are incremental into a video:

ffmpeg -y -start_number 0 -i "C:\Users\scott\AppData\Local\Temp\iOs91azj%d.Bmp" -c:v libx264 -r 24.97 -pix_fmt yuv420p /media/test/output.mp4

The next, to specify individual images in a single command:

ffmpeg -y -loop 1 -i img1.png -loop 1 -i img2.png -filter_complex '[0:v] [1:v] concat=n=2:v=1 [v]' -map '[v]' -c:v libx264 -r 24.97 -pix_fmt yuv420p /media/test/output.mp4
jrkt
  • 1,914
  • 3
  • 22
  • 40