How to Upload Videos with the YouTube API (using Python)
Вставка
- Опубліковано 12 лип 2021
- Learn how to upload a new video with the UA-cam API and Python. This tutorial uses UA-cam Data API v3.
Check out videoflo on GitHub (and follow me there too) 👉 github.com/tonyflo/videoflo
Want more API credits or to make your videos public? Fill out this form here to get your code reviewed support.google.com/youtube/co...
Find more at tonyteaches.tech
Check out my vlog channel @TonyFlorida
#youtubeapi #python - Навчання та стиль
this is so crazy, i can't believe i found this video right when i needed it. thank you so much for the extensive and thorough explanation !!!
Perfect!
Outstanding. Clear. Concise. Thank you for sharing.
This one did the trick! Thank you for the help.
thanks for showing how to setup and use the api. very appreciated
Fantastic . For this I tried 2 month. And finally just now uploaded my video in UA-cam. and I got mail from youtube Our team has reviewed your content, and we think you may need to make changes to make sure it doesn't violate our spam, deceptive practices and scams policy. In the meantime, we've made the following content private:
The best video, thank you very much!!👏👏
Tony thank you very much for this post. it was very analytical and thorough and I was able to follow it
Happy to hear it George :)
Very good explanations! I did this with no trouble at all. thank you so much, big like from here
Excellent!
Excelente video y bien explicado es justo lo que estaba buscando, saludos.
Thank you! It was very helpful!
Thank you man, this helped me a lot
The GitHub at the end blew my mind. Thank you so much for walking us through step by step
Thank you a lot. Learned a lot from you.
💗++ for this and Videoflo! Thank you!!
You are so welcome!
Awesome!! Thanks
Thank you very much, Tony. Your passion shows through the clarity and deep understanding of the matter. Thanks again.
Could you please make a video explaining your workflow? For instance, more about the parsing comment you mentioned at the end of the video as well as how we could use your scripts.
I would appreciate how you could write a script that as soon as a file is in the folder, the program would take it and upload it.
Also, have you thought about using AI for tittle, description, and thumbnail?
Thank you, Tony!
Bro this api is not working anymore. After you upload video it automatically gets blocked and can't be reverted.
Thanks for the kind words Juan! I've put together a tutorial for Videoflo here videoflo.app/ and you can get support on my Discord or Github if necessary
Awesome tutorial
is it weird - i just started looking for a such a guide & boom everything i needed to know in one place
Perfect! Hope this helps
Best tutorial on this! Thanks
Glad it was helpful!
I love that you have OldBay spice in the background lol
Thanks Tony. Is it possible to upload a video with a schedule as I can see only options with private or public?
Thanks !!
Thank you Tony, you are a savior. Did you have any issue with the videos being flagged after upload?
Thank you for the great tutorial! How do we speciu the channel to which the video should be uploaded to?
Fire tech and love the old bay
Hello, thks for the video! You have gain a new subscriber
Thanks for the sub!
Thank you!
I love your setup 🔥🔥🔥❤️
Appreciate that thanks!
Thank you bro !
this is really good! thanks
No problem 😊
thx a lot, it's really helpful.
You're welcome!
super. thank you for tutorial
You are welcome 😊
Thank you Tony!
Welcome!
thank you it was very helpful but can you put it on repeat to upload the same video over and over
Excellent, thanks. I have two questions:
1)how we get size of youtube video before download it?
1)how we send stream of video to bot telegram for download on telegram?
thanks if give me answer. bye
Smashed it Tony
Thanks!
This is very nice thanks for this video
Most welcome 😊
@@TonyTeachesTech i have a question
Is the video shared only privately?
Thanks for making this video. But how to do the same thing using the api key rather than the outh 2?
thanks man!
You're welcome! Subscribe for more :)
Nice Video Tony. Easy to follow - I have mine up and running. I ran into a problem when testing though - Can you share some thoughts about the Quota during testing? In particular - it appears you can only do 12 queries while its still be "tested" but I'm not sure if I can or should change the auth to "in production." Can you walk through that a little bit?
You're right about the quota. You'll have to submit your application through the review process to get a quota increase. I went through this process and it takes a week or so support.google.com/youtube/contact/yt_api_form?hl=en
@@TonyTeachesTech Yup! I ended up doing this - and although I think it was a slightly strange process - they approved me and I'm approved to upload. Thanks!
@@cjhoffmn Happy to hear that
Before I start.. You can only do 12 api uploads in total or what were you guys talking about?
very thanks broo
Welcome
Thank you so much!!
I would like to know if it is possible to post image and text on community post with similar approach like this?
Someone asked the same question under your video haha
Thank you
You're welcome
Do you have any videos where you teach touch typing?
Great content! Can you please teach us how to upload videos to dailymotion using their API?
I'm not familiar with that
Thanks for this video mate. I must just be too much of a damn newb because I almost always bump into issues instantly. Its like no ones environment is the same. For instance, I can't even run the command pyrhon3 -V without errors, but py --version does work. the "which" and "source" commands do not work either. Trying really hard to learn but its so damn difficult.
if you are on windows, use python and not python3. for example, python3 -V. you do not need to use the which and source commands mentioned in the video either
Is there any way we can avoid the authorization every time we upload a new video?
Thankssss
You're welcome! Subscribe for more :)
ty
i don't have any website to verify my domain . after uploading video get locked . how to solve this problem
help i get this error.
UserWarning: Cannot access upload_video.py-oauth2.json: No such file or directory warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
it says the file doesnt exist but it does
Can you please make a video for Facebook Video Upload API as well. Will be much appreciated. Thanks
Hi Tony
that was a really good tutorial.
I wan't to know if there is any way we can bypass the consent screen as I want to run my code on cloud instance daily as a cron job. So, I need a way to bypass the consent screen.
This can be a good video for your channel too.
did you find a solution, i also want to automate upload.
@@facilitator999 have you?
@@nandinitata2951 it's not possible to do it.
Tell me if you can do what I say.
Upload a video from our pc to UA-cam. Can't upload a video from a google drive without it?
Awesome. Can you also make a video for php?
Probably not. Google might have example PHP code though
i exceeded the quotas very fast. is there a simple way to increase them?
noob question... would it work to upload videos from google photos to youtube?
Struggling to create a json file using my terminal on spyder. it keeps saying its not a recognized command. help :(
Are you going to open up the github repo again? Does this video work without your GitHub? Thanks!
You can use the code in my GitHub repo with your API key
would this work with YT Shorts?
is there a way to modify it to bulk upload movies that are in one folder ?
You can call the upload function in a loop to do that
Hi i have this error : Please specify a valid file using the --file= paramet
Someone can help me please ?
hi, is that youtube api free of costs??
9:10 soo... what happens if we don't have our own website?
i enjoy from the tutorial video is more than Awesome
I had fun and learned
I would have had a problem im using Windows
How is the client_secrets.json at 12:27
Or rephrase the question
How to create a josn file and or if i download it form UA-cam > thnx alot for share it
You can find the template for the json file here developers.google.com/youtube/v3/guides/uploading_a_video
@@TonyTeachesTech
thnx a lot for answer {f}
i do remembrance
now after I have a silly question !!
fellow i m working in winds 7
i found error :
can't find _main_ module in upload_video.py
thnx a lot for helping
What about uploading multiple videos to a specific playlist?….
You should decrease resolution of your monitor for Your next videos, I'm watching on my cellphone and I don't get visualize the content in a good way
wdym? i have video in 1080p, can see everything.
@@zwayz3546 you are watching from a big screen. Try it from your cellphone...
Can we upload using API Key?
Why does the api make an error 403 and say i exceeded my quota in my first try? WHY ? !!!!!
API is free?
and also tell me that when need to upload bulk videos on schedule basis then?
Yes the API is free
my video is uploaded but my title is missing , i have the error "command not found" any ideas ?
I have the same issue.
Does anyone have "Processing abandoned" on UA-cam after the upload?
Thanks for the affort but this is so uselss because the videos you upload with the API are always blocked and private.
Google says:
"All videos uploaded via the videos.insert endpoint from unverified API projects created after 28 July 2020 will be restricted to private viewing mode. To lift this restriction, each API project must undergo an audit to verify compliance with the Terms of Service. Please see the API Revision History for more details."
Thanks for making this video in advance! Is there any workaround to solve this to make it be access in public ? or just need to fill in the form T_T If I write code for a personal test purpose, can I apply it or not. Lack this step to make my project be all automatic ORZ
developers.google.com/youtube/v3/revision_history#release_notes_07_28_2020
Same! All videos uploaded with the API are being restricted.
what's the limit per day
does anyone know how I can run this as a script
An error occurred: b'{
"error": {
"code": 403,
"message": "Request had insufficient authentication scopes.",
"errors": [
{
"message": "Insufficient Permission",
"domain": "global",
"reason": "insufficientPermissions"
}
],
"status": "PERMISSION_DENIED"
}
}
'
how to resolve this
I succesfully managed to configure settings at Google Dev Console and upload my video to my yt channel, but at another tries I encountered an error with fetch response "Unauthorised".
I don't know how to launch again that auth localhost web :(
have you found a solution ?
@@ayoubelhannaoui6620 no
@@upl1nk.v01d2 i found the solution to thus problem.
@@ayoubelhannaoui6620 I finally uploaded my test video with API!
I carefully was going step by step again by this tutorial.
Idk why I have auth this time after about 2 months.
Anyways, big thanks for author for sharing his knowledge!!
please explain with use with javascript
12:24 - create a python script to upload to UA-cam
the content of this video works only for private videos, i tried to upload public videos and it won't let
You'll need to have your app reviewed by Google (or at least a quota increase) to upload public vids
Hi, can we upload a video from an external URL??
Probably, but that would take some additional coding
@@TonyTeachesTech please can you show me how i can do it
@@alexdin1565 I don't know how to do that without doing research
If anyone comes across this bug: If your API page doesn't load: Use a different browser. I used Opera and it didn't work and then I switched to Chrome
I am not sure you should share your secret key buddy 10:54
At uploading i am getting HTTP error 400 , is anybody know what it is ?
That means "Bad Request". I would make sure that you are providing the correct info
Can we somehow see upload progress bar??
I'm not sure how to do that
@@TonyTeachesTech ok☹️☹️
you can bulk upload videos but cant bulk insert thumbnails why is that ?
Not sure
what about shorts ??
Is it possible to run it on Google colab?
I'm not familiar with Google Colaboratory, but after a quick search it seems like it might be possible!
@@TonyTeachesTech can you make a video?
@@Vegetal999 Sorry probably not
@@TonyTeachesTech why?
@@Vegetal999 I would guess "why" is because he's not familiar with Google Colaboratory.
what is the point of this tutorial if it doesnt include the verifcation process?
the github is not for uload UA-cam anymre
That's not API That's using OAuth and Asking for Authentication every time i start the script and that doesn't fulfil the purpose of Automation
I'm upload is UA-cam please
Not useful. I needed fully through code, not passing by command line, in that case manual upload is good.
this is out of date, oauth2client is bad and not supported anymore
can anyone explain me something i am getting dquote> at last after all the steps what shouls i do next @ua-cam.com/channels/WPJwoVXJhv0-ucr3pUs1dA.html
Hello, first of all this was a truly great tutorial with very clear instructions, so thank you very much.
But I don't really understand what to do when I try to verify my api application, because the verification process requires me to specify the domain name and homepage of the project. I really don't know what to do, since I don't have that. Thanks again and any help is much appreciated.
❤
Have u found a solution to this? I am running into the same problem.
PLEASE HELP ME, where do i add the paramatersd!!! python upload_video.py --file="/tmp/test_video_file.flv"
--title="Summer vacation in California"
--description="Had fun surfing in Santa Cruz"
--keywords="surfing,Santa Cruz"
--category="22"
--privacyStatus="private"
Hey! Could you tell me why my videos are getting blocked??
At line:2 char:3
+ --file="(my video)" --title="tit...
+ ~
Missing expression after unary operator '--'.
At line:2 char:3
+ --file="(my video)" --title="tit ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'file="(my video)"' in expression
or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx
ception
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
This error pops up when I try to upload the video with terminal. Can you help me, please?
((my video) is the video location)
Also this is what it says when I type in the default request:
At line:2 char:26
+ --title="Summer vacation in California"
+ ~
Missing expression after unary operator '--'.
At line:2 char:26
+ --title="Summer vacation in California"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'title="Summer vacation in California"' in expression or state
ment.
At line:3 char:26
+ --description="Had fun surfing in Santa Cruz"
+ ~
Missing expression after unary operator '--'.
At line:3 char:26
+ --description="Had fun surfing in Santa Cruz"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'description="Had fun surfing in Santa Cruz"' in expression or
statement.
At line:4 char:26
+ --keywords="surfing,Santa Cruz"
+ ~
Missing expression after unary operator '--'.
At line:4 char:26
+ --keywords="surfing,Santa Cruz"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'keywords="surfing,Santa Cruz"' in expression or statement.
At line:5 char:26
+ --category="22"
+ ~
Missing expression after unary operator '--'.
At line:5 char:26
+ --category="22"
+ ~~~~~~~~~~~~~
Unexpected token 'category="22"' in expression or statement.
At line:6 char:26
+ --privacyStatus="private"
+ ~
Missing expression after unary operator '--'.
At line:6 char:26
+ --privacyStatus="private"
+ ~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'privacyStatus="private"' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx
ception
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
reinstall python
googleapiclient.errors.UnknownApiNameOrVersion: name: youtube version: v3
getting this error in build method
Thank you!
You're welcome