When "pyrogram" is used to upload videos in batches, the video frames will stretch and the video duration will not be displaye
Because there are many videos and different screen sizes, the specific width and height cannot be set
def main(video_file,fname):
def progress(current, total):
print(f"{current * 100 / total:.1f}%")
app.start()
app.send_video('chat_id',video_file, progress=progress,caption=fname,parse_mode=enums.ParseMode.MARKDOWN)
time.sleep(1)
with open(video_file, 'w',encoding='utf-8') as f:
f.write('')
f.close()
return app.stop()
Is there any solution to make the video display normally