Hi,

Thanks for an awesome module... and I was hoping I could get some guidance on this workflow.

I wanted to ask how possible it would be to create an xspf playlist from a series of nodereferenced nodes with video in?

Basically I would like to chop up a 45 minute video into about nine 5 minute flvs. I have a video content type with a cck filefield allowing the flv to be uploaded and referenced.
Each flv would be added to its own video node so that I end up with 9 video nodes, each with their own video (via filefield), thumbnail and description.

Then I would like to make a "Presentation" content type that would use a multivalue cck nodereference field to reference the 9 video nodes as collectively being part of the same presentation.
When viewing the "Presentation" node, the viewer would be shown a playlist of the nine videos that make up the full presentation.

Ideally, a user could watch the entire presentation from beginning to end without needing to trigger the next video. As I understand it this is how the xspf playlist works,once one finishes the next one begins.
Alterantively, a user would also be able to skip through the different videos using the playlist to just watch the section of the presentation that they are interested in.

It is necessary to chop the long video up into smaller parts as some videos will be paid for premium content and some will given away for free.

Could anyone recommend an alternative way to do this maybe using views instead? Initially I thought that using multiple filefields in the "Presentation" content type would work but the problem there is that it would be difficult to distinguish between the premium and free videos and a user would lose the functionality to comment or rate a particular part of the presentation (ie video chunk)

Any assistance or guidance would be greatly appreciated

Thanks
Gregg

Comments

iaminawe’s picture

Title: Nodereference Playlist » Nodereference Playlist with Nodereference views

Still trying to make this work only with slightly different workflow

I am prepared to pay for this functionality to be implemented to please contact me with a quote on the time necessary to make this work.

We are currently adding a large archive of videos. The majority of these are available only to site subscribers although there is a sampling available for free to the general public. The videos are hosted on Amazon S3 and are displayed using the JW FLV media player. Playlists are generated from a CCK textfield with the Amazon S3 url through xspf playlist. There are still several fundamental bugs with xspf playlist in D6 that prevents unique titles and thumbnails from being associated correctly with the video url.

This has meant that I am generating xml playlists by hand based on the xspf output for each node which has been fine for the ten sample videos posted but is impractical for the hundreds more still to be added.

Also we have encountered the issue that we want to make each video "scene" available either for free or as a members only snippet rather than the entire presentation ( consisting of mutliple scenes) as it currently is.

So this is what I propose and I would appreciate any thoughts as to if there is a better way to do this or if what I am suggesting is practical.

1.) There is a speaker video content type. This consists of a title field, a CCK Imagefield/Filefield for the thumbnail, a CCK Textfield for the Amazon S3 URL, a fivestar rating field and comments.
Each videos scene is added as a "speaker video" , a thumb is attached, the video is uploaded to S3 seperately and the address is entered into the textfield. This is repeated for as many scenes as make up the full presentation. Each video is assigned a premium or free status.

2.) There is a "Speaker Presentation" content type consisting of a title field, a thumbnail imagefield, a nodereference field to reference the "speaker videos", a body field to summarise the presentation and comments. The presentation would be added, the info filled in and the video scenes previously added would be referenced in the presentation.

3.) A view would list the free video scenes, another would list the premium ones and each individual video page would display a link back to the presentation it is part of ... probably using nodereferrer. This is simply one video per node and does not need a playlist on this node.

4.) Another view would list the presentations and will only be available for viewing by premium members. When a presentation is clicked on and the node is viewed it needs to display the videos in a playlist starting with the first referenced and ending with the last. If the first one is clicked and starts to play, it needs to play through the whole playlist until it reaches the end.

Now I have been using nodereference views http://drupal.org/project/nodereference_views to display the referenced fields on the node. This works fine with fields and a simple view (like table or list) but I have not been able to get it working with the XSPF playlist and therefore with the FLV Media player. I have applied patches from xspf issue queues (to reference cck filefields) and have posted the problems I have been having with little response so far

Firstly is this a viable workflow and is it practical to push cck fields from the nodereferenced nodes to the main presentation node for display with xspf playlist? I have really battled with getting xspf playlist to work with views 2 and as there is not really any documentation on this yet I am not sure if it is something I am doing wrong or if it is bugs in the dev version of the module.

Could someone assist me with a customisation to the existing module or a small glue module that could enable this functionality?

arthurf’s picture

