forkgram / TelegramAndroid

Fork client of Telegram app for Android.
GNU General Public License v2.0
591 stars 30 forks source link

Do not compress videos #213

Closed megapro17 closed 6 months ago

megapro17 commented 7 months ago

When you're sending an video from android, it's not possible to send it without modifying video file. It will be remuxed (taking video stream into a new container, losing all it's metadata in the best case), even if you select the highest quality, if it has big enough bitrate, it will be forcefully compressed. It can't be disabled. Also it does compress audio horribly, with artifacts at the beginning. These both action are very slow, it's much faster to send a video as document, which results that video is send exactly as is, without any changes (the same file hash). But it results to video is not embedded in chat, it does show as a document, not as video. Telegram Desktop and Telegram Web does not modify video file in any way, but video does show as a video. My patch resolves this problem. Now you can send a video as document, but it will show as video anyway. Click file - gallery and select a video. The same behavior as is in official Telegram X client. It also fixes the problem with missing video file name.

23rd commented 6 months ago

Can't confirm that this patch works. The menu item "Send as file" still sends video as documents. Perhaps I did not get you in right way.

megapro17 commented 6 months ago

No, just click Paperclip - File - Gallery and select a file. Don't click open in. Send compiled apk, project does not build on windows

23rd commented 6 months ago

Ok, now I can see. Fine, let's try this.

megapro17 commented 6 months ago

It tries to run TMessagesProj/jni/build_libvpx_clang.sh which doesn't work on windows... I had no issues with building other clients