Overall: I cannot get valid thumbnails for youtube live streams (about 40% to 50% of streams ' thumbnails I get back are invalid/404 - gray "no screenshot" image) when pulling from the API v2.
Details: Here is what I am using to grab the streams:
https://gdata.youtube.com/feeds/api/charts/live/events/live_now?v=2&alt=json&inline=true&max-results=20&start-index=1&fields=entry(published,updated,title,author(name),content(entry(media:group)))
Within "media$thumbnail" I am getting data (6 thumbnail items), and on half the entries it gives me the gray "no screenshot" icon for all 6 screenshots. The other half usually gives me back half valid thumbnails and half invalid. So I may get back the default images (high def and regulars), and it won't give me the numbered images (0.jpg, 1.jpg, 2.jpg, etc.).
I have tried using the only two variations of url that I know of:
http://i.ytimg.com/vi/[VID-ID]/default.jpg
http://img.youtube.com/vi/[VID-ID]/0.jpg
From the live stream site, there are no invalid thumbnails which to me would suggest that all live streams have a valid thumbnail, or does that mean that youtube does not show streams that do not have valid thumbnails? I also noticed that they switch quite a bit between using 1.jpg and default.jpg, is there a way though the api to tell which image is preferred?
Thanks for any help on this subject!
Jake
For anyone else that is having this problem with getting correct thumbnails for YouTube live streams. By calling the json API, I was able to get the actual thumbnails returned for my live stream. These are the same thumbnails used on YouTube's site. Apparently they use a different URI pattern for live streams:
https://i.ytimg.com/vi/{{YOUTUBE_ID}}/default_live.jpg
https://i.ytimg.com/vi/{{YOUTUBE_ID}}/mqdefault_live.jpg
https://i.ytimg.com/vi/{{YOUTUBE_ID}}/hqdefault_live.jpg
https://i.ytimg.com/vi/{{YOUTUBE_ID}}/sddefault_live.jpg
So it looks like you're seeing this with video ids that correspond to "Hangouts on Air", which are Google+ Hangouts that are broadcast live via YouTube. They use a different setup than normal scheduled YouTube Live events, and you can't, for instance, create a thumbnail in advance of the broadcast (since the live event is created on the fly).
Related
I have a Facebook Pixel on my website that is tracking events. I saw on the Ads Manager dashboard, that the pixel logs my events in a categorized way, i.e.:
PageView, ViewContent, InitiateCheckout, etc.
Although when logging stats, I include some extra parameters like the product_id maybe or other things, that way when the PageView is being logged, at least I will know which product_id it refers to.
The problem is that the Facebook Ads Dashboard doesn't show any of the extra parameters, it only displays the Count field.
After doing some research, I found this link on Facebook Pixel Stats, where they claim:
Use the Facebook Pixel Stats edge to get pixel statistics.
I tried using the Graph API Explorer, and even the iOS FB SDK for it (API Here) they both return an empty data array:
{
"data": [
]
}
I tried multiple parameter combinations, fields, and everything else to no avail.
If anyone knows whether I'm looking at the wrong place, or what not, all I'm interested in is reading those "extra" parameters that I'm appending to every FB Pixel event I log. Thank you!
You need specifing the parameters for it.
Example:
{fb_pixel_id}/stats?aggregation=url
The answer is displayed for a specific period of time in the past - I would say 24 hours.
You can use paging at the bottom of the json response for going back in time: use the link provided in the content of the field 'previous', and you can step back day by day.
There seems to be a silent fail when trying to stream tracks from an account.
Example:
API Gee console:
https://api.soundcloud.com/tracks/#####.json?consumer_key=###
Response: 200
Streamable: true
API Console Stream URL:
https://api.soundcloud.com/tracks/#####/stream?consumer_key=###
404 not found - (Blank white page no error in browser)
Track set to public and API streamable - All tracks on account, which were streaming as normal until the end of last week.
The consumer key works for tracks by other users, so it could be linked to this account directly?
For those coming here for an answer to this problem, it is a known bug when a song reports streamable: true yet results in a blank white page in browser when trying to stream. The bug is in the streamable boolean being false.
Email response from SoundCloud on this issue:
The developers have let me know that the problems you are having is
due to issues with RTMP.
Currently certain content on SoundCloud is using a secure streaming
method called RTMP.
To explain RTMP, even if a track is set to public and streamable by
the artist, if the artist is under a major label, this label can
further control those streaming permissions. So, it looks like it
should stream correctly, however it doesn't.
This particular bug that you have highlighted is more complicated than
originally thought, and as only a handful of tracks are affected we
unfortunately don't have the resources to dedicate a team entirely to
this project as of right now.
So unfortunately you'll just have to deal with/work around this issue.
I've noticed that i get blank page for stream url of tracks which are in "wav" format:
<original-format>wav</original-format>
other formats were working fine.
Not sure what track you're trying to stream. Some tracks are set by the artist to not be streamed.
You got the format for the url correct. Try this url with your own consumer key:
http://api.soundcloud.com/tracks/32476280/stream?consumer_key=[###]
After being in touch with the support team at SoundCloud, they provided the following:
The problems you are having is due to the content and rights holders.
To explain, profile admins have the ability to change settings as they
like, so if the tracks have stopped playing, it's likely that they
have disabled apps on the track or content. This means that the rights
holders, that own all of this content, have turned this setting off,
and we don't have control over it or the ability to enable it again.
They managed to get my "API permissions extended" because the rights holders own the SoundCloud account in question. It seems there was just a mistake somewhere along the way with denying streaming.
You'll need to log an issue with SoundCloud support if you have a similar problem.
I'm attempting to set up an app for a small set of known users, all of whom have a sub "page", "account" or whatever the terminology du jour is. The main goal of the app is to publish photos to these sub-accounts in an automated fashion on their behalf.
The crux of the issue seems to be that while I can ask for "manage_pages" to manage the user's sub-accounts and for "publish_stream" which allows me to upload photos to the user's root stream I can't upload photos to a subaccount stream.
I've been able to do a status update on the sub-account stream (text only), but every time I try to upload a photo (via curl, commandline-style), I get various errors depending on how I try to do it:
http://graph.facebook.com/albumid/photos -> Error #324 requires upload file
http://graph.facebook.com/albumid -> Error #200 application does not have the capability to make this API call.
http://graph.facebook.com/subaccount_id/feed - > Error #100 Source URL is not properly formatted
http://graph.facebook.com/subaccount_id/photos -> Error #324 requires upload file
I've stabbed around in the dark like this for about 4 hours with no luck and am beginning to wonder: Is posting a photo to a user's sub-account stream even possible? If so, how?
(BTW, I have tried doing a text status update with a photo URL -- attempting to circumvent the whole uploading part -- and that doesn't help. The url of the photo appears in the post, but does not show the photo. I'm open to any suggestion that shows photos in a subaccount stream.)
Only about 5 minutes after posting this, I kind of, sort of found a solution:
First, upload the image to your own web server, s3 bucket, or other location.
Second, use http://graph.facebook.com/subaccount_id/feed with source=http://www.thenewlocationofyourimage.com/image.jpg.
The image shows up in the page stream, albeit as a small thumbnail. Better than nothing, though. If you have better information, PLEASE let me know. Thanks!
I am using this api to fetch youtube videos
API that i am hitting is:
http://gdata.youtube.com/feeds/api/charts/movies/trending?v=2&paid-content=false&hl=en&alt=json&format=5
Can you please suggest some way so that i can send some parameters in this api that can filter the results on basis of yt:accsessControl embed and syndicate fields... so how to embed this fields in api to filter results
I have tried this :
http://gdata.youtube.com/feeds/api/charts/movies/trending?v=2&paid-content=false&hl=en&alt=json&format=5&embed='allowed'&syndicate='allowed'
This does not filter the video results.. so please suggest what should i do ?
format=5 effectively acts as a proxy to return only videos that are embeddable.
Similarly, you can use format=1 (which is one of the public RTSP streams) to return only videos that have syndication enabled, since only those videos will have that format available.
You can't combine the two to get back only videos that have both set, though. If you say format=1,5 you'll get back videos that have either set.
I tried to use facebook fql.video get video from my Idol's wall, then, how to get the video's original size(width & height)?
And I noticed one field named src_hq in fql table, in its description: The URL to the source file for the high quality version of the video.
but when I tried it in the browser directly. it warning:
Authorization Required
This server could not verify that you are authorized to access the
document you requested. Either you supplied the wrong credentials
(e.g., bad password), or your browser doesn't understand how to supply
the credentials required.
So my another question is how to play video with the src_hq?
Thanks and regards.
This Facebook page is the best resource. Click on "Try this query" which outputs a sample fql query (note: doesn't use fbapp.Fql(query). Take note of the &access_token=..... appended to the query. The XML output contains: <object width="400" height="224" > that you can use.
src_hq is an access problem, not a playback issue. Can the normal video be viewed on your Facebook? Usually if a high quality video is available, there is a box for [HQ], see sample video.
Use field format from FQL table video to get video width/height:
An array of various video formats available with their embed_html code and resolution