yeref 0.25.58__py3-none-any.whl → 0.25.60__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.
yeref/yeref.py
CHANGED
@@ -16762,6 +16762,12 @@ async def item_to_dynamic_sticker(bot, chat_id, input_file, PACK_TYPE, PACK_KIND
|
|
16762
16762
|
try:
|
16763
16763
|
if not is_circle and PACK_TYPE == 'sticker':
|
16764
16764
|
print(f"auuu {input_file=}")
|
16765
|
+
print(f"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
|
16766
|
+
print(f"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
|
16767
|
+
print(f"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
|
16768
|
+
print(f"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
|
16769
|
+
print(f"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
|
16770
|
+
print(f"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
|
16765
16771
|
cap = cv2.VideoCapture(input_file)
|
16766
16772
|
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
|
16767
16773
|
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
|
@@ -16769,6 +16775,40 @@ async def item_to_dynamic_sticker(bot, chat_id, input_file, PACK_TYPE, PACK_KIND
|
|
16769
16775
|
|
16770
16776
|
# clip = mp.VideoFileClip(input_file)
|
16771
16777
|
# width, height = clip.size
|
16778
|
+
|
16779
|
+
import tempfile
|
16780
|
+
print(1)
|
16781
|
+
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
|
16782
|
+
print(2)
|
16783
|
+
tmp_fd, tmp_path = tempfile.mkstemp(suffix='.mp4')
|
16784
|
+
print(3)
|
16785
|
+
os.close(tmp_fd)
|
16786
|
+
print(4)
|
16787
|
+
cap = cv2.VideoCapture(input_file)
|
16788
|
+
print(5)
|
16789
|
+
out = cv2.VideoWriter(tmp_path, fourcc, fps, (width, height))
|
16790
|
+
print(6)
|
16791
|
+
while True:
|
16792
|
+
print(7)
|
16793
|
+
ret, frame = cap.read()
|
16794
|
+
print(8)
|
16795
|
+
if not ret: break
|
16796
|
+
print(9)
|
16797
|
+
img = Image.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
|
16798
|
+
print(10)
|
16799
|
+
output_ = remove(img)
|
16800
|
+
print(11)
|
16801
|
+
frame2 = cv2.cvtColor(np.array(output_), cv2.COLOR_RGB2BGR)
|
16802
|
+
print(12)
|
16803
|
+
out.write(frame2)
|
16804
|
+
print(13)
|
16805
|
+
cap.release()
|
16806
|
+
print(14)
|
16807
|
+
out.release()
|
16808
|
+
print(15)
|
16809
|
+
os.replace(tmp_path, input_file)
|
16810
|
+
print(16)
|
16811
|
+
print(f"{tmp_path=}, {input_file=}")
|
16772
16812
|
|
16773
16813
|
if width % 2 != 0: width -= 1
|
16774
16814
|
if height % 2 != 0: height -= 1
|
@@ -0,0 +1,8 @@
|
|
1
|
+
yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
|
2
|
+
yeref/l_.py,sha256=Pc6C6WIIV1MZ_tv7wAkIUJttn0yUC-ewqjTdrX8VDeA,1117680
|
3
|
+
yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
|
4
|
+
yeref/yeref.py,sha256=TzvWOsiuq5yfwQ4Ryfislk2afVU4hUlo1moh4_hWskg,1029106
|
5
|
+
yeref-0.25.60.dist-info/METADATA,sha256=Ita4rzx9yyJQI3MaTG_j8bjYfikAsaMDJj2SmjpkZwM,119
|
6
|
+
yeref-0.25.60.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
yeref-0.25.60.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
+
yeref-0.25.60.dist-info/RECORD,,
|
yeref-0.25.58.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
|
2
|
-
yeref/l_.py,sha256=Pc6C6WIIV1MZ_tv7wAkIUJttn0yUC-ewqjTdrX8VDeA,1117680
|
3
|
-
yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
|
4
|
-
yeref/yeref.py,sha256=QA8tFFXR6m41M2qIfxwDyxKzxMGEFXKjKr_bk_xzD-o,1027138
|
5
|
-
yeref-0.25.58.dist-info/METADATA,sha256=kd0ZfZlKwlKi8dcQZ9G39z816jDKkudIOz-G9hBJFVE,119
|
6
|
-
yeref-0.25.58.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
-
yeref-0.25.58.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
-
yeref-0.25.58.dist-info/RECORD,,
|
File without changes
|
File without changes
|