I am able to get zencoder to work with rackspace cloud files using the cf:// url. Zencoder successfully encodes the file and drops the file off on cloud files.
However, some tweaks / hacks are necessary to get it to work as far as the src url, and paths, etc.
Is this a work in progress or is there code already out there that does this.
Just wondering if I should make this code generic and check this code into a sandbox project or if I missed a module out there that takes care of making this work.
--Rurri
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | rurri_cloudfiles.module.zip | 1.38 KB | rurri |
Comments
Comment #1
mkelly commentedHi Rurri,
What hacks did you need to get the src url to work, etc? I'm trying the same thing: Zencoder to Rackspace Cloud Files, via Drupal 7. I can get the videos to transcode and upload to Cloud Files, but they refuse to play back in Drupal. I checked the page source and I noticed that the "src" attribute for each video format was blank:
Is this what you've run into? If so, how did you fix it?
Comment #2
rurri commentedI mkelly,
That is the first issue I ran in to. There are two things that will need to change with cloud files. The first is the easiest, and that is that there needs to be a stream wrapper for cf://. This is the easiest. I'll attach a very basic one I tested with.
This changes the cf:// url to the actual url. For my testing I hardcoded the Stream Wrapper to point only at my cloud files urls.
This is the easiest hurdle.
The next major hurdle is that cloud files does NOT support folders. All of the files must be in the root folder of the bucket. Video module does not currently support any way to define where converted files go in the file system, and it is hardcoded in to place them in videos/converted/nid or something like that.
So the next thing I did was hack both the Transcoder.inc and TranscoderAbstractionFactoryZencoder.inc.
The Transcoder places the full path in the file so I removed it there, and then TranscoderAbstractionFactoryZencoder.inc adds an extra '/' between the path and the file, so that needs to be modified as well.
At this point, I have gotten it so that the file arrives at cloud front but with an extra '/' at the beginning of the filename, which I can't figure out how to remove, and am unhappy that I now have hacked video module files. Thus, I am currently trying a different approach, where the files will be sftpd back to me from zencoder and then use the StorageAPI modules to transfer them myself to cloud files.
Rurri
Comment #3
jpstrikesback commentedA hacky way to get it working fast is to install this module:
http://drupal.org/project/cloud_files
replace instances of 'rcf' with 'cf'
in cloud_files.module
in rackspacecloudfiles_streams.inc
Next up; In video modules TranscoderAbstractionFactoryZencoder.inc:
add a case for 'cf' the cloud files streamwrapper so that the url get's placed properly in the file objects->uri
One thing to remember is to manually make sure the container you've entered in the cloud files settings and in the Video->zencoder settings has been published to the CDN as the cloud files module doesn't do this automatically in my experience.
Let me know how you fare, I'm going to go write a request for storage API to be integrated jsut to get the conversation started...
Comment #4
Jorrit commentedI have had reports that Cloudfiles works well with the latest (2.6) version of the Video module.