Search for youtube videos with captions AND enabled third-party-contributions for captions - oauth

My goal is a script to download captions of youtube videos, multilanguage - mostly songs with lyrics or subtitled talks.
I found that captions can be downloaded only if owner of them or are enabled by third-contribution: Downloading captions always returns a 403
How to search for youtube videos filtering out ones that do not have captions in the specified language, and have third-party contribution enabled for captions?
I could not find a reference in the tutorial:
Caption Document
Caption Implementation
Code Samples
Workaround
An alternative approach for me may be to search for videos that only have lyrics in the description using API V3, but I haven't found a guide on how to restrict keyword search to description and not whole snippet.
I tried with part=snippet.description in search list.

Related

YouTube API- Related videos list

I would like to know how the related videos list is determined when using the API to retrieve a list of related videos for a particular video. Is this determined using the title, description and keywords of the video only? Or is collaborative filtering also used?

Is it possible to search YouTube subtitles?

Suppose I want to find list of videos which have the phrase "French presidential election" in its subtitle.
Can I do this using YouTube API?
It will be perfect if it can even search within both human-generated and auto-generated subtitles. But it will be good enough if it can search either of the two types of subtitles.
You may refer with this documentation. You can use Captions: list which returns a list of caption tracks that are associated with a specified video.
Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track.
You need to provide the videoId parameter that specifies the YouTube video ID of the video for which the API should return caption tracks.
Here's a related thread: How to add Subtitles to Youtube video using Youtube API?
If you want to just search the subtitles from a particular video that is open on youtube.com you can view all the subtitles by selecting 'Open Transcript' from the ... button which is displayed below the main video window and to the right of the title (to the right of SAVE) - then you can just search them using the browser's page search functionality (i.e. Mac: ⌘+F, Win: Ctrl+F)

Explore videos with youtube api

Can i with youtube api explore videos without added search keyword e.g. popular videos per country,new videos,last comments videos or something like that where i can get videos without added search keyword ?
You can check out the Video Feeds developer guide to search for most popular videos and other feeds. You can also limit it to a certain user, country, etc.
In v3, you can use chart=mostPopular option of youtube.search.list.
https://developers.google.com/youtube/v3/guides/implementation/videos#videos-retrieve-most-popular-videos
If you want to get TOP 10 videos in Geographic areas, 7DayTotals, 30DayTotals, ..., you can use dimensions of YouTube Analytics API.
https://developers.google.com/youtube/analytics/v1/dimsmets/dims

YouTube live streaming captions - more than one language

I'm currently live streaming a tv channel (beta phase yet) using YouTube.
How do I add captions in more than 1 language for a live stream (with POST caption URL)?
Even using just one language captions, how can I change the language? (The only option to the user - on web or app - is "EN" even if the caption is in other language)
When using POST approach do send captions on live streams how/where to set/define duration of each subtitle?
Please don't refer this url link. I know it already.
AFAIK you can do only one language, if any at all. I have tried using the POST method YouTube describes on the page you link to - without success. Only get
Result 299: "Error donwloading [...] Can't parse HTTP POST body."
Tried searching all kinds of support forums, but it seems no one has any advice and YouTube never replies to questions related to live caption. Including here...
According to the docs on contentDetails.closedCaptionsType, you can embed captions in your video stream using the option closedCaptionsEmbedded and provide EIA-608 and/or CEA-708 formatted captions in your video from your encoder.
Sending multiple caption tracks muxed with your video with different languages specified by the "Language" tag on the caption stream should allow the user to switch between different captions in the web player.

PHP Youtube API v3 Missing Description in Playlist Items

I'm not getting the description form my uploaded videos when i query them via Youtube Data API v3 using OAuth 2.0 and the sample code provided here https://developers.google.com/youtube/v3/docs/playlistItems/list.
Could this be a bug? None of my videos are private and the only thing that is missing from the response is the video's description!
I'm using the PHP library and the "part" parameter is snippet (don't know if this helps).
Thanks in advance.
I believe this is intended, since video descriptions are not displayed when viewing playlists on YouTube.
If you wish to include the description of your uploaded videos, consider using YouTube API v3 Search: list instead. An ellipsis-truncated description will be provided for your videos under snippet/description. Again, this behaviour is similar to searching on YouTube, where descriptions are cut off.
If a full description is required, you'll need to use Videos: list.
Alternatively, use version 2 of the API: https://gdata.youtube.com/feeds/api/users/youtube_username/uploads?max-results=50&start-index=1.

Resources