Uploading Video via Youtube API Creates Multiple Videos

Simple question (I can share alot of specific code we’re using if necessary): We’ve created a PHP Youtube API integration (using the official google php library) which allows uploading of videos. When large videos are uploaded we generally get a bunch of small videos created on the youtube channel which all have empty data, then finally one successful video that contains the entire video.

What could cause this creation of duplicate (blank) video files which finish with one successful video being created? Has anyone else encountered this?

Source: stackoverflow-php