YouTube API v3 upload speeds

前端 未结 1 2027
终归单人心
终归单人心 2021-01-25 07:37

I have been performing some testing with the YouTube API v3, uploading video files existing on my Apache server (VPS running CENTOS 6.7 x86_64 on Virtuozzo, 2GB RAM and a ton of

相关标签:
1条回答
  • 2021-01-25 07:52

    Having done a bit more testing, I have concluded the slow speeds are caused not because of throttling at at YouTube's end but more within the core infrastructure of PHP itself. However, I did managed to increase the speed using PHP from ~120KB/s to ~770KB/s by changing Google's example approach, using stream_get_contents instead of fread (credit to this post).

    However, if you still need more, I'd suggest going the Python approach. Through the API I uploaded a 2GB file in 83 seconds, which comes out at ~24MB/s. It'd be interesting to know the fundamental programming reasons behind the drastic differences in speeds if anybody knows, though well out of my realm I'd hasten to add.

    0 讨论(0)
提交回复
热议问题