Download quality

I use the Google GData API to upload YouTube videos from my application. Downloading works fine, but the quality of the downloaded video is only 360 pixels, while the quality of the original video is 720p.

Does this work as intended? If so, around this video compression, which will allow my application to download HQ movies?

Here is the code that I use to download the video, if that helps.

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

+6
source share
1 answer

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

Things that transcoding is looking for include the size of the video, as well as the average transfer rate. For example, 720p video with a very low data rate may not meet the requirements of HD or even HQ encoding. Sometimes an incorrectly encoded video can cause the wrong video size or bit rate to be interpreted by their transcoder, so make sure your video encoder is not doing anything strange.

+1
source

Source: https://habr.com/ru/post/886801/


All Articles