Yes, the JW (long tail) and XSPF modules should do this for you (well, the premium/paid content is another issue, but hopefully that doesn't need to be super secure for the moment). The problem is really the output which in the XSPF format which has been in porting process forever. If anybody knows views 2 well, this is a super easy task, and I think the shell of the code is there, it just needs to be completed. The code is in the 6.x branch and I could start digging into this is if there is support for this.....

a.

iaminawe’s picture

Thanks Arthur... I guess I will just have to be patient until the module is stable.

If anyone is willing to assist with this I am prepared to put up a bounty of $300 towards completing the views functionality of xspf and making the nodereference method above functional.

Thanks

arthurf’s picture

Well bounty or not, this needs to happen. I've started shelling out a views function that will pull from file data, but it needs to also know how to get node data for things like title, author and other meta data

arthurf’s picture

So one of the issues that this faces is what I mention above - how to map data from the view to the actual xspf xml. Right now my approach is going to be to use field labels to do this- it is not ideal, but I can't really think of any other easy way to make sure that data is getting where we need it. If anybody else has any bright ideas, I'm all ears.

arthurf’s picture

I've just committed a first pass at making the views functional. The view works with file type views (have not really tested with nodes yet). Create a new file view, add a feed to the view and select XSPF as your style. You can add additional details to the view here. You then need to add some files to the view. The view does check to see if these are a usable mimetype (image/audio/video) and will remove any non-matching files from the display. You must set the file's path to use "filepath" as the label (or any string that contains "filepath"). The view will attempt to match any of your field data to the labels that you select so that it will build the XML based on your labels. Note that you can tweak things using the preview function which hands back the XML (fun!).

Note that this is work in progress, but it's a step forward. Please let me know what people think.

arthurf’s picture

Version: 6.x-1.0-alpha2 » 6.x-1.x-dev

I've just confirmed that this is also working for node type views if you use the relationship to pull in the file data (Create a relationship to files, and then and the fields, add a file data field). I've done a bit of refactoring on the xspf_playlist.module which should probably be reviewed.

theohawse’s picture

Wow! you ROCk, I've been messing around with audio, playlists, patches, node reference and views for hours now - so now how do I try the new version? Do I have to wait for the new dev version to appear on the project page?

I'll be using this to somehow provide custom links on my panels node override pages - to popup music players for each audio album and artist on the site.

arthurf’s picture

The dev version is on the project page- please keep in mind it is a dev version, but let me know if you have issues with it.

iaminawe’s picture

Thanks Arthur, I will give this a try and let you know progress.

iaminawe’s picture

OK I have some feedback on this.... but firstly to just say Thank You as this is a welcome step in the right direction...

And to clarify, I have not tried using the nodereference views method mentioned above, I am just using a test view for now to output an xspf playlist of "videos" based on certain criteria. I am then feeding this url into the presentation content type Flash player override url link... I have this working well but for a few issues...

So firstly, my use case is slightly different from what you have specified above in that the video file I am referencing in the xml tag is from a CCK textfield and not from a CCK filefield. This is so that I can use a direct url to my video on Amazon S3 without having to go through drupals file system.

Basically the view I am generating consists of these components

Node title with label "title"
CCK Textfeld called "S3_URL" with label "location"
CCK Filefield called "field_videothumb", required relationship defined to relevant CCK filefield-fid, display label is image and I have tried File:Name and File:Path but I get the following issues with the output

Firstly, the title and textfield work fine and it is the thumbnail I am still having issues with.

Basically, if I use File:Name it shows just the thumb file name but no full path so "thumb1.jpg" rather than "http://www.example.com/sites/default/files/thumbs/thumb1.jpg". I tried overwriting the output of this field with something like http://www.example.com/sites/default/files/thumbs/[filename] and it displays correctly in the default view but when previewing the xspf feed it has stripped out the absolute url and is just showing the filename.

Then the other option I tried for the thumbnail was to use the File:Path setting with a label of "image". This displayed fine in the default view but when checking the xspf output the following happened.
The label I gave was ignored and the xml tag was automatically set to which meant that I now had two different location tags for each track, one for the file and one for the thumbnail. The mimetype was correctly read off the image and when I viewed the player fed by the playlist, all the s3 video links were overridden but the image File Paths and so I basically ended up with an image viewer.

I think this is definitely a positive direction this is heading in and I wonder if the CCK file field File Path settings need to be automatically turned into the location tags and recognised as playlist content. It seems like it would be easy enough to manually do this by naming the field label correctly and by relying on a more manual method would allow certain CCk filefields to be given priority over others if an xspf playlist consisted of several CCK filefield types.

Any thoughts on this? Any workarounds you could suggest to get thumbnails working?

Thanks again for all assistance with this

iaminawe’s picture

For now I was able to make a second CCK textfield and store the image path in there. This works on the test view and it correctly links in title, location and image.