-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to save gifs as .gif #1484
Comments
@chriseilander Server does not save original gifs at all. Perhaps there could be a converter from mp4 to gif added to Telegram Desktop, but I don't think this will be done soon. |
Probably best to save the originals instead of converting back — though that might use a lot of space, not sure. |
@ralesk The originals are not saved on the server, only the .mp4 |
I read that, yes :) My comment says that maybe they should be, rather than to convert back on request. |
Converting back on request would be great. Now, when I right click on a "used to be gif but now mp4" it has an option saying "Save GIF" but as far as I know this doesn't do anything. [edit] |
@chriseilander It saves gif to a separate tab in stickers panel. |
I also find this useful. Converting to MP4 makes the file great for in-app playback, but you should have the option to "export" it back to GIF to save it locally and share it to other apps. This could maybe be implemented by using an external tool like giflayer.com or similar. |
I came now to suggest a feature request about mp4 converter to gif, and I found this thread. So it would be great if you can add this converter. Because we want to save a lot of gifs but they are all in mp4. Thanks :) |
Telegram has beautiful bot platform for things like this one. |
what is the difference between sending gif as file and as photo ? but, i think download as gif from mp4 is very cool |
@stek29 So I would send a .gif, telegram converts it to .mp4, and a bot would convert it back to .gif. Not really a good way to do things. As @ucay suggested a way of sending the file should also matter. If I would send as a file it shouldn't change the fileformat. Or at least let us choose just like with photo's. I would be happy either way. |
I'd really love to be able to save my gifs as, well, gifs. Or at least have a bot to convert them. Sometimes I find I'd like to use on other social networks one of my telegram gifs, and I just can't. |
+1, I want to export my gifs as gifs! |
Even if we can't save GIFs as GIFs, I have two things to note:
This might at least make things less confusing. |
I ended up here because on Desktop there is an option called "Save GIF" It does nothing. |
@Draco18s It saves gifs to a saved gifs tab in stickers panel. |
@john-preston Ah, there they are. I even went looking for them when I saw the note to change the text to "save to stickers" and still couldn't find them. Rather than being where I expected (in the stickers list) it was in a semi-hidden "category" off where I'd mentally ignored the UI (because I give no foxes about popular sticker packs) that isn't accessible by scrolling. |
So will there ever be a function to save / download gifs as gifs on your file system and not to the gif tab in the sticker panel? |
To everyone who is in favour of this feature request: Why do you want .gif files? They are the same as .mp4, but much bigger, because .gif wasn't developed as a video format. What advantage is there in having a .gif file compared to .mp4? |
In my opinion it was a good choice of Telegram to use MP4's instead of GIFs. Because as you said it greatly decreases the file size, because not every frame is saved as an own image. But there is the problem. MP4s have more logic than GIFs behind them, which means GIFs are easier to display. That's why GIFs are much more common to be used on bulletin boards and other pages like 4chan. So it would be nice that we are able to save them as GIFs. One further use case of GIFs is reverse search. You can't use most of reverse image search engines with videos. But almost all accept GIFs. Examples: Google, Yandex, Bing & IQDB And for a more advanced use case. It is much easier (and faster) to edit or extract information of a GIF compared to other formats. Due to it being just a bunch of images in a sequence. PS: even though I think it is a good way to use MP4s instead of GIFs in Telegram itself. The naming is to some extent misleading, because they are not actual GIFs. |
What Nachtlab said. Not to mention that if I save the file locally and try and open it, Windows opens mp4 as a video file (which does not loop automatically and I would not want my video player to remember to always loop due to other content that I would want to watch) while gifs open in the Photo Viewer (the same program every other image I view opens in) and loops automatically every time. Also, Telegram is the only application that will embed and play an mp4 when it is posted. No other messaging or forum does this. Discord does not play mp4, no forum will let you use an img tag to link to an mp4, and you can't upload them to most image hosting websites (imgur I think is the only one). Yes, the file size is smaller, and its fine for Telegram to use this format itself, but it's a right pain in the ass do deal with when trying to share it anywhere else. |
Like some other people say, mp4's are still recognized as mostly an video format, and because of that terrible to use anywhere else. Even just opening a mp4 on your computer often fires up a big and slow mediaplayer, for just playing a 2 second video. So an option to locally convert an mp4 to gif when wanting to save an animation would be great. |
This is great and would be awesome. Is there any plan to do apply this functionality? |
https://t.me/gif_export_bot should do just that |
Hi, I was wondering if you could add this feature in |
GIFV is nothing but an MP4 or WEBM with a different extension name to inform the client it should be looped like a GIF so it wouldn't make much sense to save it as a GIFV. If you want a GIFV you can just use the normal MP4 that is downloaded and add But I don't think you should use it anyways because it is not widely used nor supported |
who is this and why am I getting these messages? Please stop.
…On Thu, Jul 25, 2019, 5:02 AM Nicku ***@***.***> wrote:
@BasixKOR <https://github.com/BasixKOR>
mind it's GIF or GIFV
GIFV is nothing but an MP4 or WEBM with a different extension name to
inform the client it should be looped like a GIF so it wouldn't make much
sense to save it as a GIFV. If you want a GIFV you can just use the normal
MP4 that is downloaded and add .gifv.
But I don't think you should use it anyways because it is not widely used
nor supported
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1484?email_source=notifications&email_token=AG7PGIEEKZNB3JRZFICPXNLQBFT27A5CNFSM4BYEYYD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2Y3CNQ#issuecomment-514961718>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG7PGIAMWIAFV4MRG24LNETQBFT27ANCNFSM4BYEYYDQ>
.
|
@waytootangled this is Telegram Desktop's github issues, you are receiving email notifications because you've contributed to it on May 3. The email itself you received told you that "you are receiving this because you commented", with a link to this issue. You can disable these emails from your GitHub's notifications preferences |
For opening files on computer maybe it could be saved with m4v extension by default instead of mp4 that should be reserved only for videos. The extension m4v is rather rarely used, so it can be associated with another application than video player like IrfanView. It for sure doesn't solve all problems, but would make it more comfortable to use on computers. |
This issue has not been addressed and is still an issue. |
The issue has not been addressed and is still an issue. |
1 similar comment
The issue has not been addressed and is still an issue. |
@mirodil1 server provides .mp4 soundless videos, so saving those files to .gif can be done only by re-compressing. This is not planned. |
You know what would be really easy? Just because "its not planned" is not a reason why it can't be added to the plan. |
It's weird that "Save GIF" button does not do anything from my view. In the end I made a tiny web app to convert mp4 to gif 😅 https://hyrious.me/tool/mp4-to-gif |
That's unbelievable that after over 7 years, it is still an issue. OMG 😰 |
@Bengerthelorf I doubt this will ever be implemented. When somebody sends a .gif the server usually auto-converts it to .mp4 and the app receives only .mp4, so for a .gif to be saved back it must be converted from .mp4 to .gif - this is a non-trivial thing to do and you won't get the original .gif file anyway, some similar one maybe. And due to amount of effort this requires I don't have any plans to implement that myself. If someone from the community needs this bad enough a PR can be reviewed. |
Me, some time ago
|
Being this non-trivial and definitely not easy is the reason. |
So? There's plenty of existing converters, use one of them. Here, have an open source one. It took me less than 5 seconds to find. It's even cross-platform. https://github.com/dudewheresmycode/giftuna (and it's licensed under CC0) Both mp4 and gif are open formats, so I don't see what the issue is. |
You probably misunderstand how it works. One application doesn't use other application to convert media data. It's done through libraries. tdesktop uses ffmpeg, a low-level library, so it has to implement a lot of code on top of it to be able to convert media data. |
Uh huh. I know its done via libraries. Adding a library to a project and going "has someone built an implementation layer on top of this library in before? Let me ask google" and you can almost certainly find one. Hell, I wrote a C# api layer for Novel AI without any documentation and was still able to find a prior existing attempt in another language to crib from. The "actually hard part" was dissecting the authentication and encryption mess, which mostly involved me (1) having the correct Sodium library (2) calling the right methods with the right parameters (there were differences between the JS library and the C#). Hell, I even figured out some things the other guy hadn't and let him know about what I'd found.
But... like... you could though... nothing stops an application from executing another application. The only requirement is that you can ship that other application with your own and what's this? GifTuna is open source CC0? Why, you could compile and ship that... Why, you could actually clone the GifTuna repo to a local temp directory and run that. 😲 What's this? ffmpeg has command line support? We don't even need GifTuna! We can just invoke ffmpeg console commands inside Telegram! |
It's considered a bad practice. Moreover, tdesktop likes to be a single binary application. |
Nice goal post moving. 😎 And sure, it does like to be, and you already said that ffmpeg is already being used by telegram desktop, which means the solution is literally right there and all you have to do is tell it to do a slightly different thing than its already doing. What's why libraries exist: the library is the hard part. The "a lot of code on top" is like, nothing, in comparison; in this case literally one or two lines to tell ffmpeg "hey here's an mp4, I want a gif plz" which is just the reverse of what the program is already doing when you send a gif. |
I'm not really sure that covers ffmpeg. The only I can remember is QtAV which is deprecated in the sake of proprietary library. There are also things like libvlc and libmpv which don't use ffmpeg (they're built on top of codec libraries themselves, so more like an analogue to ffmpeg) but have more higher level API, the problem with them is they don't support MSVC. There's also QtMultimedia that sadly uses the concept of using system codecs (while tdesktop likes to not to depend on them) until Qt 6.5 and tdesktop still uses Qt 5 on Windows. |
Although I'm not sure any of those libraries support conversion, I believe they support only playback. |
That's really hard. Just look at ffmpeg API documentation. |
Let me ask google... annnd....
|
Oh lol, it's definitely not like you think it is. The code implementing the player on top of ffmpeg APIs consists of a few dozens of files and a few hundreds (if not a thousand) of lines of code. |
It's ffmpeg program. It's not library API. |
Here's the code implementing audio capture. It gets the raw audio data with OpenAL and encodes into Opus with ffmpeg (libavcodec): https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/media/audio/media_audio_capture.cpp. As you can see, most of the code is the ffmpeg part and the file is of ~800 lines of code. It also uses various helper functions from other files, if counting them all, it would be way more. It's just audio, just encoding. You would have first to demux audio+video from container, then decode them, then encode them again and mux into a different container (which is the image one, not even the video one!). That would be WAY more lines of code and multiple times harder. |
Still, an issue, + the files are big after saving. needs a compressor as well |
We are still waiting |
Waiting |
mp4 version does not loop, whereas a gif does. so a 1 or 2 second loop turns out to be a fail as mp4 |
How is it still not possible to save a gif lol |
Great that Telegram now turns gifs in mp4's, they load faster. I really wished I could still save the original .gif though... Me and my friends loved to save them to our shared dropbox for easy use (even outside of Telegram).
The text was updated successfully, but these errors were encountered: