#
The FFmpeg Image2 Streams

Another feature gained from using ffmpeg in CINELERRA-GG takes advantage of what is being referred to as the %d trick. This trick uses the ffmpeg muxer image2 and a filename template to create a series of image files of a given type. A specific example is described below. AppImage does not provide this capability unless you use the workaround as described in the Appendix FAQ, Known Problems and Workarounds.

To encode a series of 48 bit tiff output image files, add a file to the CINELERRA-GG data ffmpeg/video subdirectory as in:

    # {path_to_cinelerra}/bin/ffmpeg/video/tiff.dfl
    tiff48.tif

Then create an ffmpeg video encoder parameters file in the same directory:

    # {path_to_cinelerra}/bin/ffmpeg/video/tiff48.tiff
    image2 tiff
    pixel_format=rgb48

This will define a new ffmpeg encoder format which is a video image file format that uses the tiff codec for encoding, and a pixel_format of rgb48 (or a similar equivalent such as rgb48le). Next load up your project and set up for a Render using File → Render in the usual way. Now the tricky part; the output file name should contain a %d which will be the frame number used in the image output filename as in: Select a file to render to /tmp/tiff_images/img%03d.tiff. You will get multiple files as output – one for each frame!

The resulting directory of images can be opened for reading by simply opening the template path. As in: File → Load Files /tmp/tiff_images/img%03d.tiff. You will notice a file named the same as the template, which has been automatically created, is empty, is needed, and has to remain with the set.