Creating video files from tsgEdit using ffmpeg pluginFriends of tinySG, tinySG's image processor has the ability to dump images to disk after each processing stage or filter. Originally designed for debugging purposes, a new plugin to tsgEdit utilises this feature to create video files of tinySG scenes. The plugin drives a standard ffmpeg command line encoder and provides a graphical interface to it's most important options.In order to create a video, just enable the capture feature of the image processor. This will save each rendered frame into a directory on your disk even if there are no active image filters. To avoid render delays caused by disk I/O, rendered frames are pushed to a queued, which is consumed by another write-to-disk thread. Once the image series is saved to disk, use the video plugin to select framerate, video format and size and let ffmpeg assemble the captured frames into a video file. Stdin and stdout of ffmpeg.exe are redirected to tsgEdit so that the output appears inside the plugins log viewer.
Although ffmpeg could do the job even without
intermediate saving to disk, this approach avoids any code dependencies and
is pretty flexible, supporting all command line options provided by ffmpeg.
Clock controltsgEdit implements several modes to control rendering:
In summary, this little plugin makes it easy to create all kinds of videos thanks to the power of ffmpeg. The actual code in tinySG is pretty small and very easy to understand and maintain. Once tinySG has an animation system as it's predecessor already had, videos could be created entirely by scripting, without the need of interactively moving the camera or adjust any scene settings.
Keep rendering, Copyright by Christian Marten, 2012-2014 Last change: 08.06.2012 |