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
When you upload a video, it will initially be processed in low quality. This process helps you complete the upload process faster. When the upload flow is complete, your video will be available to stream in low quality, on a wide variety of devices. Higher qualities, such as 4K or 1080p, can take more time to process.
Best file format to use on YouTube YouTube itself recommends using the . MP4 format for the best high quality video uploads, so that should be your first choice.
They start from the lowest quality and get better after 10-60 minutes. If you check your upload, check in the lower right corner of the Youtube player which resolutions are available. Your uploaded resolution (in your case: 720p) will appear last, which may take 10-60 minutes after upload.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With