For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Tuesday, February 24, 2015

Youtube upload error while upload video occurred in Google.GData.Client.dll

Problem:

While working with Google.GData.YouTube Api to upload video from your computer system to own youtube account you can get the error as below:

"An unhandled exception of type 'Google.GData.Client.GDataRequestException' occurred in Google.GData.Client.dll"
"Additional information: Execution of request failed: https://uploads.gdata.youtube.com/feeds/api/users/default/uploads"

Solution:

This is occurs when you want to upload large file so set timeout of  YouTubeRequest and YouTubeRequestSettings to high.
Also set the correct MIME-TYPE of your video, otherwise you can get the same error.
for example if you want to upload flv file then it's mime type is "video/x-flv".

Example:


Below is the c# code:

YouTubeRequestSettings ytrs = new YouTubeRequestSettings("applicationName", "Key", "gmailemail@gmail.com", "password");
YouTubeRequest ytr= new YouTubeRequest(ytrs );
((GDataRequestFactory)ytr.Service.RequestFactory).Timeout = 9999999;
ytrs .Timeout = -1;
Share:

0 comments:

Post a Comment

How to make center align child div

 How to make center align child div?   Suppose you have 2 Div tag. And want the make inner tag center <div id="d1">      ...

Ads Inside Post

Powered by Blogger.

Arsip