Skip to content
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

feat: Do not compress videos #221

Merged
merged 1 commit into from
Mar 24, 2024
Merged

feat: Do not compress videos #221

merged 1 commit into from
Mar 24, 2024

Conversation

megapro17
Copy link
Contributor

Tittle Here

Send videos without modifying a file

Description

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.

Issues Fixed or Closed by This PR

Check List

  • I have tested the changes and verified that they work and don't break anything(as well as I can manage) or drop the support for previous versions.
  • My code follows the code style of this project
  • I have merged commits that are meaningless for follow-up work and confirmed that they will not cause damage to follow-up maintenance

Copy link
Owner

@qwq233 qwq233 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. please sign your commit with a valid GnuPG signature
  2. add feat: prefix to your commit message

@megapro17 megapro17 changed the title Do not compress videos feat: Do not compress videos Mar 13, 2024
@qwq233
Copy link
Owner

qwq233 commented Mar 13, 2024

@megapro17
Copy link
Contributor Author

megapro17 commented Mar 15, 2024

btw have you tested your changes?

Yes, it's merged in forkgram, and working fine

@qwq233 qwq233 self-requested a review March 17, 2024 04:32
@megapro17
Copy link
Contributor Author

how to confirm the requested changes?

@qwq233
Copy link
Owner

qwq233 commented Mar 21, 2024

@megapro17 no time to review
sry
later this week/month i can do this

@qwq233 qwq233 merged commit 2597110 into qwq233:master Mar 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants