Create a mapper for mapping to video module nodes.

Attached.

How to use:

  • for most video feeds select either:
    • options->enclosures
    • options->enclosures->application
    • options->enclosures->application->type
    • options->enclosures->video
    • options->enclosures->video->type

    to map to the video node. The choice depends on if you want to be specific on the type of video being mapped - use options->enclosures unless there are multiple enclosures to single items in a feed and you want a specific one. The module will select the first video in the array passed (as the video module only handles one external video per node).

  • for GoogleVideo and YouTube select:
    • options->enclosures->application->x-shockwave-flash

Known issues:

  • if a feed does not have the required (RSS) or should (Atom) length attribute the module default to a length of '1' byte as there is no discovery in the video.module
  • if a feed does not have the optional metadata that comes with the Media RSS namespace (or any other that simplepie understands and puts into the enclosure array) it sets a 'default value'. The most important of these is a hard coded width and height of 300px. This is also as there is no discovery in the video.module
  • if a link is passed to the video module that does not have a file extension; or if that file extension is not at the end of the link the video module won't recognise the file type. The video module doesn't presently discover or store the file type for a video
  • the module may work if you pass a string url, but you only get above default values
  • the module cannot pass a media:thumbnail to the optional video image - this will require downloading the image, which will need a future Media Mover or similar download for the field
CommentFileSizeAuthor
feedapi_mapper_video.inc_.gz1.54 KBekes
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ekes’s picture

This should work nicely with #119710: Media RSS support for Video module which provides a lot of the metadata in the MRSS feed that would otherwise be guessed by this mapper.

Sharing video module data between sites :-)

ekes’s picture

Known issues cont.

  • The URL, YouTube and GoogleVideo sections of the video module were just changed in cvs (in the last few hours). This might break the mapper :-( Use your last 'stable' version of the video module with this mapper. When the code has settled we can re-edit the mapper a bit.
udig’s picture

Hi,
Copied the above mapper to the mappers folder inside Feed Element Mapper module.
Selected the Video node in the 'Processing' section of the feed.
For some reason the mapper won't show up (when going into the 'map' tab).

What am I missing?

Thanks!

ekes’s picture

Unless you happen to have the -dev version this was built against it's not going to work.

Sadly the video module developers don't release stable versions, they don't release versions at all. I'd suggest going to hassle them to get a release structure so then at least someone, if not me, can build against a particular version that you could then download.

Aron Novak’s picture

Status: Needs review » Needs work

I tried to review and test this mapper.
I installed feedapi -dev, feed element mapper 5.x-dev (1.1.2.8 CVS revision of feedapi_mapper.module file) and video-dev (1.68.2.17 CVS revision of video.module file). I copied the .inc to mapper dir. I used simplepie parser
I created a FeedAPI-content-type, where FeedAPI Node creates video nodes.
I added http://blip.tv/rss URL as a feed. The mapper does not show up.
I did some debugging:
At video_feedapi_mapper the $field_name won't be 'video' value ever.
The strange thing is that at the Edit mapping fieldset, i see the options->enclosures->video item.
If you also could not use the above media rss, can you suggest me such a feed url , which is good for this mapper?

ekes’s picture

It would work with the MRSS from Blip.tv (and did with an old Dev version). But the Video module API was in such flux at time it changed radically. This WILL NOT WORK with current Video module unless someone reworks it - afraid I've really not got the time at the moment.