Search code examples
pythongoogle-drive-apigoogle-colaboratory

How to process videos from google drive in google colab


I have several videos on my google drive. I want to process convert these videos to audio (I already have code for this using ffmpeg). However, the videos are very long and I do not want to have to download them locally. Is there a way to process them on google colab without downloading each video locally?

I already a list of file id's I got using pydrive.

Thanks.


Solution

  • You can mount your Drive via:

    from google.colab import drive
    drive.mount('/gdrive')
    %cd /gdrive
    

    Change your path accordingly, where /gdrive is your "home". Afterwards, you can load your data like you are used to on your local pc.