Results 1 to 2 of 2

Thread: scripting in Photoshop / Gimp (and rotoscoping)

  1. #1

    Default scripting in Photoshop / Gimp (and rotoscoping)

    I've come to the realization that you can make your own video effects if you can make some batch scripts for Gimp for example. I keep hitting barriers, but I'm getting close to be able to do it, and when I can it'll open some doors. I'll explain what kinds of things I could see being done.

    So, I use a lot of platforms on a given piece. I may take an mpeg file, split it into frames with ffmpeg (it shows how in the man page), and then alter the individual frames with gimp, photoshop, or paint etc. Then you can feed it either back together with ffmpeg or you can put it through vegas to edit. In my experience vegas is much better than avid for doing stop motion. You just have to go to options - preferences - editing and change the "new still image length" to match the number of frames per second you want each imported picture file to take (measured in fractions of seconds each frame lasts and FPS) You can do some interesting things rhythmically by doubling etc frames and cutting some out.

    Anyways, so by splitting all these frames you can work on them individually, but because of consistency in motion, alterations have to be uniform (or successive) . There are simple scripts for batch processing actions in an image editor which would allow you to process a whole folder of .png files for instance with the same operations, whatever you may be doing. I don't know how many times that I've copied, pasted, zoomed, etc. on different frames in an animation. There's some mean effects you could make if you had to spend less time doing the same sequence of actions to hundreds of frames while still being able to work on the level of each frame as a picture file.

    Btw, if you're interested in rotoscoping I might suggest this method of extracting frames from a video file using ffmpeg.

    ffmpeg is a Linux command line video editing software, but you can use it with mac and win. I think there may be a GUI for it, I'm not sure... but many open source video editing software directly uses ffmpeg.
    You can extract images from a video, or create a video from many images: For extracting images from a video:
    ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg
    This will extract one video frame per second from the video and will output them in files named ‘foo-001.jpeg’, ‘foo-002.jpeg’, etc. Images will be rescaled to fit the new WxH values.
    If you want to extract just a limited number of frames, you can use the above command in combination with the -vframes or -t option, or in combination with -ss to start extracting from a certain point in time.
    For creating a video from many images:
    ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi
    The syntax foo-%03d.jpeg specifies to use a decimal number composed of three digits padded with zeroes to express the sequence number. It is the same syntax supported by the C printf function, but only formats accepting a normal integer are suitable.

    When importing an image sequence, -i also supports expanding shell-like wildcard patterns (globbing) internally, by selecting the image2-specific -pattern_type glob option.

    For example, for creating a video from filenames matching the glob pattern foo-*.jpeg:

    ffmpeg -f image2 -pattern_type glob -i 'foo-*.jpeg' -r 12 -s WxH foo.avi
    Another way I know of rotoscoping by digitally splitting frames is to get a video player that you can click forward frame by frame (like quicktime), then you can print screen and save the files in numeric order.

  2. #2


    I agree, FFMPEG can be useful. For this kind of operation, I advise using lossless PNG, not artifacted JPG.

Similar Threads

  1. How do I turn off Scripting?
    By Sarah & Allison in forum Sony Vegas video editing apps
    Replies: 10
    Last Post: 03-28-2013, 10:43 PM
  2. DVD Architect Scripting
    By Deian in forum Blu Ray, DVD, SVCD and VCD authoring
    Replies: 3
    Last Post: 06-28-2009, 06:47 PM
  3. Encoding DVD to FLV using H.264 and AVS scripting?
    By atephoald in forum General video editing software help and advice
    Replies: 0
    Last Post: 11-16-2007, 02:47 PM
  4. Excalibur 4: scripting
    By FiveIron in forum Sony Vegas video editing apps
    Replies: 5
    Last Post: 10-08-2005, 10:53 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts