2 replies [Last post]
jo1ene@drupal.org's picture
Offline
Joined: 09/11/2007
Juice: 89

What would it take for someone to develop a feature whereby audio files uploaded (by users through uc_marketplace in my case ) would have a sample clip generated and put in the files table and directory as determined by the filefield settings. Then any player widget could be used to display the clip on the product page or elsewhere via CCK, views, etc.

Currently, the file is uploaded through CCK filefield, the file download feature is created, the file is moved out of the webroot then it is deleted from the files table for security. What I would like is for it not to be deleted, but be replaced with a sample.

I don't want the thing to be done just for me. A lot of people would like to see this - in fact, many talk about doing something similar, but details are elusive. But I don't want it to be manual through the store management because that would make it unusable with marketplace. Maybe it could be executed in conjunction with the file product feature? To make is less heavy, the function could only apply to certain product classes.

The point here is to develop a module or code to add to an existing module that can be used in most cases and be released to the community.

justageek's picture
Offline
Bug Finder
Joined: 10/29/2008
Juice: 189
Are you asking for automatic clip generation?

So are you asking for the tool to clip out a sample of the single uploaded file and save that as a sample?

If so, my guess is that it will require some server-specific tools like ffmpeg that will probably not be generally available on most shared-hosting environments. I don't know for sure how easy it is to set up ffmpeg on a shared host, maybe someone else does. I've played with it on a dedicated box, it is powerful but also pretty tricky to get set up and working.

Anyway, just trying to find out what you are really looking for in your software.

jo1ene@drupal.org's picture
Offline
Joined: 09/11/2007
Juice: 89
Re: Are you asking for automatic clip generation?

I am on shared hosting but have some flexibility there (ie. it's a friend who runs the thing). Anyway, I am talking about automatically creating a clip. Since users are uploading their own products, it's the only way.

Let's a assume the presence ffmpeg or similar. Instead of deleting the uploaded file from the files table, when it is moved out of the web directory for safety, it would be "replaced" with the clip. Then I can use Drupal tools to play the file.

It occurs to me that since MP3 is not the only product type, some sort of option to only apply to certain product classes is in order. I don't think that would be a big deal though.