![]() * $captionFile caption track binary file. * $captionName name of the caption track. 230000004048 modification Effects 0.000 claims description 5. * $captionLanguage language of the caption track. 238000006011 modification reaction Methods 0.000 claims description 5. * $videoId the YouTube video ID of the video for which the API should * Google_Service_YouTube $youtube YouTube service object. * Uploads a caption track in draft status that matches the API request parameters. Have you tried to achieve what you want using the functions Google have posted themselves? If you want to make other calls after the file upload, set setDefer back to false // Read the caption file and upload it chunk by chunk. 'mimeType' => 'application/octet-stream',Įcho '' print_r( $insertRequest ) echo '' $insertRequest = $youtube->captions->insert("snippet", $caption, array( ![]() Create a request for the API's captions.insert method to create and upload a caption. $file = file_get_contents( $captionFile ) Get the file content's of the uploaded file Setting the defer flag to true tells the client to return a request which can be called $caption = new Google_Service_YouTube_Caption() $captionSnippet->setLanguage($captionLanguage) $captionSnippet = new Google_Service_YouTube_CaptionSnippet() # Create a caption snippet with video id, language, name and draft status. When used in conjunction with tf.loadLayersModel(), an instance of tf. I will post a snippet of my code below that shows the upload portion of our script. This method can be used for loading from files such as user-selected files in the browser. Has anyone ran into this problem before? If so, what were you able to do to get this to work? ![]() We've used up all the hours that we had and we're now working on our own time to solve this problem but still no luck. ![]() It returns telling us that it is syncing but when we go to the UI for the video it just shows the caption track name and give's us the message "Track content is not processed.". We also were able to get the sync flag to work that tells YouTube to run through the transcript and set timings for the video but, it doesn't actually work. However, we can download the original format that was upload so we know the file was uploaded successfully. After about week we were finally able to get the captions to upload just fine but, YouTube would give us this message in the UI "Track content is not processed" and doesn't display the caption's that we upload. For the past couple weeks my co workers and me have been working on trying to get captions on our clients YouTube video's through the v3 API. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |