How to record motioneye camera and send it via telegram

Hi,
I recently successfully created an automation that sends me a photo of a motioneye camera via telegram once a motion sensor triggers. Now I want to go to the next level and let ha send a few seconds of the feed instead.

My setup:
A PC that runs Motioneye in a docker container.
Homeassistant running on Raspberry pi with a zigbee stick.
A zigbee motion sensor.

The only part I need help with is the recording of the feed and sending it via telegram. I found out that there is a telegram_bot.send_video service but I don’t know how to plug it up so it takes a few seconds of a motioneye feed. The photo part was easy because giving it url: ‘http://******:8765/picture/3/current/’ was enough.

I’m thankful for any help.

There is something that can be useful here (but in russian).
Additionally, I am testing a telegram bot that can upload camera files to telegram through FTP without any additional software and hardware. Hope it will be useful. t.me/ftp2bot