Closed (fixed)
Project:
Feed Element Mapper
Version:
5.x-1.0-beta5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Feb 2008 at 16:52 UTC
Updated:
17 Mar 2008 at 22:35 UTC
Jump to comment: Most recent file
Comments
Comment #1
ekes commentedThe blip.tv video_cck contrib doesn't accept the field/get/file.ext in the embed from the blip.tv feed (well not the
RSS2 and MRSS bit that simplepie parses).
TODO Investigate options either:
* a patch to the video_cck contrib, if it's possible (think it may not be).
or
* a patch to this for special cases that are supported by video_cck contrib - as this is a video_cck specific mapper after all.
Comment #2
alex_b commentedI committed this patch to the development version. I tested with http://www.youtube.com/rss/global/recently_added.rss and the video field. There are enclosures, but the mapping does not work.
Comment #3
alexkessler commentedI also test this patch a serveral times with various configuration settings.
The mapping works but i don't think in the way it should.
E.g. i using revver.com as provider with this feed http://feeds.revver.com/2.0/mrss/qt/collection/593
There are enclosures in form of quicktime files and i could map them to the embedded media field.
After refreshing the feed a link to the file (in this case example.com/123456.mov) is displayed,
but the emfield module could not work with that. It needs a url in form of example.com/12345/video_description or embed code.
This is maybe the reason why it doesn't shows the 'real' provider (Revver) as configured in the content type field setting.
Instead it uses the zzz_custom_url provider template which is by default not configured.
In my setup i use emfield together with cck link and link views rss module ( see http://drupal.org/node/225409 for details).
This is probably not the best way to get the enclosures back on your own site, but as i know emfield only can use blip.tv content to generate feeds
and this configuration works with all podcast apps (like miro, itunes etc.)
Summary:
1. The Mapper for Embedded Media Video CCK field should map the Original url.
2. (only in my case) The enclosures should be mapped to the link field.
Comment #4
alexkessler commentedI combined part of ekes video_cck module into alex_b cck link module.
The result is that i can pass the original url into emfield (only tested with revver.com)
So it works for me now.
Please have a look at the code, because i'm a more a copy&paste idiot than a coder :)
Comment #5
ekes commentedYep, I'd done something to similarly allow a string as well as an array to be passed to the module, but still using the video_cck submission checking.
This allows the user to choose the original source url, the embedded media url, or all the emdedded media arrays to pass to the module. This may make sense as the different handlers for different sites want different urls to work from. That and some sites don't have handlers and want the link to the original source.
I'll test properly later, but the code, for anyone testing was:
Comment #6
seaneffel commentedekes, when I try your code I get an error back in the browser that says (I'm working with Blip.tv feeds):
Line 30 in my edited script is:
MrKatz, I'm about to try your solution, will report back.
Comment #7
seaneffel commentedMrKatz,
Your code is turning back this error (again, I am working with Blip.tv fields and not Revver):
Line 41 is:
Comment #8
jody lynnThis patch is ekes's solution above with a call to valid_url added for validation.
It is working for me for using emfield to map blip.tv.
Comment #9
seaneffel commentedI've just tested this patch, it correctly maps the Blip.tv URL field into the emfield. This checks out for the Blip.tv rss feed, at least. I can't comment on the the other providers.
Thanks for putting this patch together and helping me move my project forward. I'll write up a handbook page on this when the patch is better tested and committed.
Please admire:
http://cell.cctvcambridge.org/
Comment #10
neekolas commentedI have installed Lynn's patch to Ekes module but now when I go to map a node it takes me to a blank page. Has anyone else made this work. Did Seaneffel have to change anything to do with the http://drupal.org/node/217750 module?
Comment #11
seaneffel commentedI've been using the most up to date modules of the Feed Element Mapper, Feed API an Embedded Media Field module, all pulled earlier this morning. Make sure you are pulling the most recent files from drupal.org. Other than this, I don't know what else to suggest except using Devel to utter reinstall your modules. I had to do this at least once today while I was testing with various patches.
Comment #12
alex ua commentedI've tested the patch on two different machines and it's working fine with BlipTV. Neekolas: what provider are you trying to map to?
seaneffel has agreed to work on a videocast for how to use CCK, FeedAPI, FeedAPI_Mapper, and emfield in the near future, so maybe that will help...
Comment #13
seaneffel commentedyes, screencast, I'll reserve that job for me for about two weeks from today.
Comment #14
alex_b commentedHey guys,
thank you so much for your work on this.
I tested the patch. I can't produce results - what exactly are you mapping to the video cck field? A path to a particular video format? Or a path to ->video?
There is nothing being mapped to the field when I map options->enclosures->video->quicktime to video cck field using http://blip.tv/rss
I get an error in common.inc when I map options->enclosures->application->x-shockwave-flash to video cck field using
http://youtube.com/rss/global/recently_added.rss
error: http://skitch.com/alexbarth/8ujk/youtube-recently-added-videos-drupal
what does the line
exactly do? do values not get stored without it?
I was also not quite sure what the actual patch in this queue was after all. There are a couple of versions floating around here. I attach the one I have been working with (this is ekes' approach with Lynn's improvements - Mr Katz suggestion from #4 was not being used, correct? am I missing something here?).
Alex
Comment #15
jody lynnAlex,
I'm pretty confused by this thread as well and was just asked to make a patch to get what was already in cvs to work with blip.tv feeds.
I think that you need to map the url field to the embedded media field. Embedded media doesn't accept actual paths to videos but rather takes urls I believe.
Comment #16
ekes commentedYer, I got confused by this too. _If_ there is a custom handler for the source of the embedded video it often is written to work out what the appropriate <embed> code should be from the URL of the original article - I've not run through all of them to see if this is always the case.
Each handler is written separately, so it would be good if someone ran through and documented which field each one wants. If there is no custom handler it will still link correctly to content if it gets the link to the media.
Comment #17
alex_b commentedThat's what my concern is here, too: There can be a lot of different bits of information in the embed element of the feed.
e. g.: there might be links for 4 different formats of videos plus a link to a teaser image in the embedded element. Which one are you going to use?
The user could decide for, say, quicktime, because that's what she wants to use on her site. But: In cases where there is not always a quicktime video available - to which one are you going to fall back to?
What we could do is, depending on the formats we detected on the feed, we could present subselects in the mapping drop down, just like the taxonomy mapper does:
Map to video cck field (video_cck module)
Auto
Prefer Quicktime
Prefer WMV
Prefer SWF
Only Quicktime
Only WMV
Only SWF
This approach kind of sucks though, as it makes things more complicated - seaneffel - what's your take on that?
Alex
Comment #18
ekes commentedI don't think for emfield we need to do something that complicated. What happens with a a submitted link that is from a recognised 'provider' is it goes to a contrib include that works out / guesses from the URI what the ID of the content is and then works out the appropriate embed link(s) - this can be to multiple variants if that is appropriate for that provider.
So for emfield all that needs to happen is one URI that can be decoded by the appropriate contrib include is sent. The confusion might be for different providers that could be a different link - but I've not researched them. The other one is that you can write your own provider include, or not have a provider include and get the default link.
I actually picked the emfield as (what I thought was) the low hanging fruit because of this 'intelligent' behavior - seems I didn't think it all the way through :-| The above method or something similar was / is my fear for when looking at video and torrent modules.
Comment #19
alex_b commentedHm - which video URL should we pass on to emfield/video_cck then? the next best or all of them? In what format?
Comment #20
ekes commentedThink the answer lies in someone (maybe me, or better still someone else ;) going through all the contrib providers and seeing if there is commonality: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/emfield/con...
Comment #21
alex ua commentedHey all- I'll go through and make sure that each video provider links correctly. I'll update this post after I finish.
As to alex_b's question: it should just be mapping the url of the original video (not to the source file itself, but rather to the page that the video sits on at the providers site, i.e. something like http://youtube.com/watch?v=3KrLk2hsld0 ) to an embedded video field. Emfield then takes that and, depending on the provider, will automatically embed it. At the moment it is not possible to select your format, but that's definitely a feature request that we'll be looking at in the future.
As to different providers having different links, the problem would likely be on the way each provider structures their feeds, as emfiled can take any url for a provider it supports and embed it.
Thanks for the follow up- I'll let you know what I find in regards to whether it's working for each provider.
Comment #22
alex ua commentedHere are the results of my tests. It actually looks like most end up mapping from options->original_url to the embedded video field.
BlipTV -> Works
YouTube -> Works
Revver -> Works
MySpace Video -> Doesn't look like they support RSS feeds at the moment. The closest thing I can find is a channel, and feedapi isn't able to pull the videos from it (it gives the error: Fatal error: Call to undefined function _feedapi_get_settings() in /home/MYSITE/public_html/sites/all/modules/feedapi_mapper/feedapi_mapper.module on line 134 )
Google Video: Doesn't work with the original url, when I try to map to options->original_author->link, which looks like the equivalent to what emfield extracts from google video, gives the same error as I got before Jody (lynne)'s patch:
Spike.TV (formerly ifilm): Not working, but it's on the emfield side. The links in the url are now formed differently (probably a part of their migration- they've already changed twice in the last two months or so). It looks like we probably just need some extra regex in the provider file.
I'll open up a new issue for this over in the emfield queue.
Dailymotion: Works
I'll have to do the rest tomorrow, but for now this seems to be working well!
alex_b: let me know when this gets committed and I'll put a mention on the main emfield page. I know a lot of emfield users will be really excited by this development!
Thanks alex, Jody, ekes, aaron, and Sean!
Comment #23
ekes commentedWhat do you get for Google if you pass the [guid] or the x-shockwave-flash media item?
The videoplay is in the guid, and the x-shockwave-flash media item has the googleplayer link.
Comment #24
seaneffel commentedJust saw all the recent activity on this thread and wanted to confirm that I am pulling the Blip.tv feed to map the Blip original_url into the video_cck field. Its working exquisitely well since I am then able to tell the CCK field to output any size player, any size thumbnail image, etc, through the emfield settings. All this data gets pulled across by mapping only the Blip original_url.
I can't comment on other providers.
I'm leaving town for a two weeks, when I get back I'll check for updates here and turn out that screencast of the Feed API + Feed Element Mapper + Embedded Media Field (+ CCK and Views too) recipe.
Comment #25
alex_b commentedseaneffel: screencast, yeay. It was not clear that the original url has to be mapped - we should make this part of the mapper description. Did you try the last patch posted by me? This is the one that should go into the module.
I am glad to hear that the mapper is working for you.
Alex
Comment #26
seaneffel commentedWhile we're on the topic, both Feed Api and the Mapper both need some usability attention.
Feed API lets you create new node items from incoming feeds. But when setting this up it seems you can tell a feed type to create new content nodes from incoming feed items. But the interface lets you tell the feed to create new feed nodes, and that sounds like crazy talk. Not the right thread to mention it, I know, but I'm trying to catch a flight... :)
On the Mapper/Emfield, it should be clear in each description from each provider what feed element needs to be mapped to make the Emfield do its job. If each of us struggled with it then it definitely needs to be simplified as this module matures. They guy from the Knight Foundation wants his grandma to use Drupal, so...
Alex UA and Aaron and I looked at the Mapper directory and it seemed that new files were being written to the server through use of the mapper module - maybe from new custom fields or content types being created - is this still the case? Is that bad practice?
Comment #27
alex_b commentedAgree. Let's create a seperate discussion for this.
This was never the case :) It would have been very bad practice indeed.
Cheers - alex.
Comment #28
alex ua commentedHey all, here are some more tests:
Brightcove: Doesn't work. The feeds aren't being seen by feedapi as valid, which may have something to do with the fact that they have privacy settings on some feeds, though I'm not really sure.
Jumpcut: Works.
Livevideo: The mapping is working, but the emfield provider file is no longer parsing the videos correctly. I'll open an issue for this in the emfield queue.
Metacafe: Works.
Sevenload: Works.
And that should be it. So to some up, users can now grab video feeds using this combo of modules:
Blip.tv, YouTube, Revver, Dailymotion, Jumpcut, Metacafe, and Sevenload.
I'll have to look into the rest of these, as it does appear that the problems reside on the emfield side, rather than on the mapping side.
Comment #29
alex ua commentedEkes: in regard to google video, this one seems like an error on the parsing side. When I look at the example given by any other provider during the mapping I see a single example of a feed item. However, when I look at the example when I try to map the google video I see a list of all the feed items. In this case the provider is definitely working, but it looks like the feed isn't getting parsed correctly.
Comment #30
alex_b commentedThanks for testing, will try to confirm results on my side ASAP and commit code. Open issues seem to me either authentication (=parser) or emfield related - but not mapper related, correct?
Comment #31
ekes commentedOK I've spent a bit of time on this now.
With patch below you can send decent url's to emfield from
(i) options->original_url, option->guid...
(ii) options->enclosures->media->type
While there are issues with the emfield Google Video provider include it does actually now work if you send it either options->guid or options->enclosures->application->x-shockwave-flash
Google video RSS feeds are interesting in that they can includes links to embedded media elsewhere (like youtube).
The Google Video provider include is also interesting in that it attempts (at least) to embed the an flv url if you parse it the link from option->enclosures->video->x-flv -- I'd like to see this as an option for flv links passed to emfield that don't have a provider handler. But that's an issue for elsewhere :-)
In testing this version also worked with LiveVideo - not sure it's any alterations I've made here. I agree that Brightcove just doesn't work.
Comment #32
alex ua commentedI've fixed Spike in the latest dev version for individual videos (though it won't be live for a bit, and the provider has been corrected from ifilm.inc to spike.inc), but it's still not working via the feed. The problem is that the feed is adding '?ns=1' to the end of the embed url. Any idea how we can remove that?
So now it's working with all providers that give us a working feed, other than Spike. I'm attaching the spike.inc file here in case you want to test.
Comment #33
ekes commentedJust change line 31 to exclude ? from the capture as well - seems to do it...
Comment #34
ekes commentedTwo clarifications on above:
(i) The patch for the mapper. I don't think it needs valid_url() anywhere - that's for the provider in emfield to sort out, it doesn't actually need to be valid as long as the provider can get what information it needs. Anyone disagree.
(ii) The spike reg-ex could be more specific, are the ID's only numeric?
Comment #35
alex ua commentedEkes- yes, they are only numeric as far as I can tell.
Comment #36
alex ua commentedI'm going to go ahead and mark this RTBC. It seems like a proper spot- given the new definition, and the fact that three of us have tested it and confirmed it's working.
Comment #37
alex_b commentedCommitted: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/feedapi_map...
Please open new, seperate issues for upcoming bugs and requests. I will release a beta 6 asap including this patch.
Thanks to everybody involved.
Alex
Comment #38
alex_b commentedCommitted: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/feedapi_map...
Please open new, seperate issues for upcoming bugs and requests. I will release a beta 6 asap including this patch.
Thanks to everybody involved.
Alex
Comment #39
alex_b commentedrolled beta6.