APIs

Performance Problems with Chromeless player (single core pc)

Posted in APIs on March 22nd, 2010 by Saba – Be the first to comment

Hi,

I would like to know if there is any information you could give to resolve the current problem i am having:

After several years (the api is running in my site years ago, V2 and chromeless player), I am having problems playing most the videos with the single core pc intel p4 3.0 512 md ram (the one used to build the site and until several days ago worked perfect). The problem is :

- When the video starts, the cpu is going to 100% even with a medium size video (640X360), so most of the cpu is taken by flash (last version 10….), so all my setinterval process are suspended until the 100% utilization goes down. When i used a dual core it works ok.

So the question is, is there any reason this change in behavour, is there any change produced that increase in cpu demand?. I tried the same video using www.youtube.com and the cpu usage is almost 100% as well.

By the way, when i right click the video, always the quality is high ? is it possible to change this and how ?, I have tried to change the quality of the video, but the qualities available are : medium, large, hd720, hd1080 so…,

Following the video i am testing:

<param name="movie" value="http:// www.youtube.com/v/ClWe6J1ajIQ&hl=en_US&fs=1&“><embed src="http:// www.youtube.com/v/ClWe6J1ajIQ&hl=en_US&fs=1&” type=”application/x- shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”640″ height=”385″>

In my site is www.quenota.us (testing environment) you could reproduce the problem.

Thanks

Searching for videos using some words

Posted in APIs on March 21st, 2010 by Saba – Be the first to comment

I using some words to search videos, eg, “football”. Valid values of order by are relevance, published, viewCount and rating. The time parameter are alltime, today, this week and this month. When I use “OrderBy” and “Time” parameters to search “football” videos. the results are right when using some compositive conditions , but the results are wrong when using other some conditions.

Eg,: 1.the “relevance , today”, is right, the “relevance , this week” and “relevance , this month” are wrong. 2.the “viewCount , today” is right, the “viewCount , this week” and “viewCount , this month” are wrong. 3.the “published, time” are all right. 4. the “rating, time” are all wrong.

YouTubeQuery query = new YouTubeQuery(YouTubeQuery.DefaultVideoUri); query.OrderBy = sortBy; //relevance, published, viewCount and rating query.Query = “football”; query.Time = YouTubeQuery.UploadTime.Today; // alltime, today, this week and this month query.NumberToRetrieve = 10; query.SafeSearch = YouTubeQuery.SafeSearchValues.Strict; Feed videoFeed = request.Get(query);

please tell me the reason.

problem about search videos

Posted in APIs on March 21st, 2010 by Saba – Be the first to comment

I want to search some videos using api. Eg, the category is Autos, the time is Today and those videos are popular. the code is: YouTubeQuery query = new YouTubeQuery(YouTubeQuery.MostPopular); query.Time = YouTubeQuery.UploadTime.Today; query.NumberToRetrieve = 10; AtomCategory categorySch = new AtomCategory(“Autos”, YouTubeNameTable.CategorySchema); query.Categories.Add(new QueryCategory(categorySch)); Feed videoFeed = request.Get(query);

But I get the wrong videos. Please help me.

And I also want to search the videos that category is Music, the time is LastWeek and those videos are Top Music. The situation of search are too many, so please tell me common method. Thanks.

How to search the youtube HD videos using google data api

Posted in APIs on March 21st, 2010 by Saba – Be the first to comment

Hi, I using YouTubeQuery to search videos, for example, MostPopular, MostViewedVideo and so on.

YouTubeQuery query = new YouTubeQuery(YouTubeQuery.MostPopular);

But I can not search the HD videos, Rising videos, Rentals and As Seen On. Please tell me the method. Thanks.

Fatal error: Call to a member function getVideoId() on a non-object

Posted in APIs on March 20th, 2010 by Saba – Be the first to comment

Having trouble retrieving the Video ID of a a Youtube upload using the YouTube PHP API. It works for the first one or two I upload then it will give me “Fatal error: Call to a member function getVideoId() on a non-object” error. I’ve tried pausing the retrieval of the ID for up to 2 minutes after upload and I still get this error. Any suggestions?

Code:

sleep(120); $video_id = $newEntry->getVideoId();

User authentication required Error 401

Posted in APIs on March 19th, 2010 by Saba – Be the first to comment

Hello,

Uploading videos can only be done if you include an valid authentication header in your HTTP POST request. If you’re getting back that error when running your code on your local server, then you’re not using a valid authentication header.

Without more details, I can’t tell you exactly why you’re not including a valid authentication header, but I’d recommend looking into the parts of your code that handle authentication, and potentially turning on logging in the Zend client library to see whether your requests include any authentication header at all.

Cheers, -Jeff Posnick, YouTube API Team ~ YouTube is hiring! ~ http://google.com/jobs/workyoutube ~

On Mar 18, 1:40 pm, Jaspaul wrote:

App Engine SDKs on it’s build path

Posted in APIs on March 19th, 2010 by Saba – Be the first to comment

Hello,

Are you trying to get a local YouTube Direct App Engine server running? I know that Eclipse on Windows can be a bit more complicated to set up that on OS X or a Unix-y system, but I’m not sure I’d be of much help beyond what’s written in the developer’s guide.

You can probably find someone more knowledgeable about the interaction between Windows/JDK/Eclipse/App Engine plugin if you ask in the App Engine Java group:

http://groups.google.com/group/google-appengine-java

Cheers, -Jeff Posnick, YouTube API Team ~ YouTube is hiring! ~ http://google.com/jobs/workyoutube ~

On Mar 18, 3:16 pm, webmastermpc wrote:

Call to undefined method Zend_Http_Client::setRawDataStream()

Posted in APIs on March 19th, 2010 by Saba – Be the first to comment

Hello,

The definitive example of using direct upload from the Zend client library is probably this, from our Developer’s Guide:

http://code.google.com/apis/youtube/2.0/developers_guide_php.html#Direct_Upload

I’m assuming that what you’re running into has something to do with the your Zend installation or how you’re attempting to access the movie file; there was a similar issue from a few months back that seemed to work itself out when the developer made some changes on his end:

https://groups.google.com/group/youtube-api-gdata/browse_thread/thread/59d11ffcc991633c

Cheers, -Jeff Posnick, YouTube API Team ~ YouTube is hiring! ~ http://google.com/jobs/workyoutube ~

On Mar 18, 11:26 am, shadab wrote:

Embedded video converted to 3gp on phone?

Posted in APIs on March 19th, 2010 by Saba – 1 Comment

Hello,

Some devices with built-in YouTube players, like the iPhone and Android devices, have web browsers that are “smart” enough to detect standard YouTube embed codes and will launch the built-in YouTube player when you click on the video preview. So if you use the standard embed code on your website, mobile browser should more or less do the right thing for those devices.

Cheers, -Jeff Posnick, YouTube API Team ~ YouTube is hiring! ~ http://google.com/jobs/workyoutube ~

On Mar 18, 12:02 pm, P Louw wrote:

Query text parameter search APi returns aprox parameter.

Posted in APIs on March 19th, 2010 by Saba – Be the first to comment

Hello,

Some of the matches may be a bit “fuzzy”, in that they’re slight variations on the search terms, like singular vs. plural. I don’t think there’s any way to turn that off.

Cheers, -Jeff Posnick, YouTube API Team ~ YouTube is hiring! ~ http://google.com/jobs/workyoutube ~

On Mar 18, 8:16 am, NetOak wrote: