QTInput / QTOutput

Plugin for AviSynth 2.5
Version 0.0.5 - January 9, 2006
by Josh Harris
latest version
source code

About

This filter can read and write quicktime files, using an existing installation of Quicktime. If you have Quicktime 6 installed, the filter only supports video. If you have Quicktime 7, video and audio are supported for input. The filter currently only supports creating movs with video. Audio support is planned for a future version.

It should be able to open almost any file that you can open with the quicktime player: movs, mp4 (h264 with b-frames skips the first frame or two and is extremely slow), raw dv, reference movs, etc.

Requirements:

Quicktime 6 for video only
Quicktime 7 for audio and video

Usage - Read

QTInput("FileName.mov", color = 2, quality = 100, audio = false, mode = 0, raw = "yuyv", info = 0, dither = 0)
QTInput("FileName.mov")

Parameters:

file - input filename
color - output colorspace (default = 2)
    0 = RGB24
    1 = RGB32
    2 = YUY2
quality - decompression quality (default = 100)
    There are really only two values for this setting:
      0 = normal
      > 0 = High quality
    This parameter does not have an effect on all codecs but there is a noticeable drop in quality for some of them (dvc) if it is set to 0. It is recommended that you leave this value at it's default value of > 0.
audio - audio input (default = false)
    false = audio disabled.
    true = audio enabled.
    This is only valid if you have Quicktime 7. Audio is completely disabled for Quicktime 6.
mode - Decode mode (default = 0)
    0 = Uses Quicktime SDK function MoviesTask to decode video.
    1 = If source file is one of several YUV formats (listed below), this mode returns raw data.
    2 = Uses Quicktime SDK function DecompressSequence to decode video.
raw - raw input colorspace (default = "yuyv")
    If mode = 1, this sets the input file colorspace method. Choices are:
    uyvy (2vuy), yuyv (yuy2), yvyu, vyuy, yuv2 or v210 (10bit uyvy), rgb, argb.
info - Overlays codec info on the video (default = 0)
    0 = info feature is turned off.
    1 = info feature is turned on.
dither - raw 10bit to 8bit dither mode (default = 0)
    0 = off
    1 = Uses the 2 least significant bits as a fraction for rounding the 10bit value to the nearest 8bit value.
    Currently this really isn't a dither mode, but is in place for a future dither mode option.
    This only has an effect when mode=1, raw="v210."

Usage - Write

QTOutput("FileName.mov", format = "", quality = 80, datarate = 1000, keyframe = 1, raw = "")
QTOutput("FileName.mov")

Parameters:

file - output filename
format - quicktime FourCC codec (default = "")
    If you leave this value blank, a dialog box will open allowing you to choose which codec to use.
    h264 compression is a little buggy. It doesn't work if "keyframe every" is checked. This means you have to use the dialog box for h264 and uncheck it.
    Other options for this depend on what codecs you have installed, some examples:
    "dvc" = DV25 NTSC
    "dvcp" = DV25 PAL
    "rle" = Animation
    "SVQ3" = Sorenson Video 3
    "cvid" = Cinepak
    "IV41" = Intel Indeo¨ Video 4.4
    "cvid" = Cinepak
quality - compression quality (default = 100)
    This value is divided by 20 and truncated to an integer, so a value of 25 is identical to a value of 20.
    0 = Least
    20 = Low
    40 = Medium
    60 = High
    80 = Best
    100 = Lossless (this is listed as lossless in the SDK, but is probably not always lossless, but rather just the highest setting for a given codec.
    333 = This is a special mode that will create a file called "Quicktime_CodecList.txt" in the same directory as the avs script. This file will contain a list of the FourCC codes installed on your system.
datarate - datarate in KBytes/sec (default = 1000)
keyframe - keyframe every n frames (default = 1)
raw - raw output colorspace (default = "")
    This is a raw output mode. Instead of using a quicktime codec to encode data, this mode copies the data directly from YUY2 to the requested output mode.
    You must set format to a valid quicktime FourCC.
    Currently only format="2Vuy", raw="uyvy" is supported.
    And you must have a codec installed that handles 2Vuy, such as the Blackmagic codec.

Version changes:

Plans:

License:

This program is freeware, but WITHOUT ANY WARRANTY.