yeref 0.25.58__py3-none-any.whl → 0.25.59__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
@@ -16769,6 +16769,40 @@ async def item_to_dynamic_sticker(bot, chat_id, input_file, PACK_TYPE, PACK_KIND
16769
16769
 
16770
16770
  # clip = mp.VideoFileClip(input_file)
16771
16771
  # width, height = clip.size
16772
+
16773
+ import tempfile
16774
+ print(1)
16775
+ fourcc = cv2.VideoWriter_fourcc(*'mp4v')
16776
+ print(2)
16777
+ tmp_fd, tmp_path = tempfile.mkstemp(suffix='.mp4')
16778
+ print(3)
16779
+ os.close(tmp_fd)
16780
+ print(4)
16781
+ cap = cv2.VideoCapture(input_file)
16782
+ print(5)
16783
+ out = cv2.VideoWriter(tmp_path, fourcc, fps, (width, height))
16784
+ print(6)
16785
+ while True:
16786
+ print(7)
16787
+ ret, frame = cap.read()
16788
+ print(8)
16789
+ if not ret: break
16790
+ print(9)
16791
+ img = Image.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
16792
+ print(10)
16793
+ output_ = remove(img)
16794
+ print(11)
16795
+ frame2 = cv2.cvtColor(np.array(output_), cv2.COLOR_RGB2BGR)
16796
+ print(12)
16797
+ out.write(frame2)
16798
+ print(13)
16799
+ cap.release()
16800
+ print(14)
16801
+ out.release()
16802
+ print(15)
16803
+ os.replace(tmp_path, input_file)
16804
+ print(16)
16805
+ print(f"{tmp_path=}, {input_file=}")
16772
16806
 
16773
16807
  if width % 2 != 0: width -= 1
16774
16808
  if height % 2 != 0: height -= 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.25.58
3
+ Version: 0.25.59
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
@@ -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=FSN4kIb0Vxa7pKYyDbcAbh25iAGF041XYJyQBobVzJY,1028554
5
+ yeref-0.25.59.dist-info/METADATA,sha256=B8PvrpSm-XxaRqAd84Ko6H83NMzs5t9qwtqiGbD_EkA,119
6
+ yeref-0.25.59.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ yeref-0.25.59.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
8
+ yeref-0.25.59.dist-info/RECORD,,
@@ -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,,