yeref 0.25.49__py3-none-any.whl → 0.25.52__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
@@ -16770,11 +16770,18 @@ async def item_to_dynamic_sticker(bot, chat_id, input_file, PACK_TYPE, PACK_KIND
|
|
16770
16770
|
# clip = mp.VideoFileClip(input_file)
|
16771
16771
|
# width, height = clip.size
|
16772
16772
|
|
16773
|
+
if width % 2 != 0: width -= 1
|
16774
|
+
if height % 2 != 0: height -= 1
|
16775
|
+
|
16773
16776
|
if width != height and (width > side_sz or height > side_sz):
|
16774
16777
|
if width > height:
|
16775
|
-
|
16778
|
+
h2 = int(side_sz * (height / width))
|
16779
|
+
if h2 % 2 != 0: h2 -= 1
|
16780
|
+
pixels_str = f"{side_sz}x{h2}"
|
16776
16781
|
else:
|
16777
|
-
|
16782
|
+
w2 = int(side_sz * (width / height))
|
16783
|
+
if w2 % 2 != 0: w2 -= 1
|
16784
|
+
pixels_str = f"{w2}x{side_sz}"
|
16778
16785
|
except Exception as e:
|
16779
16786
|
logger.info(log_ % str(e))
|
16780
16787
|
await asyncio.sleep(round(random.uniform(0, 1), 2))
|
@@ -16782,6 +16789,7 @@ async def item_to_dynamic_sticker(bot, chat_id, input_file, PACK_TYPE, PACK_KIND
|
|
16782
16789
|
try:
|
16783
16790
|
ffmpeg_command = ['ffmpeg', '-i', input_file, '-filter_complex_threads', '2', '-r', str(fps), '-b:v',
|
16784
16791
|
'40k', '-crf', '30', '-s', pixels_str, '-t', '3', '-an', '-y', file_mp4]
|
16792
|
+
print(f"{ffmpeg_command=}")
|
16785
16793
|
p = await asyncio.create_subprocess_exec(*ffmpeg_command)
|
16786
16794
|
await p.communicate()
|
16787
16795
|
|
@@ -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=ipm7YpxLwY1pKdBDoKWCzildZndwM0YlrNEgpB2NcT0,1026299
|
5
|
+
yeref-0.25.52.dist-info/METADATA,sha256=qVHqx63edqWZGBX99dXV_ZyF9pUSUdc0gNkGizquIrE,119
|
6
|
+
yeref-0.25.52.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
yeref-0.25.52.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
+
yeref-0.25.52.dist-info/RECORD,,
|
yeref-0.25.49.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=uma_7Bx_GvkbN2cDgXOCQaVsyOGe1QTO0BpKXKPDHOA,1025976
|
5
|
-
yeref-0.25.49.dist-info/METADATA,sha256=Au1e6PpYAuwMssfkHhNL7QU9TjdSN9xSEQ0lzFX9Swk,119
|
6
|
-
yeref-0.25.49.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
-
yeref-0.25.49.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
-
yeref-0.25.49.dist-info/RECORD,,
|
File without changes
|
File without changes
|