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
Bug - Video files from mount drives cannot be uploaded #6
Comments
Was resolved in #1 (comment) |
This is exactly what i wanted . Ability to upload on telegram directly off a mounted drive . Can you please tell what all changes i need to do for this ? ( Also i would like to have thumbnaill enabled for streamable videos ) |
Sorry for the late response, I didn't see your question earlier. I described the modifications here. You must have FFmpeg installed and in your path, and also you have to install natsort, if you want to have the files/videos sorted in natural order 1,2.3...not 1,10,2. After that you use the script as usual, but instead of the path to the local directory you use the path to folders in the mounted drive. If you have difficulties, I could upload the modified file. Let me know if you encounter problems. Good luck! |
@tissole |
Don't worry, I'm not familiar at all with python, just hours spent on documenting and trial and error ;) I've changed the time between uploads from 10 to 5 seconds (line 81). You could change it back or try a lower value, but if you go much lower, the flood waits will appear more frequently. Now the script automatically restarts after the flood waits, you don't have to restart it manually. But even those flood msgs only appear if you go 0s or if you upload many small files in a short period of time. With big files, they don't appear. Here is the file, just replace the old file in uploadgram folder. Let me know if it is working! |
Great , i am gonna try this now . Just to be sure , while uploading to telegram off mount the script doesn't downloads the files locally in any way right ? Like say with system having just 10 gb of storage , i can upload files of any size whatsoever right ? ( Eg say i have 50 files of 2 gb each total being 100 gb ) |
No, I haven't seen any files downloaded locally. It happens in memory, I think. |
@tissole Hello , i couldn't test uploadgram with your modified file as i wasn't home this week . Finally got around testing it but unfortunately it doesn't seem to work . After i run the uploadgram command , it starts the process and ends it automatically in 1-2 seconds . i am using rclone mount to mount my google drive remote Also seeing the changes in your file , only difference i can notice is the floodwait & natsort thing . Not really getting how could that make mount upload to start working |
There are more changes there, some critical to uploading from mounted drives. You replaced the original file with the modified one, or you modified the original file? What is the message error and what command did you run? |
@tissole Rclone command used to mount - Uploadgram command used - There's not really any error , after running the uploadgram command it starts normally & ends on its own normally like it does ( but all this completes within 2-3 seconds so there isn't anything uploaded ) |
Try |
Ah yes , finally it worked . Not sure if the file itself was corrupted or something else . Its working for all files on drive mount now Also just to confirm , is it just me or the upload through mount is 2,3 times slower ? |
Yes, it is a little bit slower when uploading from a mounted drive. You can also drag and drop from a mounted drive directly in to a chat window open in a telegram client. You can use Kotatogram or 64Gram , these clients have a setting for boosting upload speed. |
yeah i have heard about these clients but if each of our files to be uploaded is inside a folder than we can't multi select them so its not feasible to do it from client GUI , with cli i can just use uploadgram to loop over each folder . i wish we could have these speed enhancements from 64gram with cli on uploadgram itself , do you know the relevant part of 64gram code which achieves this ? i can probably get it done from some people who know pyrogram well |
Uploadgram is much faster than telegram-upload, because it is based on Pyrogram. The original project uses Telethon which uploads files sequentially. I think Pyrogram uses parallel uploads. |
That's great , i will check the links you sent to check the relevent modifications in 64gram to see if it can be done with pyrogram to implement in uploadgram. On another note , have you been able to test speed of FastTelethon ? ( Is it faster than uploadgram ) I am really eager to test it out but just can't figure out how to use it |
I have tested FastTelethon, Pyrogram is still fastest. For FastTelethon use url-uploader. Install req., export envs and run python main.py. Then go to the bot and run |
I'm on Windows 10 running uploadgram 0.1.7
I mounted a Google Drive on my PC and tried to upload from there to TG. It works for audios and documents, but sometimes I encounter this error
https://sourceb.in/aw4yDgIKIx
It always fails when I try to upload videos with this error
https://sourceb.in/5rDRPxOc64
I suspected that the cause was those thumbnails generated (maybe no write access for the mount folders?). So I commented all the lines in the script with a reference to thumbnails. Now the script uploads videos with no issues.
Maybe solving the previous issues with thumbnails will fix this problem or a new solution is needed.
The text was updated successfully, but these errors were encountered: