Home>

Upload mp4 file to Google Drive with PyDrive.

I can upload files less than 100Mb without any problem, but I can't upload files more than 100Mb.
I don't know if this is a specification, so please let me know.

Corresponding source code
#!/usr/bin/env python3
#-*-coding: utf-8-*-
import subprocess
import os
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
FOLDER_ID ='ID'
gauth = GoogleAuth ()
gauth.CommandLineAuth ()
drive = GoogleDrive (gauth)
Get the video file with the #linux command
cmd ='find /home/pi/movie -type f -name "cap *" -and -name "* .mp4"'
file_names = (subprocess.Popen (cmd, stdout = subprocess.PIPE,
                               shell = True) .communicate () [0]). decode ('utf-8')
# Arraying
array_files = file_names.split ()
for file_name in array_files:
    file_name = file_name.split ('/ home/pi/movie /') [1]
    print ('file trimming')
    file = drive.CreateFile ({'title': file_name,
                          'mimeType':'video/mp4',
                          'parents': [{'kind':'drive # fileLink','id': FOLDER_ID}]})
    file.SetContentFile (file_name)
    file.Upload ()
    print (file_name +'upload')
    os.remove (file_name)
    print ('delete file')
Supplementary information (FW/tool version, etc.)

RasberryPi4 python version 3.7.3.