SegmentedAviSource
From Avisynth wiki
Revision as of 04:42, 10 January 2016 by Raffriff42 (Talk | contribs)
SegmentedAviSource automatically loads up to 100 AVI files per base_filename using AviSource and splices them together using UnalignedSplice.
- If base_filename="d:\filename.ext", SegmentedAviSource will load the files d:\filename.00.ext, d:\filename.01.ext and so on, through d:\filename.99.ext. Any files in this sequence that don't exist will be skipped.
- As with AviSource there is built-in Audio Compression Manager support for decoding compressed audio tracks (MP3, AAC, AC3, etc).
SegmentedDirectShowSource works the same way, but calling DirectShowSource in place of AviSource.
Contents |
Syntax and Parameters
SegmentedAviSource(string base_filename [, ... ]
[, bool audio, string pixel_type, int vtrack, int atrack ] )
- string base_filename =
- If base_filename="d:\filename.avi", SegmentedAviSource will load the files d:\filename.00.avi, d:\filename.01.aviand so on, through d:\filename.99.avi. Any files in this sequence that don't exist will be skipped.
- bool audio = true
- Enable audio on the resulting clip.
- string pixel_type = "RGB32"
- Request a color format from the decompressor. Allowed values are:
- int vtrack = 0
- Specifies a numbered video track. Track numbers start from zero, and are guaranteed to be continuous (i.e. there must be a track 1 if there is a track 0 and a track 2). If no video stream numbered vtrack exists, an error will be raised.
- int atrack = 0
- Specifies a numbered audio track. Track numbers start from zero, and are guaranteed to be continuous (i.e. there must be a track 1 if there is a track 0 and a track 2). If no audio stream numbered atrack exists, no error will be raised, and no audio will be returned.
SegmentedDirectShowSource(string base_filename [, ... ]
[, float fps, bool seek, bool audio, bool video ]
[,bool convertfps, bool seekzero, int timeout, string pixel_type ] )
- string base_filename =
- If base_filename="d:\filename.mov", SegmentedDirectShowSource will load the files d:\filename.00.mov, d:\filename.01.movand so on, through d:\filename.99.mov. Any files in this sequence that don't exist will be skipped.
- float fps = 24
- Frames Per Second of the resulting clip.
- bool seek = true
- There is full seeking support available on most file formats. If problems occur, try setting seekzero=true first. If seeking still causes problems, disable seeking completely with seek=false. With seeking disabled and trying to seek backwards, the audio stream returns silence, and the video stream returns the most recently rendered frame. Note the Avisynth cache may provide limited access to the previous few frames, but beyond that the most recently frame rendered will be returned.
- bool audio = true
- Enable audio on the resulting clip.
- bool video = true
- Enable video on the resulting clip.
- bool convertfps = false
- If true, it turns VFR (variable framerate) video into CFR (constant framerate) video by adding frames. This allows you to open VFR video in AviSynth. It is most useful when fps is set to the least common multiple of the component frame rates, e.g. 120 or 119.880.
- bool seekzero = false
- int timeout = 2000
- Set time (in milliseconds) to wait when DirectShow refuses to render. When the timeout period has expired and the frame has not been rendered, AviSynth returns a blank frame and/or silence. Negative timeout values will result in an error message.
- TODO please confirm this information
- string pixel_type = "RGB32"
- Request a color format from the decompressor. Valid values are listed in the table below, plus "AUTO" and "FULL".
- pixel_type="AUTO" negotiates to use all relevant official formats, YUV plus RGB.
- pixel_type="FULL" includes the non-standard pixel types listed in addition to those supported by "AUTO". See DirectShowSource
- Request a color format from the decompressor. Valid values are listed in the table below, plus "AUTO" and "FULL".
- For planar color formats, adding a '+' prefix, e.g.
AviSource(..., pixel_type="+YV12")
, tells AviSynth the video rows are DWORD aligned in memory instead of packed. This can fix skew or tearing of the decoded video when the width of the picture is not divisible by 4. - TODO please confirm this information
- For planar color formats, adding a '+' prefix, e.g.
Notes
Helpful hints
- If you get an Unrecognized Exception while reading a VirtualDub-generated segmented AVI, delete the small final .avi file.
- If segments are spanned across multiple drives/folders, they can be loaded provided the folders are given in the correct order.
- For example, if you have capture files arrange across several folders like this:
- To load all segments in order, call this:
SegmentedAviSource("F:\t1\cap.avi", "F:\t2\cap.avi", "F:\t3\cap.avi")