Hi,
Can you help me get veoh.inc to work please? I followed your suggestion in the "README" and looked at youtube.inc as an example to work on veoh, but I've been looking at it for two days and I don't know what else I could do to make it work.
I've attached a "veoh.zip" file. Inside the zip file is veoh.inc, the current file I'm working on.
Thanks for your time.
Comments
Comment #1
vsnguyen commentedI finally got Veoh video to work, however I was unable to get the thumbnail to work. Veoh uses a weird algorithm to generate their thumbnail image.
Comment #2
mellenger commentedCan you post your final include file for veoh.com? what did you finally have to do to get it to work?
Comment #3
alex ua commentedComment #4
vsnguyen commentedThe is the current veoh.inc I'm using on my site. The thumbnail does not work as I have no idea how to generate the extra digits that veoh generates for their thumbnails. So, I have assigned a static custom thumbnail for it. You'll probably need to do that too if you can't get the thumbnail to work.
One Line 144, you need to change the url path.
Comment #5
alex ua commentedOK, great! I'll take a look at it and see if I can't figure out how to scrape the thumbnail code.
Comment #6
aaron commentednot sure this will make it in time for the d5 release. we'll need to put it in d6 (and backport to d5).
Comment #7
Rysk commentedIt would probably be easier to extract the info for the thumbnail if the the method for submitting the embed code worked a bit differently, like say.. just pointing the code to the web address of the video to be embedded. The reason I even bother to say that is, because in veoh's case in particular, you can extract the thumbnail info right off the web page quite easily with php code by simply looking for a substring match.
Check out the page source sometime for one of the videos and search for [class="vThumb"] without the brackets, you'll find it every time...
Comment #8
vsnguyen commentedHi Rysk,
Thanks for pointing me in the right direction. Finally, the veoh thumbnail is working.
So here's the code to get it working.
On Line 144, Delete
And Replace With
For each video, Veoh will generate 31 thumbnail images of the video. The thumbnail number 31 is always (or most of the time) the thumbnail that veoh uses to show the video.
Comment #9
Rysk commentedGlad I could help.
Comment #10
Rysk commentedhmm.. still having problems with this provider.inc. I redownloaded the zip file above and noticed it was updated, so it's pretty much unaltered but atm the code is duplicating the [embed src] part of the tag and giving a broken link, and its also still not extracting the thumbs. I'll see what I can do from my side, but so far it's all pretty much up in the air.
Here's an example of the html output it's generating atm.
my current theory is that it's not identifying or extracting the permalinkId portion of the embed code correctly, but.. I could be wrong
Comment #11
Rysk commentedok, messed around a bit. Thumbnails are working as well as the embed code and identifier key being correctly detected from both the embed code, and the direct link url. Code could deffinately use some cleaning up, but.. I'm tired heh. autoplay still doesn't seem to be working right, but you can force it to autoplay by making sure that it always reports.
$autoplay_value = '&videoAutoPlay=1';Anyone else want a turn?
Comment #12
Rysk commentedPosting a small followup to this. I'm trying to work on another method to grab the thumbnails, veoh itself seems to either be slightly glitchy and not always generate the full StreamId0-31.jpg thumbs, or it only does a few or none at all if the video had a custom thumbnail selected when it was uploaded. I'm thinking there should be a way to grab the thumbnail location by parsing the xml, similar to how its done for google videos. That way would probably be far more reliable overall.
Comment #13
Rysk commentedSo... yeah. I've been doing some more digging, and picking at this thumbnail issue little by little on my free time. I've managed to find a reliable source for the video thumb every time but it requires 2 things that I'm horrible at.. xml parsing, and regex. Anyhow, once you get the actual perm link id for the video, which my veoh inc does pretty well.. you can also use it to put together an address like
parse the xml from there for the only value like this one near the top..
You'll end up with a much more reliable thumbnail link than any of the other previous codes, but.. well.. I've either just got too much on my plate atm, or I'm getting irritable with the code for now to come up with any working solutions atm lol. Anyone wanna take the next step putting together the factors I've found and toss out a solution for all of us? at this point I'm kinda tired of working on this problem
Comment #14
alex ua commentedThanks for all your work on this Rysk! Let me take a look at this over the weekend and see if I can't give you a hand.
Comment #15
Rysk commentedIt's something that would be a benefit to all of us. I managed to force a really slow implementation of grabbing the thumbnail using page scrapes. But, like i said.. It's horribly slow atm, even locally it takes a few seconds for a 10 video list to load properly because of all the junk going on in the back end.
aka.
even with this though, for some reason the results seem to remain a bit unreliable. The 'link rel="img_src" tag exists on every page with the exact thumbnail link, which I've been able to confirm several times over, but the pages themselves are randomly filled with whitespace or erroneous linefeeds, etc.. even using regex to filter a lot of that out doesn't seem to help in making it easier to actually locate the tag. It would probably be much faster and possibly more reliable, to use an xml approach similar to the one used in the google provider file, but I'm not quite sure how to work that out just yet. so... for now, im just using this with the original thumbnail solution as fallback when all else fails.. trust me, it's ugly, and slow haha. Yay for the joys of unoptimized test code
Comment #16
Rysk commentedAnother enlightenment about this and obtaining the true thumbnail output. I took some time and did some digging around on Veoh's rest API, and found something interesting... you can get the full details on a stream, including filename, location, etc etc. including the full url path and filename for the thumbnail from an xml output. Going to do some more poking around on this, but it should be much easier using this output than parsing through the regular page source.
Ok... just tried it with my ugly test code from before. Works like a charm, gives the correct thumbnail every time and loads much faster than it did when it was parsing the entire page for each video. Could probably still stand to be recoded to emfield standards for better optimization, but hey.. I finally won something against this problem. deffinately feeling much more satisfied with the results than before.
Comment #17
Rysk commentedhere's the latest version of my working veoh provider inc. it works perfectly, it's just a little slow atm when fetching a large list of thumbnails in views.. aka. 30 thumbnails seems to make the page load times take 30 seconds or longer. your average remote user probably wont be able to tell the difference as long as you don't display more than that many at once.
Comment #18
alex ua commentedIf someone else familiar with Veoh could give this a test run, and mark it RTBC if it works, I'll commit to CVS.
Thanks for all your work on this!
Comment #19
Rysk commentedThe one thing I haven't been able to try yet, although I'd like to if I could come up with the time, is to integrate this with JW player (http://www.jeroenwijering.com/?item=JW_FLV_Media_Player). the xml details page also has a value of "fullPreviewHashPath=" that returns the link to the actual flv file w/o the file extension. In theory, it'd be pretty easy to link that to someone's own custom flash player...
Comment #20
Rysk commentedlast small change for now to avoid error messages from the provider file.
needs to be changed to
Comment #21
alex ua commentedCan someone confirm whether this is ready for release? It seems like it could be a useful provider...
Comment #22
aaron commentednote to self to look at http://drupal.org/node/253389 as well
Comment #23
alex ua commentedI tested the version of this linked to in #22, and since it's working, and the service seems really good, I committed it.
Comment #24
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #25
Flying Drupalist commentedDoes this really work? If it does can you update the front page?
Comment #26
aaron commentedadded provider to project page. thanks!