Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code always returns isCC = false even for videos with closed captions - Apps Script

var caption = YouTube.Captions.list("snippet", "XPpsI8mWKmg")

https://www.youtube.com/watch?v=XPpsI8mWKmg

This video has closed captions. However, response always returns isCC = false. It happens with more videos as well. Can anyone tell me why?

https://developers.google.com/youtube/v3/docs/captions

This is the response:

    [15-09-14 10:46:33:634 BST] {
kind=youtube#captionListResponse,
tag="jOXstHOM20qemPbHbyzf7ztZ7rI/pWn9PuYA4wHTOuk7gWrw_wkqaMg", 
items=[{snippet={lastUpdated=2015-04-22T15:19:44.401Z, 
        trackKind=ASR, isAutoSynced=false, 
        audioTrackType=unknown,
        isDraft=false, name=, 
        isEasyReader=false, 
        isLarge=false, 
        videoId=XPpsI8mWKmg, 
        language=en, isCC=false, 
        status=serving}, 

kind=youtube#caption,                              
etag="jOXstHOM20qemPbHbyzf7ztZ7rI/5QI7PZUUbbATmyKtvzGqv9-ylR0",          
id=5dp7OTjMUTyH2tf_kEhELNI2X9MpCov20brI5R-kAw4=}, 
    {snippet={
        lastUpdated=2015-04-22T15:12:54.185Z, 
        trackKind=standard, 
        isAutoSynced=false, 
        audioTrackType=unknown, 
        isDraft=false, 
        name=, 
        isEasyReader=false, 
        isLarge=false, 
        videoId=XPpsI8mWKmg, 
        language=en, 
        isCC=false, 
        status=serving}, 
kind=youtube#caption, 
etag="jOXstHOM20qemPbHbyzf7ztZ7rI/6A1s7QwGUJ_Jp39d-tidbyPR6t4", 
id=Q-Rh5crBiivJBgQyElc_gzhB8eK8y0V4}]}

Thank you.

like image 473
mcansado Avatar asked Nov 26 '25 07:11

mcansado


1 Answers

I tried to set closed captions for my own video and got the same result.

I believe that in the player, the "CC" you see is actually referring to subtitles. There's an important distinction between subtitles and closed captioning (see here and here).

Subtitles (or English Subtitles) is usually just a word-for-word translation of the dialog into English words.

...

CC usually also tells the viewer about sound effects or background noises. For example if you are watching a movie with explosions, gunfire or other sounds that are important to the plot, CC will usually display text that announces such sounds

Therefore, I believe isCC will only be true for videos that include this kind of captioning intended for people who might not be able to hear what's happening in the video, as opposed to just general captions that people can put onto their videos. I think that in almost all cases, only high quality, paid movies on YouTube will have these kinds of captions. In that sense, the isCC property works the way it's supposed to.

like image 154
not_a_bot Avatar answered Nov 29 '25 07:11

not_a_bot



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!