Is it possible to obtain the spoken language from youtube-dl? - youtube

I'm using youtube-dl to download videos from youtube that we query using words from a target foreign language, but there's no guarantee that the video is in the target language. Is there any way to know what is the spoken language in a video when using youtube-dl? I figure youtube must know this info since it generates captions for some videos.
Thanks!

I am not sure if you can use youtube-dl to get the video language, but if you use the Youtube Data API it is possible.
The documentation here shows that you can get the video language in multiple ways:
Video title / description language: snippet.defaultLanguage
spoken language in default audio track: snippet.defaultAudioLanguage
The option for you would be to call the Youtube Data API and check if snippet.defaultAudioLanguage matches your desired language.

Related

Are all the youtube videos encoded to pal or ntsc?

I'm handling time format conversion operations and i need to turn Secs into Timecode format: Hours:Minutes:Seconds:Frames.
To calculate the frames I need to know the video standard (PAL or NTSC), hence my question:
Are all the youtube videos encoded to pal or ntsc? or they keep the original uploaded video standard? And, if they keep the original standard, how can I retrieve this data?
There is no mention of that whether it's PAL or NTSC in the docs.
However, I found this google forum that says
YouTube will accept both NTSC and PAL format, and on the internet, it
makes no difference at all. Use whichever format your original
material is in.
Youtube video metadata are returned after successful method calls to the Youtube API.

Automated Youtube Playlists From CC-language?

If the videos of a certain account to a varying degree have closed captions/subtitles in multiple languages, would it be possible programmatically (or at all) to set up playlists, based on their CC-languages?
I.e. so that all the videos having French subtitles would figure in one playlist, and all that had German in one etc.
(Naturally, some videos might figure in more than one list).
The information exists, as the language of any given CC is specified at upload time. So in principle it ought to be possible .
You can use captions.list on the videos in the list of uploaded videos for that channel and specify part=snippet to get the language of the closed captions. From there, you can create a playlist based on that closed captions' language and add the video using videos.insert. Based on the programming language you'd like to use, you could do this programmatically as well.

Interactive transcript for Youtube video

I am working on a Youtube video site and would like to implement interactive transcript feature like this one: http://demo.jwplayer.com/iframes/interactive-transcript/ (I have video transcript and caption files, in SRT and WebVTT format. I will not use Youtube's machine transcribed transcript.)
I did a research online. It appears that there is no free plug-in/module that can do this. There are some paid options, such as Captionbox (http://speakertext.com/captionbox) ,3rdMediea, SubPly (http://www.subply.com/en/Products/InterActiveTranscript.htm BTW: this is the best I have found so far. It loads transcript in different languages on the fly). I am reluctant to use these paid options, primarily because I do not want to rely on a single provider.
Can someone please advise me a better option?
Thank you.
You can always write your own solution:
Read YouTube API Dosc:
https://developers.google.com/youtube/js_api_reference?csw=1
Check getCurrentTime()
Read transcript from file/database/hiddendiv and display it if getCurrentTime == textTime from your transcript then just highlight it (like in captionbox example).

Extract Song Information from Embedded Mp3 file, ID3 classes

I am building an application whereby streams live online radio, everything is working fine.
I just need a few tips on how to extract the song information from the embedded mp3 file and display it on the application i.e now playing with the song information.
I have done my research on ID3 but didn't find any good resource. can anyone help out please
thanks
Check this web-site for the ID3 format specification.
ID3 information specified in the header of mp3 file, read the header, parse it and voila, you have the ID3 information on the playing song.
You don't provide the language you are using but if you are using Java here's a free library that do what you need to do
http://javamusictag.sourceforge.net/
Does this helps? Or provide more details about platform and language.
I've just started to use the Python library eyeD3 - very powerful, very well structured, and come with a nice set of command line tools too.

Detecting Available Qualities of YouTube Videos

I'm writing a Boxee app that makes use of YouTube videos and I want to be able to display the highest quality version available. I was looking through the YouTube API, but I can't seem to find a way to detect if 720p and/or 1080p versions of the video are available.
Does anyone know how to do this? I'm already using their Data API to collection information about the video, but there doesn't seem to be anything in the payload about different qualities consumable on the web: http://gdata.youtube.com/feeds/api/videos/NWHfY_lvKIQ
I could just hard code fmt=22 and let it default to a lesser quality version, but then I miss out on 1080p (fmt=387).
The information isn't available through the API, but can be queried and changed via JavaScript after the page has loaded (if you embed a video for example).
http://groups.google.com/group/youtube-api-gdata/browse_thread/thread/da4344cc66959ecc

Resources