Feature request: swf & flv meta info

Archived from the Transloadit support forum. Originally posted on November 22, 2013; details may be outdated, see our docs for current behavior. Original thread

Hi all,
We would like to ask if it’s possible to include metatag info when flash files (swf & flv) are uploaded. With this feature we will be able to check flash Width, Height and Duration as we already do with images.

http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Flash.html

Best,
Francisco Azevedo

Hey Francisco,

I am not sure I understand. Would you like us to write this tag information into the file?

Unfortunately we currently do not offer writing meta data into files, but we already have plans for a robot for this …

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Tim,

The idea is just be able to use flv & swf metatags to filter.
Imagine i want to upload flv&swf files that have width < 250 only.
If transloadit can read flv&swf files meta, i will be able to use it.

These info is for read only and compare on upload like we already do with png,jpg files.

Oh I see. Well if exiftool extracts it (and it does according to your example), then you can use that data in the /file/filter robot.

Are you sure?
When i upload an png or jpg file, transloadit automagically show file meta info on assembly result. But when is a swf or flv file i don’t see any meta info.

Ah I know what the problem is.

What kind meta data do you need extracted? Everything or just some things in particular?

Well, in my case i only need height, width and duration.

Here goes a simple robot filter example:

{ “steps”: { “files”: { “robot”: “/file/filter”, “accepts”: [ [ “${file.ext}”, “==”, “swf” ], [ “${file.meta.duration}”, “<”, “120” ] ], “error_on_decline”: true, “error_msg”: “Only swf files with 2 minutes duration are permitted” } … }

Hey Francisco,

the feature is on its way and should be available within 30 minutes. Please confirm that it’s working as expected.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Hi Tim,
Now, i can see file meta info but i cannot use it on file/filter.
If i setup a file/filter to only accept file when duration is bigger that 2 (minutes) and i upload a swf with less than 2 minutes i don’t get any error.. and it should.
Take a look to template id REDACTED
It has: .. “robot”: “/file/filter”, “accepts”: [[“${file.ext}”,“==”,“swf”],[“${file.meta.duration}”,“>”,2]
but if swf file has 0.03 duration i don’t get an error message.

best,
Francisco Azevedo

Please always include assembly IDs, not template IDs. :slight_smile:

Sure,
Ex: assembly REDACTED

file duration must be bigger than 2 (minutes)

but “results” “files” meta.duration is 0.033333333333333.

Francisco Azevedo

Your conditions are wrong.

You currently accept

  1. all that are swf files
  2. or (!) all files with a duration longer (!) than 2 minutes.

What you really want is:

  1. all that are swf files
  2. and (!) with a duration smaller than 2 minutes

“accepts”: [ [“${file.ext}”, “==”, “swf”], [“${file.meta.duration}”, “>”, 2] ],

- →

“declines”: [ [“${file.ext}”, “!=”, “swf”], [“${file.meta.duration}”, “>”, 2] ],

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

You’re right Tim,

file/filter robot accepts a list of OR’s. So i need to create a filter that declines files that are not swf OR that have meta.duration bigger than 2.

Feel free to close this.

thanks
Francisco Azevedo

Alright, closing this. Cheers!