How to insert video larger than 1 MB using gdata.youtube api direct method
I am using the gdata.youtube service to insert a video. It fails with a fetch url error complaining that the file is too large. This is a rather small video (1.7MB). In an ideal world, there is a natural way to split a file as needed and stream it into chunks. Is there an api to do this already.
Here is the code I am using based on google tutorial api:
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's the error:
RequestTooLargeError: The request to API call urlfetch.Fetch() was too large.
+2
source to share
1 answer
The URL account has a 1 megabyte limit for the request size. Check the appengine docs for quotas and other restrictions
0
source to share