Closed jasomdotnet closed 4 years ago
Telegram is not video streaming website, Telegram is not a social network, Telegram is a instant messaging system, with it's own transport protocol.
You can't watch videos by just clicking on "t.me/xxx" link, because there is no video streaming on t.me website - all video's accessible only using telegram protocol(you must have installed client, or use web-client), not directly via http(-s).
Implementing this is different from main goal and current architecture of YouTube-dl, also it requires adding some pretty huge Telegram client library to youtube-dl dependencies(like Telethon or pyrogram).
Also, I think, it's don't have any practical purpose - inside telegram you can literally just right-click and select "download" on any video - there is no any downloading restriction's like on streaming websites.
Also, I think, it's don't have any practical purpose - inside telegram you can literally just right-click and select "download" on any video - there is no any downloading restriction's like on streaming websites.
I found out this later.
Leaving this open if anybody wants to add additional comments
Hi @sergey-rufanov,
You can't watch videos by just clicking on "t.me/xxx" link, because there is no video streaming on t.me website - all video's accessible only using telegram protocol(you must have installed client, or use web-client), not directly via http(-s).
If I access t.me messages with my firefox browser and if they embed videos or voice messages, I can watch/hear them directly within the browser. So, videos or voice messages might accessed via http(-s) by the browser – ant not via telegram protocol? Or, the telegram protocol is build in the browser?
Also, I think, it's don't have any practical purpose - inside telegram you can literally just right-click and select "download" on any video - there is no any downloading restriction's like on streaming websites.
But I think it might have a practical purpose: On my desktop computer (in my case the OS is Linux, but I think that there would be a real purpose for other OSs, too) I want to watch/hear telegram videos or voice messages on an external application like mpv for better (means: more exactly) forward/backwards skipping inside the videos or voice messages. mpv uses youtube-dl to access to videos etc. and then play them without downloading them permanently. If I actually want to cause a familar behaviour, I first have to download the video etc. to my "/tmp"-directory and then access to it via mpv or a similar application. So, to simplify the whole procedure, the Telegram (t.me) support should be added to youtube-dl.
ytdl is compatible with t.me/xyz/123 media content when you add ?embed=1 suffix:
youtube-dl https://t.me/police_frequency/19788?embed=1
[generic] 19788?embed=1: Requesting header WARNING: Could not send HEAD request to https://t.me/police_frequency/19788?embed=1: HTTP Error 501: Not Implemented [generic] 19788?embed=1: Downloading webpage WARNING: Falling back on generic information extractor. [generic] 19788?embed=1: Extracting information [download] Downloading playlist: Telegram Widget [generic] playlist Telegram Widget: Collected 1 video ids (downloading 1 of them) [download] Downloading video 1 of 1 [download] Destination: Telegram Widget-19788embed=1.mp4 [download] 100% of 1.25MiB in 00:00 [download] Finished downloading playlist: Telegram Widgetmp4 link that can played by mpv
@aatv I LOVE YOU THANK YOU OMG
Another use-case: if t.me says Media is too big
(for the browser) and only offers view in telegram
.
The ?embed=1
suffix method does not work in my case.
Another use-case: if t.me says
Media is too big
(for the browser) and only offersview in telegram
.The
?embed=1
suffix method does not work in my case.
I just ran into that too. RIP.
Example URLs
Description
Hi, add support for Telegram. It's social network with more then 200 million users. See this press release: https://telegram.org/blog/200-million Twitter or Instagram is similar service like Telegram.