ImageSequence

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(ImageSequence)
 
(add x86/x64 version from TomArrow)
 
Line 1: Line 1:
{{FilterCat|External_filters|Source_filters|Plugins}}
+
{{FilterCat4|External_filters|Source_filters|Plugins|Plugins_x64}}
 
{{Filter3
 
{{Filter3
| {{Author/WarpEnterprises}}
+
|1={{Author/WarpEnterprises}}
| 20101115
+
|2=20101115
| [http://www.avisynth.nl/users/warpenterprises/files/imagesequence_20101115.zip imagesequence_20101115.zip]
+
|3=[x86] [http://www.avisynth.nl/users/warpenterprises/files/imagesequence_20101115.zip imagesequence_20101115.zip]
| Source filters  
+
------------
|  
+
[x86/x64] [https://github.com/TomArrow/CoronaSequence_x64mod/releases CoronaSequence_x64mod_x86.dll] [https://github.com/TomArrow/CoronaSequence_x64mod/releases CoronaSequence_x64mod.dll]
 +
|4=Source filters  
 +
|5=
 
|6=[http://forum.doom9.org/showthread.php?t=109997 Doom9 Thread], [http://forum.doom9.org/showthread.php?t=26855 Original]}}
 
|6=[http://forum.doom9.org/showthread.php?t=109997 Doom9 Thread], [http://forum.doom9.org/showthread.php?t=26855 Original]}}
  

Latest revision as of 11:14, 22 November 2021

Abstract
Author WarpEnterprises
Version 20101115
Download [x86] imagesequence_20101115.zip

[x86/x64] CoronaSequence_x64mod_x86.dll CoronaSequence_x64mod.dll

Category Source filters
License
Discussion Doom9 Thread, Original

Contents

[edit] CoronaSequence

[edit] Loading PNG, JPG, BMP, PCX, TGA and GIF images

CoronaSequence(string "file", int "start", int "stop", int "sort", bool "gapless",
int "textmode", int "x", int "y", string "font", int "size", int "text_color", int "halo_color", string "expression")

There are two basic ways to select your images:

[edit] The old way: formatting the filename

The filename must have a number inside, which is calculated from the frame number.
This is the way the other image plugins work.

CoronaSequence("c:\PIC%.2d.jpg", start=1, stop=1500, gapless=true)

With gapless = true missing pictures are omitted from the result.

Some typical examples for number formats are:

pic%d.jpg     standard numbering         "pic1.jpg"     "pic15.jpg"     "pic153.jpg"
pic%5.3d.jpg 5 characters 3 digits "pic 001.jpg" "pic 015.jpg" "pic 153.jpg"
pic%-5d.jpg 5 characters left aligned "pic1 .jpg" "pic15 .jpg" "pic153 .jpg"

[edit] The new way: using wildcards

You select the images with wildcards - this should be much easier to type in most cases.
Subfolders are included and the pictures are sorted by path & filename, filename or filedate.
start, stop and gapless are ignored in this mode.

CoronaSequence("c:\PIC*.jpg", sort=1)

With sort you can change the ordering of the result:

  • 0: don't sort
  • 1: sort by path and filename
  • 2: sort by filename
  • 3: sort by filedate

[edit] Filename output

With textmode you can choose what to print on the image.

  • 0: don't print the filename
  • 1: print the filename
  • 2: print the full filename (including the drive and folder)
  • -1: don't even print an error message
  • 3: evaluate expression and print the result on the image. The variable "filename" is set to the current filename. The following will use midstr to print the three following characters after "C:\PIC":
CoronaSequence("c:\PIC*.jpg", textmode=3, expression="midstr(filename,7,3)")

You can use font, size, x, y, text_color and halo_color to change the text (the same parameters as Subtitle).
As in Subtitle x=-1 or y=-1 will center the text.

[edit] Some more details:

The output format is always RGB32. The framerate is fixed at 25fps - use AssumeFPS to change.
The first picture found is used to define the width and height of the video.

The wildcard search includes results which match either the long filenames or the 8.3 filename (which isn't visible in most applications nowadays). This is not really intended but the Windows functions give those results.

[edit] Error handling:

There should never be an error which stops AviSynth.
If a picture cannot be read or has the wrong dimensions a black frame is generated.
If not a single picture is found, a message video is generated.

[edit] Technical note:

This plugin uses the Corona Image I/O Library, Version 1.0.2, by Chad Austin.


[edit] RawSequence

[edit] Loading raw image files

RawSequence (string "file", int "start", int "stop", int "sort", bool "gapless",
int "textmode", int "x", int "y", string "font", int "size", int "text_color", int "halo_color",
string "pixel_type", int "width", int "height")

This function does exactly the same job as CoronaSequence, but instead of using an image library it directly copies the content of the files to the image memory.
It has nearly the same code as RawSource.

Supported pixel_types are:

  • RGB, RGBA, BGR, BGRA (interleaved RGB without subsampling, resulting in AviSynth's RGB24 or RGB32)
  • YUYV, YVYU, UYVY, VYUY (interleaved horizontally subsampled resulting in AviSynth's YUY2)
  • YV16 (planar horizontally subsampled, it is converted to AviSynth's YUY2)
  • I420, YV12 (planar horizontally and vertically subsampled resulting in AviSynth's YV12)

For useful results you have to give the correct width and height.

RawSequence("d:\*.raw", pixel_type="YUYV", width=576, height=100, textmode=2)




Back to External Filters

Personal tools