If you're using CForms/flowscript for the upload form, then you can get
access in your flow code to the uploaded file.  From there you should be
able to pass that uploaded file (probably as an InputStream) into a Java
library that specializes in the kinds of metadata/property extraction you
need.  You'll have to hunt down those libraries and figure out their APIs
on your own, but it should be pretty straightforward once you have that.

Check out the following libraries as a starting point:
JavaSound - http://java.sun.com/products/java-media/sound/index.jsp
Drew Noakes' EXIF library for JPEG images -
http://www.drewnoakes.com/code/exif/


> I see... I was hoping that this was a common operation, and that
> someone had already made a solution. Anyone?
>
> Regards
> Hans
>
> On 6/7/06, Christofer Dutz <[EMAIL PROTECTED]> wrote:
>> Nope ... won't work then. I think you will have to do it manually then
>> and
>> implement your own generators. Maybe the DirectoryGenerator sources will
>> help you getting started.
>>
>> Chris
>>
>> [ c h r i s t o f e r   d u t z ]
>>
>> IT-Berater
>> univativ GmbH & Co. KG
>> Robert-Bosch-Str. 7, 64293 Darmstadt
>>
>> fon: 0 61 51 / 66 717 - 21
>> fax: 0 61 51 / 66 717 - 29
>> email: [EMAIL PROTECTED]
>> http://www.univativ.de
>>
>> Darmstadt, Stuttgart, Karlsruhe, Düsseldorf
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Jonas Lundberg [mailto:[EMAIL PROTECTED]
>> Gesendet: Mittwoch, 7. Juni 2006 14:47
>> An: [email protected]
>> Betreff: Re: How to extract image, audio and video metadata from media
>> files
>> in Cocoon?
>>
>> Thanks Christofer. That only solves part of the problem, because some
>> files will be uploaded using a web form, and directly put into a
>> database. Then I guess I can't use a directory generator?
>>
>> Regards
>> Hans
>>
>> On 6/7/06, Christofer Dutz <[EMAIL PROTECTED]> wrote:
>> > Hi Hans,
>> >
>> > Well if you use the ImageDirectoryGenerator, it generates an xml
>> > representing the file and directory structure of a specified directory
>> with
>> > additional size information ... don't think a Generator for videos
>> exists.
>> > There is a MP3DirectoryGenerator for generating file and directory xml
>> > containing MP3 files ID3 tags thou. I think you will have to implement
>> your
>> > own DirectoryGenerator for the videos and podcasts.
>> >
>> > Chris
>> >
>> > PS: For reding images in a specified resolution use the ImageReader ;)
>> >
>> > [ c h r i s t o f e r   d u t z ]
>> >
>> > IT-Berater
>> > univativ GmbH & Co. KG
>> > Robert-Bosch-Str. 7, 64293 Darmstadt
>> >
>> > fon: 0 61 51 / 66 717 - 21
>> > fax: 0 61 51 / 66 717 - 29
>> > email: [EMAIL PROTECTED]
>> > http://www.univativ.de
>> >
>> > Darmstadt, Stuttgart, Karlsruhe, Düsseldorf
>> >
>> > -----Ursprüngliche Nachricht-----
>> > Von: Jonas Lundberg [mailto:[EMAIL PROTECTED]
>> > Gesendet: Mittwoch, 7. Juni 2006 14:19
>> > An: [email protected]
>> > Betreff: How to extract image, audio and video metadata from media
>> files
>> in
>> > Cocoon?
>> >
>> > I am working on a content management system, where I would like to
>> > import images for image galleries, audio for podcasting, and video for
>> > video galleries. When doing this, it would be very useful to be able
>> > to figure out the dimensions of images, the length of podcasts, and
>> > the dimensions and length of videos.
>> >
>> > How do you people achieve this in Cocoon? Does anyone have a method to
>> > share? Either for extracting metadata from the files, or for measuring
>> > them.
>> >
>> > Regards
>> > Hans


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to