Splice
From Avisynth wiki
(Difference between revisions)
m (1 revision) |
(add link to avs+ documentation) |
||
(5 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | <div style="max-width:62em" > |
+ | <div {{BlueBox2|40|0|3px solid purple}} > | ||
+ | {{AvsPlusFullname}}<br> | ||
+ | Up-to-date documentation: [https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/splice.html https://avisynthplus.readthedocs.io] | ||
+ | </div> | ||
− | |||
− | + | Join two or more video clips end to end. The difference between the filters lies in the way they treat the sound track. | |
+ | </div> | ||
− | + | == Syntax and Parameters == | |
+ | <div style="max-width:62em" > | ||
+ | {{Func2Def | ||
+ | |AlignedSplice(clip ''clip1'', clip ''clip2'' [,...]) | ||
+ | |UnalignedSplice(clip ''clip1'', clip ''clip2'' [,...]) | ||
+ | }} | ||
− | ''' | + | ;'''AlignedSplice''' |
+ | :Ajusts the audio (cuts off sound or inserts silence as necessary) to ensure that the sound remains synchronized with the video. | ||
− | + | ;'''UnalignedSplice''' | |
+ | :Simply concatenates the sound without regard to synchronization with the video. | ||
+ | |||
+ | {{HalfBreak}} | ||
+ | You should use '''AlignedSplice''' for most situations. | ||
+ | |||
+ | You should use '''UnalignedSplice''' when the soundtracks being joined were originally contiguous—for example, when you're joining files captured with [http://www.avi-io.com/ AVI-IO]. Using '''AlignedSplice''' in these situations may lead to glitches in the sound. | ||
+ | |||
+ | AviSynth provides '''++''' and '''+''' [[Operators|operators]] as synonyms for '''AlignedSplice''' and '''UnalignedSplice''' respectively. | ||
+ | |||
+ | {{HalfBreak}} | ||
+ | * Note, the [[Clip_properties|media properties]] must be compatible, meaning all clips must have: | ||
+ | # the same height and width, | ||
+ | # the same [[Convert|color format]], | ||
+ | # the same frame rate, and | ||
+ | # the same audio sample rate, bit depth and number of channels. | ||
+ | </div> | ||
+ | |||
+ | |||
+ | == Examples == | ||
+ | <div style="max-width:62em" > | ||
+ | * Join segmented capture files (with UnalignedSplice) to produce a single clip: | ||
+ | <div {{BoxWidthIndent|54|1}} > | ||
UnalignedSplice([[AviSource]]("cap1.avi"),AviSource("cap2.avi"),AviSource("cap3.avi")) | UnalignedSplice([[AviSource]]("cap1.avi"),AviSource("cap2.avi"),AviSource("cap3.avi")) | ||
# or: | # or: | ||
AviSource("cap1.avi") + AviSource("cap2.avi") + AviSource("cap3.avi") | AviSource("cap1.avi") + AviSource("cap2.avi") + AviSource("cap3.avi") | ||
+ | </div> | ||
− | + | * Extract three scenes from a clip and join them together in a new order with AlignedSplice: | |
+ | <div {{BoxWidthIndent|54|1}} > | ||
AviSource("video.avi") | AviSource("video.avi") | ||
[[Trim]](2000,2500) ++ Trim(3000,3500) ++ Trim(1000,1500) | [[Trim]](2000,2500) ++ Trim(3000,3500) ++ Trim(1000,1500) | ||
− | + | </div> | |
+ | </div> | ||
[[Category:Internal filters]] | [[Category:Internal filters]] | ||
+ | [[Category:Timeline_editing_filters]] |
Latest revision as of 06:57, 18 September 2022
AviSynth+
Up-to-date documentation: https://avisynthplus.readthedocs.io
Join two or more video clips end to end. The difference between the filters lies in the way they treat the sound track.
[edit] Syntax and Parameters
AlignedSplice(clip clip1, clip clip2 [,...])
UnalignedSplice(clip clip1, clip clip2 [,...])
- AlignedSplice
- Ajusts the audio (cuts off sound or inserts silence as necessary) to ensure that the sound remains synchronized with the video.
- UnalignedSplice
- Simply concatenates the sound without regard to synchronization with the video.
You should use AlignedSplice for most situations.
You should use UnalignedSplice when the soundtracks being joined were originally contiguous—for example, when you're joining files captured with AVI-IO. Using AlignedSplice in these situations may lead to glitches in the sound.
AviSynth provides ++ and + operators as synonyms for AlignedSplice and UnalignedSplice respectively.
- Note, the media properties must be compatible, meaning all clips must have:
- the same height and width,
- the same color format,
- the same frame rate, and
- the same audio sample rate, bit depth and number of channels.
[edit] Examples
- Join segmented capture files (with UnalignedSplice) to produce a single clip:
UnalignedSplice(AviSource("cap1.avi"),AviSource("cap2.avi"),AviSource("cap3.avi")) # or: AviSource("cap1.avi") + AviSource("cap2.avi") + AviSource("cap3.avi")
- Extract three scenes from a clip and join them together in a new order with AlignedSplice:
AviSource("video.avi") Trim(2000,2500) ++ Trim(3000,3500) ++ Trim(1000,1500)