Youtube Upload Quality

纵然是瞬间 提交于 2020-01-01 09:55:06

问题


I am using google's GData API in order to upload a video to youtube from my app. The upload works fine however the quality of the video uploaded is only 360p whereas the quality of the original video is 720p.

Is this working as intended? If so is there any way around this video compression that will allow my app to upload HQ movies?

Here's the code I'm using to achieve the video upload if that's any help.

GDataYouTubeMediaGroup *mediaGroup = [GDataYouTubeMediaGroup mediaGroup];
[mediaGroup setMediaTitle:title];
[mediaGroup setMediaDescription:desc];
[mediaGroup addMediaCategory:category]; 
[mediaGroup setMediaKeywords:keywords];
[mediaGroup setIsPrivate:NO];

NSString *mimeType = [GDataUtilities MIMETypeForFileAtPath:outputURL.relativePath defaultMIMEType:@"video/quicktime"];

GDataEntryYouTubeUpload *entry;
entry = [GDataEntryYouTubeUpload uploadEntryWithMediaGroup:mediaGroup data:data MIMEType:mimeType slug:filename];

SEL progressSel = @selector(ticket:hasDeliveredByteCount:ofTotalByteCount:);
[service setServiceUploadProgressSelector:progressSel];

GDataServiceTicket *ticket;
ticket = [service fetchEntryByInsertingEntry:entry forFeedURL:url delegate:self didFinishSelector:@selector(uploadTicket:finishedWithEntry:error:)];

Brenton


回答1:


The YouTube transcoding pipeline only looks at the video file itself to determine whether HQ/HD versions of a video should be generated. It doesn't matter what you pass along with it in the gdata API call.

Things that the transcoding pipeline looks for include the video size as well as the average bit rate. A 720p video with a very low bit rate, for example, may not qualify for an HD or even an HQ encode. Sometimes an incorrectly encoded video may cause the wrong video size or bit rate to be interpreted by their transcoder, so make sure that your video encoder isn't doing anything strange.



来源:https://stackoverflow.com/questions/5805200/youtube-upload-quality

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!