I have successfully implemented YouTube video upload. Since I am also dealing with text that can be used as subtitles, I'd like to upload these, as well.
GTLYouTubeVideoContentDetails’s header does not mention what format "caption" has to be in, so I tried SRT, but that didn't work. The SRT file itself seems to be valid, I uploaded it manually to a demo video and it looked fine.
My approach was this:
GTLYouTubeVideo *video = [GTLYouTubeVideo object];
if (nil != captionString)
{
GTLYouTubeVideoContentDetails *details = [[GTLYouTubeVideoContentDetails alloc] init];
details.caption = captionString;
video.contentDetails = details;
[details release];
}
This was the only alteration to the previously working code. The result now is HTTP status 501 when trying to upload.
Any ideas?