YouTube 上传质量

发布于 2024-11-03 15:07:41 字数 1057 浏览 4 评论 0原文

我正在使用 google 的 GData API 将视频从我的应用程序上传到 youtube。上传工作正常,但上传视频的质量仅为 360p,而原始视频的质量为 720p。

这是否按预期工作?如果是这样,有什么办法可以解决这个视频压缩问题,让我的应用程序上传高清电影吗?

这是我用来实现视频上传的代码(如果有帮助的话)。

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:)];

布伦顿

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紫罗兰の梦幻 2024-11-10 15:07:41

YouTube 转码管道仅查看视频文件本身,以确定是否应生成视频的 HQ/HD 版本。在 gdata API 调用中传递什么并不重要。

转码管道寻找的内容包括视频大小和平均比特率。例如,比特率非常低的 720p 视频可能不符合 HD 甚至 HQ 编码的条件。有时,编码不正确的视频可能会导致转码器解释错误的视频大小或比特率,因此请确保您的视频编码器没有执行任何奇怪的操作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文