frames - Sample Output

Simple Renumber

In this case, the frames are 'shifted'.
You can also do renames.. see examples in online help below.

[erco@tahoe]: frames -move foo.%04d.gif 1 10 foo.%04d.gif 12
                           ----------------- ---------------
### MOVE: SAFE NAMES       Source            Destination

mv foo.0001.gif __safe__foo.0001.gif     # first moves files into safe names
mv foo.0002.gif __safe__foo.0002.gif     # before renumbering. This is a safety
mv foo.0003.gif __safe__foo.0003.gif     # feature to prevent problems if destination
mv foo.0004.gif __safe__foo.0004.gif     # range and source range overlap ;)
mv foo.0005.gif __safe__foo.0005.gif
mv foo.0006.gif __safe__foo.0006.gif
mv foo.0007.gif __safe__foo.0007.gif
mv foo.0008.gif __safe__foo.0008.gif
mv foo.0009.gif __safe__foo.0009.gif
mv foo.0010.gif __safe__foo.0010.gif


mv __safe__foo.0001.gif foo.0012.gif     # Here are the final names
mv __safe__foo.0002.gif foo.0013.gif
mv __safe__foo.0003.gif foo.0014.gif
mv __safe__foo.0004.gif foo.0015.gif
mv __safe__foo.0005.gif foo.0016.gif
mv __safe__foo.0006.gif foo.0017.gif
mv __safe__foo.0007.gif foo.0018.gif
mv __safe__foo.0008.gif foo.0019.gif
mv __safe__foo.0009.gif foo.0020.gif
mv __safe__foo.0010.gif foo.0021.gif


Convert A Range Of Frames

In this case, SGI's togif(1) is used to convert RGB images to GIFs.
But you can invoke any
command line based image converter you want.

[erco@tahoe]: frames foo.%04d 1 10 -exec togif %s.rgb %s.gif
                     -------------       -------------------
#                    Frame Range         Command to run on each frame
togif foo.0001.rgb foo.0001.gif	    # shows each invocation of your command
togif foo.0002.rgb foo.0002.gif
togif foo.0003.rgb foo.0003.gif
togif foo.0004.rgb foo.0004.gif
togif foo.0005.rgb foo.0005.gif
togif foo.0006.rgb foo.0006.gif
togif foo.0007.rgb foo.0007.gif
togif foo.0008.rgb foo.0008.gif
togif foo.0009.rgb foo.0009.gif
togif foo.0010.rgb foo.0010.gif


Remove Range Of Frames

prompt% frames -rm foo.%04d.rgb 1 10


rm foo.0001.rgb
rm foo.0002.rgb
rm foo.0003.rgb
rm foo.0004.rgb
rm foo.0005.rgb
rm foo.0006.rgb
rm foo.0007.rgb
rm foo.0008.rgb
rm foo.0009.rgb
rm foo.0010.rgb


Online Help

[erco@tahoe]: frames -help
    frame - a frame renumbering tool

OPERATIONS [one must be specified]
    -m[ove]   oldrange newrange   - Move frame range
    -l[ink]   oldrange newrange   - Links
    -s[link]  oldrange newrange   - Symbolic Links
    -e[xist]  range               - Existance test a frame range
    -r[m]     range               - Remove a frame range
    range -exec cmd %s [%s..]     - Execute a command on a frame range

    -d[ebug]               - debug [dont do anything - just print]
    -q[uiet]               - quiet

    A range can be:

        foo.%d.rgb 1 10         - foo.1.rgb, foo.2.rgb..
        foo.%04d.rgb 1 10 2     - foo.0001.rgb, foo.0003.rgb..
        foo.%03d.rgb 1 10 2     - foo.001.rgb, foo.003.rgb..

    RENAME FRAMES. Renames one range of frames to another.
    The following changes the basename from foo to bla:

         frames -move foo.%04d.rla 1 10 bla.%04d.rla
                      ----------------- ------------
                      Source Range      Dest Name

    SHIFT FRAMES. Shifts frames 1 thru 10 to 21 thru 30:

         frames -move foo.%04d.rla 1 10 foo.%04d.rla 21
                      ----------------- ---------------
                      Source Range      Dest Range

    EXECUTE COMMAND. Executes imconv(1) to convert frames 1 thru 10
    from rla files to rgb files:

         frames foo.%04d 1 10 -exec imconv %s.rla %s.rgb

    SYMBOLIC LINKS. Create 100 symbolic links that alternatly link
    between a.0001.rgb and a.0002.rgb:

         frames -slink a.%04d.rgb 1 2 b.%04d.rgb 1 100

    REMOVE. Removes frames:

         frames -rm a.%04d.rgb 1 30

To SEE what these commands do without running them, use -debug
and the equivalent unix commands are printed to stdout.