The completed Prusa Mk2 kit

When only rapid sequential pictures will do. We give you the Prusa MK2 build in slide-show super-speed with drum patterns concocted on the MPC Live.

Timothy Lee Russell | 3/27/2018 10:55:59 AM

Prusa MK2 Build

In the previous post, Vine is dead but you can make your own we concatenated a series of images into an animated gif.

This time we pulled from a much larger series of images and saved them as a "slideshow" movie. The pictures are of the Prusa MK2 build. The slideshow is 2 minutes. It shows the general process and what portions of the rig that you will be working on and in what order.

The build itself took about 12 hours, spaced over a few days. It could have been built faster but we took the time to contribute back to the online manual, which is a great resource.

What did we learn creating the video?

This time, we created a longer movie at a higher resolution with FFmpeg. Here's the debrief.

First of all, the photos are from a different camera which means the numbering scheme of the images is different than last time. The filenames for the Prusa MK2 build look like this:

  • IMG_0305.jpg
  • IMG_0306.jpg

We had trouble with zero-padding the last go-round, so we removed the leading zero using PowerShell.

PS> get-childitem -filter "*IMG_0*" | rename-item -newname {$_.name -replace "IMG_0", "IMG_" }

That left us with filenames:

  • IMG_305.jpg
  • IMG_306.jpg

We tested this set of files but FFmpeg did not seem to recognize that 305 was the start of the numbering of the series, so we used a counter and renumbered the series starting at 1.

PS> ls *.jpg | foreach-object -begin { $count=1 } -process { rename-item $_ -newname "IMG_$count.jpg"; $count++ }

Now the filenames in our series of images start at 1 and FFmpeg recognizes the series and is able to compile a movie for us.

Rendering time

Depending on how many images you are using and the image resolution, the process of rendering the movie may take some time and your device may get a little warm. Because of this, it is often good to make reduced bitrate versions of the video since you might have to render it a few times (or a hundred) to get it right!

With that in mind, we can scale the video down while testing. The frame rate was set to 3 frames per second.

PS> .\ffmpeg -f image2 -framerate 3 -i 'IMG_%d.jpg' -vf "scale=320:-1" generatedVideo.mp4

When we have the result looking and sounding good, we can export it at the full resolution for further editing and/or post-processing.

PS> .\ffmpeg -f image2 -framerate 3 -i 'IMG_%d.jpg' generatedVideo.mp4

Further editing

The sub-titles and audio track were added to this video using Filmora which is a decent, inexpensive piece of software for video editing and after-effects.

comments powered by Disqus