yta-video-opengl 0.0.16__py3-none-any.whl → 0.0.18__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- yta_video_opengl/complete/frame_combinator.py +293 -0
- yta_video_opengl/complete/frame_generator.py +278 -0
- yta_video_opengl/complete/frame_wrapper.py +122 -0
- yta_video_opengl/complete/timeline.py +192 -148
- yta_video_opengl/complete/track.py +75 -28
- yta_video_opengl/complete/video_on_track.py +1 -1
- yta_video_opengl/reader/cache/video.py +3 -0
- yta_video_opengl/tests.py +6 -1
- yta_video_opengl/video.py +6 -2
- {yta_video_opengl-0.0.16.dist-info → yta_video_opengl-0.0.18.dist-info}/METADATA +1 -1
- {yta_video_opengl-0.0.16.dist-info → yta_video_opengl-0.0.18.dist-info}/RECORD +13 -11
- yta_video_opengl/complete/blend.py +0 -83
- {yta_video_opengl-0.0.16.dist-info → yta_video_opengl-0.0.18.dist-info}/LICENSE +0 -0
- {yta_video_opengl-0.0.16.dist-info → yta_video_opengl-0.0.18.dist-info}/WHEEL +0 -0
@@ -1,10 +1,12 @@
|
|
1
1
|
yta_video_opengl/__init__.py,sha256=ycAx_XYMVDfkuObSvtW6irQ0Wo-fgxEz3fjIRMe8PpY,205
|
2
2
|
yta_video_opengl/classes.py,sha256=t5-Tfc7ecvHl8JlVBp_FVzZT6ole6Ly5-FeBBH7wcxo,37742
|
3
3
|
yta_video_opengl/complete/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
yta_video_opengl/complete/
|
5
|
-
yta_video_opengl/complete/
|
6
|
-
yta_video_opengl/complete/
|
7
|
-
yta_video_opengl/complete/
|
4
|
+
yta_video_opengl/complete/frame_combinator.py,sha256=uYg7907knjBlmZUZCCzkxDcj0Nown0muvL5PNVS707A,9413
|
5
|
+
yta_video_opengl/complete/frame_generator.py,sha256=VRcPgpqfxQWMeLzgEJObbM0xu7_85I1y_YyQVhcEswc,7853
|
6
|
+
yta_video_opengl/complete/frame_wrapper.py,sha256=g0aTcUVmF5uQtxs95_XsxlwL0QUj-fNOSRHvK4ENqg4,3347
|
7
|
+
yta_video_opengl/complete/timeline.py,sha256=haUTJoGv15Xqt0G1E52St_PmYrzoqwPF_k88FWBIfyA,16188
|
8
|
+
yta_video_opengl/complete/track.py,sha256=kLd8iUUPKVbCvk0nRnL630lagjh-8QengcZU65xa21c,15706
|
9
|
+
yta_video_opengl/complete/video_on_track.py,sha256=laxDvMr1rrmnDfHpk825j42f4pj9I1X8vOFmzwteuM8,4824
|
8
10
|
yta_video_opengl/nodes/__init__.py,sha256=TZ-ZO05PZ0_ABq675E22_PngLWOe-_w5s1cLlV3NbWM,3469
|
9
11
|
yta_video_opengl/nodes/audio/__init__.py,sha256=4nKkC70k1UgLcCSPqFWm3cKdaJM0KUmQTwGWv1xFarQ,2926
|
10
12
|
yta_video_opengl/nodes/video/__init__.py,sha256=gSoaoEmjdQmyRwH18mf5z3NAhap3S0RgbeBbfBXi4jc,132
|
@@ -13,13 +15,13 @@ yta_video_opengl/reader/__init__.py,sha256=kKvOAEeDjIwAaWtpDEQHdAd_Gwk3Ssz2tv6gp
|
|
13
15
|
yta_video_opengl/reader/cache/__init__.py,sha256=PAfGM2J-8Vv6p6Cd9aAUvyBcw3rjx2gy_2pJO22VtDM,7020
|
14
16
|
yta_video_opengl/reader/cache/audio.py,sha256=cm_1D5f5RnmJgaidA1pnEhTPF8DE0mU2MofmwjU_b5k,6781
|
15
17
|
yta_video_opengl/reader/cache/utils.py,sha256=9aJ6qyUFRvoh2jRbIvtF_-1MOm_sgQtPiy0WXLCZYcA,1402
|
16
|
-
yta_video_opengl/reader/cache/video.py,sha256=
|
18
|
+
yta_video_opengl/reader/cache/video.py,sha256=3sT9cE0sdTty5AE9yFAPJrJNxCX5vWVATK8OeJInr8I,3496
|
17
19
|
yta_video_opengl/t.py,sha256=xOhT1xBEwChlXf-Tuy-WxA_08iRJWVlnL_Hyzr-9-sk,6633
|
18
|
-
yta_video_opengl/tests.py,sha256=
|
20
|
+
yta_video_opengl/tests.py,sha256=6s5x-RReIZ38d1c4gB7aMoDLHLrC0LWEttOYyixhUV0,27838
|
19
21
|
yta_video_opengl/utils.py,sha256=yUi17EjNR4SVpvdDUwUaKl4mBCb1uyFCSGoIX3Zr2F0,15586
|
20
|
-
yta_video_opengl/video.py,sha256=
|
22
|
+
yta_video_opengl/video.py,sha256=Fgu_BzuDlMbfl1Hwjk8Yzo3ZxO73wPuyTUjTbf9OSLw,8951
|
21
23
|
yta_video_opengl/writer.py,sha256=QwvjQcEkzn1WAVqVTFiI6tYIXJO67LKKUTJGO_eflFM,8893
|
22
|
-
yta_video_opengl-0.0.
|
23
|
-
yta_video_opengl-0.0.
|
24
|
-
yta_video_opengl-0.0.
|
25
|
-
yta_video_opengl-0.0.
|
24
|
+
yta_video_opengl-0.0.18.dist-info/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
|
25
|
+
yta_video_opengl-0.0.18.dist-info/METADATA,sha256=3sGbbiucD3tIj8QtHNmXKfEK8JW6ZjBWo09xKXmBplY,714
|
26
|
+
yta_video_opengl-0.0.18.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
27
|
+
yta_video_opengl-0.0.18.dist-info/RECORD,,
|
@@ -1,83 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
TODO: I don't like the name nor the
|
3
|
-
location of this file, but it is here
|
4
|
-
to encapsulate some functionality
|
5
|
-
related to combining video frames.
|
6
|
-
"""
|
7
|
-
import numpy as np
|
8
|
-
|
9
|
-
|
10
|
-
def blend_alpha(
|
11
|
-
bottom,
|
12
|
-
top,
|
13
|
-
alpha = 0.5
|
14
|
-
):
|
15
|
-
return (alpha * top + (1 - alpha) * bottom).astype(np.uint8)
|
16
|
-
|
17
|
-
def blend_add(
|
18
|
-
bottom,
|
19
|
-
top
|
20
|
-
):
|
21
|
-
"""
|
22
|
-
Aclara la imagen combinada, como si superpusieras dos proyectores de luz.
|
23
|
-
"""
|
24
|
-
return np.clip(bottom.astype(np.int16) + top.astype(np.int16), 0, 255).astype(np.uint8)
|
25
|
-
|
26
|
-
def blend_multiply(
|
27
|
-
bottom,
|
28
|
-
top
|
29
|
-
):
|
30
|
-
"""
|
31
|
-
Oscurece, como proyectar dos transparencias juntas.
|
32
|
-
"""
|
33
|
-
return ((bottom.astype(np.float32) * top.astype(np.float32)) / 255).astype(np.uint8)
|
34
|
-
|
35
|
-
def blend_screen(
|
36
|
-
bottom,
|
37
|
-
top
|
38
|
-
):
|
39
|
-
"""
|
40
|
-
Hace lo contrario a Multiply, aclara la imagen.
|
41
|
-
"""
|
42
|
-
return (255 - ((255 - bottom.astype(np.float32)) * (255 - top.astype(np.float32)) / 255)).astype(np.uint8)
|
43
|
-
|
44
|
-
def blend_overlay(
|
45
|
-
bottom,
|
46
|
-
top
|
47
|
-
):
|
48
|
-
"""
|
49
|
-
Mezcla entre Multiply y Screen según el brillo de cada píxel.
|
50
|
-
"""
|
51
|
-
b = bottom.astype(np.float32) / 255
|
52
|
-
t = top.astype(np.float32) / 255
|
53
|
-
mask = b < 0.5
|
54
|
-
result = np.zeros_like(b)
|
55
|
-
result[mask] = 2 * b[mask] * t[mask]
|
56
|
-
result[~mask] = 1 - 2 * (1 - b[~mask]) * (1 - t[~mask])
|
57
|
-
return (result * 255).astype(np.uint8)
|
58
|
-
|
59
|
-
def blend_difference(
|
60
|
-
bottom,
|
61
|
-
top
|
62
|
-
):
|
63
|
-
"""
|
64
|
-
Resalta las diferencias entre los dos frames.
|
65
|
-
"""
|
66
|
-
return np.abs(bottom.astype(np.int16) - top.astype(np.int16)).astype(np.uint8)
|
67
|
-
|
68
|
-
# TODO: This one needs a mask, thats why
|
69
|
-
# it is commented
|
70
|
-
# def blend_mask(
|
71
|
-
# bottom,
|
72
|
-
# top,
|
73
|
-
# mask
|
74
|
-
# ):
|
75
|
-
# """
|
76
|
-
# En lugar de un alpha fijo, puedes pasar una máscara (por ejemplo, un degradado o un canal alfa real)
|
77
|
-
|
78
|
-
# mask: array float32 entre 0 y 1, mismo tamaño que frame.
|
79
|
-
# """
|
80
|
-
# return (mask * top + (1 - mask) * bottom).astype(np.uint8)
|
81
|
-
|
82
|
-
|
83
|
-
|
File without changes
|
File without changes
|