youtube api upload doesnt work -


im having problem uploading mp4 file. should simple fails everytime. if manually upload via browser works fine. using google api following sample fails.

settings = new youtuberequestsettings(_productname, _developerkey, _loginname, _loginpassword); request = new youtuberequest(settings);  video = new video();    video.title = "my test movie"; video.tags.add(new mediacategory("autos", youtubenametable.categoryschema)); video.keywords = "cars, funny"; video.description = "my description"; video.youtubeentry.private = false; video.tags.add(new mediacategory("mydevtag, anotherdevtag", youtubenametable.developertagschema)); video.youtubeentry.mediasource = new mediafilesource(@"c:\myfolder\example.mp4", "video/mp4"); videoupload = request.upload(video); if (videoupload == null)     result = false; else 

it causes exception error:

cannot close stream until bytes written. request aborted: request canceled. 

the file shows on youtube has error:

failed (unable convert video file).   

the problem if upload same file manually via browser works fine.

any ideas?


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -