cutcutcodec.core.filter.video.delay.FilterVideoDelay¶
- class cutcutcodec.core.filter.video.delay.FilterVideoDelay(in_streams: Iterable[Stream], delay: Real)[source]¶
Change the beginning time of a stream.
Attributes¶
- delayFraction
The delay append to the original beginning time of the stream (readonly). a positive value indicates that the output flow is later than the input flow.
Examples¶
>>> from cutcutcodec.core.filter.video.delay import FilterVideoDelay >>> from cutcutcodec.core.generation.video.noise import GeneratorVideoNoise >>> >>> (s_base_video,) = GeneratorVideoNoise(0).out_streams >>> (s_trans_video,) = FilterVideoDelay([s_base_video], 10).out_streams >>> >>> (s_base_video.snapshot(0, (1, 1)) == s_trans_video.snapshot(10, (1, 1))).all() tensor(True) >>> (s_base_video.snapshot(10, (1, 1)) == s_trans_video.snapshot(10, (1, 1))).all() tensor(False) >>>
Initialise and create the class.
Parameters¶
- in_streamstyping.Iterable[Stream]
Transmitted to
cutcutcodec.core.classes.filter.Filter.- delaynumbers.Real
The temporal translation value to apply at the output video stream.