Download & Extend

Restrict the files mimetypes ?

Project:iTunes
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:postponed

Issue Summary

I'm using iTunes for a video podcast on 'video' node types. In my videos nodes, I'm attaching two files with filefield :
- a .flv which is for display in the web page (jquery_media to embend it)
- a .mp4 which is for the podcasters and should be enclosed by iTunes

I'd like to have the .flv first, embed it on the web page, use a description like 'Click on the arrow to play' and then the .mp4 as a link to the file with the description : 'Download highres version'.

With jquery_media I can embed only odd or even items, so I have no problem completing my goal BUT the problem is that iTunes takes only the first file for the enclosure.

There are lots of ways I could achieve my goal, some of which are :
- defining two Filefields fields, for instance one for .flv only, the other for everything else (.mp4) (simplest solution, but...)
- use Filefield for .mp4 and File_upload for .flv (or the contrary) (simple solution too, but...)
- leaving .mp4 first and .flv then for iTunes, but then theming the Filefield output for the video type nodes, and making the .flv appear first and then the .mp4 (hack...)

I'm interested in what you think about those solutions, as you know better Drupal than me.

I think a more generic solution to use both .flv and .mp4 in a node, would be usefull to other video podcasts producers, so maybe we could add an option to restrict the files mimetypes for the enclosure. We could use a new variable : itunes_enclosure_mimetypes[$node->type], I can write the code to filter the mimetypes, but Im' wondering what to do for the admin settings :
- add a new column next to "FileField to list in RSS feeds" : "Files mimetypes" with a textfield in which the user should enter a comma-separated mimetypes list (would confuse the UI)
- add a global option for mimetypes enclosure (would apply to all the node types, not good either)
- let the advanced user set the variable himself (hidden feature)

Comments

#1

I talked with mfer about this at the Design4Drupal camp in Boston last weekend. He pointed out that this is where ffpc wins because you can specify which field (or delta in the field) to use for the enclosure value. Their usecase sounds similar they have video and audio files in the same field and do separate video and audio podcast fields. To merget itunes and ffpc we'd need to add some more smarts to the views plugin to make that the point where you chose the field rather that globally as itunes does it now. I'd love to try to figure this out but I'm stretched a bit thin on time.

#2

Thanks for this explanation on the future design of the merge of ffpc/itunes enclosures. Just a question, does it mean the goal is to have all the choices made in the views UI ? Including maybe the ones we've just added in the admin settings ?

I have a video podcast that has just begun and will last until november, so I'm willing to work on this. I'd prefer to contribute to this project and would love a merge of itunes and ffpc, however I don't want either to stress anybody, trying to push my code (we all have our timelines and I respect that).

I could go on submitting patches (I want choices for summary, and mimetype selection for enclosures, and maybe more control on non itunes: tags), or I can just keep my own version of itunes for the moment, if you think it's better to take more time to think.

I could have a look at that views plugin too, however I feel it's a bit too difficult for me now.

#3

Status:active» postponed

Let's first see if we need to do a major rewrite.

#4

According to the iTunes specs, the authorized extensions are .m4a, .mp3, .mov, .mp4, .m4v, and .pdf. So allowing only these extensions to be included as enclosures would fix the problem of the .flv as enclosures instead of .mp4 (or other), when you have a .flv for the web page and a higher resolution version as enclosure. But the problem is that maybe people do want to have .flv as enclosures, I don't know which podcast clients support this but I think some do.