I think Rules integration (http://drupal.org/project/rules) with ffmpeg_converter would make the module more flexible to use.
It would allow more complex workflows.
You could have actions for
- encoding a video in a filefield and storing it in another filefield using a given preset with an option of queuing it using job_que
- creating a snapshot of a video stored in a filefield
You could have events for
- a conversion succeeds
- a conversion fails
With this integration, you could do something complex on the node save event:
- encode a video using one preset and store it in field_high_quality
- encode a video in another preset and store it in field_streaming_quality
- create 5 screenshots and store them in field_screencaps
I am currently working on the rules action to encode a video stored in a cck filefield.
Thoughts?
Comments
Comment #1
zoo33 commentedThat would be very neat indeed!
If that works well it could replace the current interface on the field settings pages. The reasons for the way the module is currently designed is that I wanted it to be possible to disable the module and not lose any data – in other words, I didn't want to use any custom DB tables and such. Your approach would fulfil this goal too.
There is just one problem: how would you provide a developer/user friendly way of having snapshot images link to the right video files? In other words, how would the different CCK fields be linked to each other on the presentation side? One way would be to generate formatters like "{imagefield} image linked to {filefield} file" or "{filefield} video player with {imagefield} snapshot".
In the meantime, any kind of Rules support would be great!
Comment #2
sinasalek commented+1
Comment #3
Anonymous (not verified) commentedI would like to work on this feature.
I've done some work to integrate Drupal files (not just filefields) with Rules. It's somewhat tricky, but it is possible to move and copy file references (fid, the key on drupal's file table) from one field to another or from an upload field to a file field.
That work is available as part of the nodefactory module here:
http://bangpound.svn.beanstalkapp.com/drupal/trunk/drupal/sites/all/modu...
It's based on a very simple understanding of Rules module, so I think there's some needless code and also some opportunities to make it more flexible by using forms and additional settings on rules.
Comment #4
sinasalek commentedThat would be awesome :)
Comment #5
zoo33 commented@bangpound, are you talking about replacing FFmpeg Converter's field/nodeapi logic with Rules configuration (as proposed by venkatd)? Or are you thinking more of Rules as an added possibility for converting files?
Comment #6
sadist commented+1
Comment #7
thomas4019 commented+1
Comment #8
mitchell commentedTagging and subscribing.
Comment #9
zoo33 commentedJust a quick update:
Rules support is in the works. The idea is to remove this module's settings on the filefield configuration form, and instead use Rules configurations to associate filefields with conversion presets, much like venkatd's description above.
Comment #10
sinasalek commentedGood idea, thanks
Comment #11
zoo33 commentedI've opened up a 6.x-2.x branch where the Rules support will live, along with exportable presets etc.
Comment #12
zoo33 commentedI've worked on this since a few months back together with henrrrik and a couple of computer science students who have done some dramatic changes to the module. I've taken their code and done some additional modifications.
Attached is a gigant patch which the following changes:
What's left to do:
The patch is not completely tested in its current form.
Comment #13
zoo33 commentedHere's a new version of the patch by markusbroman, Kleve, henrrrik and myself.
New issue:
I'm considering committing this patch and creating separate issues for the remaining stuff.
Comment #14
zoo33 commentedCommitted. Thanks markusbroman and Kleve for doing the dirty work, and henrrrik for supporting them!
I'll add new issues for the remaining stuff.