1

I uploaded my video with mp4 format to Google Colab disk storage. then replaced with Google Console access token and run following curl command in a cell:

!curl -X POST -i "https://www.googleapis.com/upload/youtube/v3/videos?uploadType=resumable&part=snippet%2Cstatus" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json; charset=UTF-8" \
  -d "{\"snippet\":{\"categoryId\":\"22\",\"description\":\"Description of uploaded video.\",\"title\":\"Test video upload.\"},\"status\":{\"privacyStatus\":\"private\"}}"  

after run this command i got location url and replace with path of my video in google colab in following curl command and run successfuly following command:

!curl -X PUT -i 'https://www.googleapis.com/upload/youtube/v3/videos?uploadType=resumable&part=snippet%2Cstatus&upload_id=###' \
-F "media=@/path/to/video.mp4"  

But after successfully executing the above two commands, I encounter the following scene on my YouTube channel. What is the problem?
https://i.sstatic.net/cOJIN.jpg
I tested the above commands with videos of different sizes but the problem still persists. I even tested the instructions with a 3 MB video. The problem is not the size of the videos! How can i fix this problem?

1 Answer 1

0

Source: https://qmacro.org/blog/posts/2021/03/30/two-phase-video-uploads-with-youtube-api-and-curl/

Ran into the same problem and this had the basic answer:

curl [[location field URL from first curl POST]] --header "Authorization: Bearer $token" --data-binary @/path/to/file.mp4

This actually got a video uploaded.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .