Open mojtabaasg opened 3 years ago
I requested from my friend to send me random video. this is the video he sent: https://user-images.githubusercontent.com/83122377/122592580-b3bc1480-d079-11eb-8c6e-c58fa7bcf9ce.mp4
and this is the video I saved using code above: https://user-images.githubusercontent.com/83122377/122592644-ce8e8900-d079-11eb-8b3c-1e5078ea562f.mp4
can you also provide the telegram version that was used? (android or macOS).
Its an unofficial app in android
I tried with official Telegram app 1 min ago and this problem again
same as @mojtabaasg i tried sending video file from the official Telegram client on android and the video file can't be opened. And yes! it works fine for other file like photo
any solution for this?
well just found out the problem is telethon itself. any downloading message with key and iv provided will be messed up and corrupted. not just video file, I have tried sending a pdf file and rar file. both are corrupted after sending. I once tried sending a video file without compression (sending as document), the video file is not really corrupted, its playable only in the first chunk.
Edited : Found solution that worked for me! I decided not to make the file being decrypted in chunk during downloading in telethon _download_file function. Instead, I let the encrypted file fully written on disk and later decrypted the file later. And it worked! @painor maybe you could provide a fix for that using this solution?
@Touexe can u share code how u downloaded in enc. format and then decry. it on disk
When someone sends me a video in secret chat, any video, the video is corrupted. This is my code:
This code works with all file types except videos after saving videos with this way, video can not be opened by any app. am I wrong or there is a problem?