Search code examples
pythonyoutubeuploadgoogle-colaboratory

Upload videos to Youtube on Google Colab


Using Google Drive on Google Colab has been made easy. But I did not find any simplified way to upload to Youtube on Google Colab. I tried the code at Youtube-Upload, but I was not successful. Any suggestion?


Solution

  • try this

    from IPython.display import YouTubeVideo
    YouTubeVideo('ZDa-Z5JzLYM')
    

    or this

    from IPython.display import HTML
    HTML('<iframe width="1280" height="720" src="https://www.youtube.com/watch?v=ZDa-Z5JzLYM&list=PL-osiE80TeTsqhIuOqKhwlXsIBIdSeYtc" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>')
    

    I am not sure what you mean by 'uploading' but the above two ways are embedding the video in colab which are provided by this question.