YouTube API not returning full description - youtube

I'm currently using the YouTube API V2 inside my iOS app, however the description seems to be bugged and cuts off. It never returns the full description. It always stops at .... I've never had this issue before, does anyone know what I'm doing wrong or what YouTube did to their API ?
Here's the API request I'm calling : http://gdata.youtube.com/feeds/api/users/DaveDays/uploads?q=&v=2&start-index=1&max-results=50&orderby=published&time=this_week
Example: Instead of returning this description
This is Dave's reaction/parody to Miley Cyrus video We Can't Stop.
iTunes: https://itunes.apple.com/us/album/we-...
Twitter: http://www.twitter.com/davedays
Facebook: http://www.facebook.com/ddays
Instagram: http://www.instagram.com/davedays
Merch!! http://www.westaspenmerch.com/davedays
Credits:
Chris http://www.youtube.com/iamchrisc
Nikki http://www.youtube.com/nikkinhollywood
Joey: http://www.youtube.com/bambamjoey
Matt: http://www.youtube.com/matthewdamc
Parody of Miley Cyrus' song We Can't Stop! Twerking it upp! Hi Miley Cyrus. We can't stop either. Miley Cyrus.
it returns this one
This is Dave's reaction/parody to Miley Cyrus video We Can't Stop. iTunes: https://itunes.apple.com/us/album/we-cant-stop-parody-single/id685057235 Twitter: ...

If you think its a bug, then check and report it at: https://code.google.com/p/gdata-issues/issues/list?q=label:API-YouTube
If additional parameters changes the request into a search request, then it will give a short description.
The url and basic parameters do return the full description. Like in: http://gdata.youtube.com/feeds/api/users/DaveDays/uploads?v=2&start-index=1&max-results=50
The add of the other parameters seems to be the cause.
But, "time=this_week" seems to give the longer description:
http://gdata.youtube.com/feeds/api/users/DaveDays/uploads?v=2&start-index=1&max-results=50&time=this_week
Since its about the uploads of one channel, an option could be to get all videos first and do ordering and/or filtering yourself, later.

Related

Google cloud speech very inaccurate and misses words on clean audio

I am using Google cloud speech through Python and finding many transcriptions are inaccurate and missing several words. This is a simple script I'm using to return a transcript of an audio file, in this case 'out307.wav':
client = speech.SpeechClient()
with io.open('out307.wav', 'rb') as audio_file:
content = audio_file.read()
audio = speech.types.RecognitionAudio(content=content)
config = speech.types.RecognitionConfig(
enable_word_time_offsets=True,
language_code='en-US',
audio_channel_count=1)
response = client.recognize(config, audio)
for result in response.results:
alternative = result.alternatives[0]
print(u'Transcript: {}'.format(alternative.transcript))
This returns the following transcript:
to do this the tensions and suspicions except
This is very far off what the actual audio says (I've uploaded it at https://vocaroo.com/i/s1zdZ0SOH1Ki). The audio is a .wav and very clear with no background noise. This is worse than average, as in some cases it will get the transcription fully correct on a 10 second audio file, or it may miss just a couple of words. Is there anything I can do to improve results?
This is weird, I tried your audio file with your code and I get the same result, but, if I change the language_code to "en-UK" I am able to get the full response.
I'm working for Google Cloud and I created for you a public issue here, you can track there the updates.

Youtube API: Include whether or not video has captions in a request to get related video of a video

The videoCaption=closedCaption request parameter is not working at all (try it out yourself here: https://developers.google.com/youtube/v3/docs/search/list). Is there any way around this FLAW in the Youtube API?
This works fine for me, here are the parameters I used:
part: id,snippet
q: puppies
type: video
videoCaption: closedCaption
Which returned the following video ids:
CXE7IIuE1nw
0JboM-STb4E
1GJqfyzfCWU
5wdgrEGE50Q
sQtYNOM0ew0
All of which have closed captions. Then I searched for ones with none, and to give an example:
mRf3-JkwqfU
It has none. Perhaps there is an error in your code or a weird combination of your parameters to lead to this issue.

Setting "origin" in youtube-ios-player-helper breaks programatic functionality

Using the YouTube iOS Player Helper library (https://github.com/youtube/youtube-ios-player-helper downloaded on 2015-06-16), if I add the line:
#"origin": #"example.com",
before:
#"modestbranding": #1
at line 30 in SingleVideoViewController.m, then the programatic controls no longer function to affect the video, and the progress bar no longer updates. Additionally, very few of the status messages are being shows/received.
I assume/hope "origin" would show up in analytics, to signify source, which is why I'm setting it.
Is there a specific format this text needs to be in, or something else I should be setting?
I'm cross posting this issue here as I have got no response to the GitHub issue
https://github.com/youtube/youtube-ios-player-helper/issues/121
You are not passing in a valid url for the origin parameter.
Try #"origin": #"https://example.com" or #"origin": #"http://example.com". Note the http(s)://.

How To Display Youtube Video Thumbnail?

I have a fragment with a ScrollView and I want to display the YouTube thumbnail of a video as one of the items in the scrollview.
I looked up everywhere but couldn't understand how to, I really need the base.
Please help me, I'm stuck like this for days...
This method supposed to take the VIDEO_ID(from YouTube) and take it's thumbnail.
This thumnbail should be displayed in youTubeThumbnailView.
Here is something I tried:
public void getThumbnail(){
String VIDEO_ID = "xxxxxx";
YouTubeThumbnailView youTubeThumbnailView = new YouTubeThumbnailView(getActivity());
youTubeThumbnailView = (YouTubeThumbnailView)youTubeThumbnailView.findViewById(R.id.thumbnail);
youTubeThumbnailView.//Dont know how to continue :(.
}
Take a look at the updated version of the youtube-android sdk (version 1.2.1 released on 22 Jan 2015).
The changelog states something interesting about thumnails:
The YouTubeThumbnailLoader interface's documentation has been updated to note that you must call the interface's release() method when you are finished with the YouTubeThumbnailLoader. The documentation for the YouTubeThumbnailView class also mentions this requirement.

ROKU-Using urlTransfer to Call Script File

Not sure how Roku and Brightscript actually works. I need to call a script file just before the channel starts to stream. The script file will convert the stream on fly. I asked how to do this in Roku forum and was told to use urlTransfer. Well, the sdk gives little help that I can see when explaining how to. I ran across this post on stackoverflow:
How to make api request to some server in roku
It gives a good example which I think I understand. My confusion comes in where and how the function is called. It has to happen right before the video url is called so the conversion can start.
Any advice appreciated.
If you are using roVideoPlayer then just before you call the play function and if you are using roVideoScreen then just before the show function.
Example snippet:
roVideoPlayer
player=CreateObject('roVideoPlayer')
* Your code to add content for the player
* Your call to script
player.play()
roVideoScreen
player=CreateObject('roVideoScreen')
* Your code to add content for the player
* Your call to script
player.show()
Hope this helps

Resources