all repos — gopipe @ 43ffb36276331d392513407e97a3292f8c65d9c4

Embed YouTube videos on Telegram, Discord and more!

update readme
Marco Andronaco andronacomarco@gmail.com
Wed, 16 Oct 2024 12:18:50 +0200
commit

43ffb36276331d392513407e97a3292f8c65d9c4

parent

4f63af74cb8008676063943eb6b457c0a76bc03c

1 files changed, 14 insertions(+), 2 deletions(-)

jump to
M README.mdREADME.md

@@ -6,12 +6,24 @@ Replace `www.youtube.com` or `youtu.be` with `y.outube.duckdns.org` to fix embeds for short videos.

https://github.com/birabittoh/FixYouTube-legacy/assets/26506860/e1ad5397-41c8-4073-9b3e-598c66241255 +### Advanced usage +Some services require video previews to be smaller than a certain file size. This app gets the best-looking format by default, so it's not uncommon to have previews that are too big, thus being ignored by crawlers. + +Enter the `/{videoID}/{formatID}` endpoint. + +You can change `formatID` to cycle through the available formats for a given video. These formats are also filtered based on file size, in a way that makes them viable Telegram previews. + +In short, if `/{videoID}` does not generate a preview, you can try `/{videoID}/1`, which should be the best-looking format within Telegram's filesize bounds. + +The next values of `formatID` (2 to infinity) are even smaller formats within those bounds. + +If the video is too long, there might not be small enough formats. In that case, the app returns error 500. + ## Instructions -First of all, you should set the API key to whatever you want: +First of all, you should create a `.env` file: ``` cp .env.example .env -nano .env ``` ### Docker with reverse proxy