jonnekaunisto / simple-youtube-api

Object-oriented Wrapper for Youtube API in Python
https://simple-youtube-api.rtfd.io
Other
74 stars 16 forks source link

Slow upload speed - Configurable chunk size #57

Open alex-ong opened 1 year ago

alex-ong commented 1 year ago

Is your feature request related to a problem? Please describe. I upload a 7GB file and it only uploads at 10Mbits/s By changing the chunksize to 1048576 * 100, I am able to reach 300Mbit/s (maxing out my connection).

Another note: Youtube asks for chunks in multiples of 256kb; existing code is 1000000 which is not a multiple. This doesn't seem to affect performance https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol#Uploading_Chunks

Describe the solution you'd like Some way to set the chunksize via simple-youtube-api; such as Channel.SetUploadChunkSize or similar

Describe alternatives you've considered Editing the code directly; this works fine for now but obviously if i upgrade simple-youtube-api it will fail.

Markererer commented 1 year ago

Could you show how you have edited the code directly? I'm facing the same issue

DKolter commented 1 year ago

Just answering the question for future documentation: In the file channel.py at the end you can set the chunk_size to for example 1048576 * 100. image