views:

122

answers:

0

I am using the gdata.youtube service to insert a video entry. It is failing with a url fetch error complaining that the file is too large. It is a pretty small video (1.7MB). In an ideal world, there is a natural way to break up the file as necessary and stream it in chunks. Is there an api to do this already.

Here is the code I am using based on the google api tutorial:

my_media_group = gdata.media.Group(
        title=gdata.media.Title(text='My Test Movie'),
        description=gdata.media.Description(description_type='plain',
                                  text='My description'),
        keywords=gdata.media.Keywords(text='cars, funny'),
        category=[gdata.media.Category(text='Autos',  scheme='http://gdata.youtube.com/schemas/2007/categories.cat', label='Autos')],
        player=None
        )

    where = gdata.geo.Where()
    where.set_location((37.0,-122.0))

    # create the gdata.youtube.YouTubeVideoEntry to be uploaded
    video_entry = gdata.youtube.YouTubeVideoEntry(media=my_media_group,
                                          geo=where)

    new_entry = self.client.InsertVideoEntry(video_entry, 'movie.mov')

And here is the error:

RequestTooLargeError: The request to API call urlfetch.Fetch() was too large.