multi robot /video/thumbs problem

francisco.j.azevedo's Avatar

francisco.j.azevedo

29 May, 2014 09:41 AM

Hi all,
I found that if you define 2 "/video/thumbs" robot, only 1 is processed. The other "/video/thumbs" are just ignored.
I tested extracting 2 thumbs with different sizes from a video because and found that one of the "/video/thumbs" robot was just ignored. I changed my assembly so that i use only one "/video/thumbs" to extract the bigger thumb and then a resize robot to create a smaller thumb.
So, my problem is solved.. but anyway i send this bug report.

best,
Francisco Azevedo

  1. Support Staff 1 Posted by Kevin van Zonne... on 29 May, 2014 10:57 AM

    Kevin van Zonneveld's Avatar

    Hi Francisco,

    How are your steps named? Also /video/thumbs? If so, in Javascript, object keys need to be unique, so you'd better name your steps thumb-200, thumb-400, or whatever makes sense for your usecase.

    However, I'm assuming all of this as you haven't provided the template or an assembly_id of where this happened. If I'm wrong indeed, please provide these so I can have a closer look.

    Kind regards,
    Kevin

  2. 2 Posted by francisco.j.aze... on 04 Jun, 2014 10:30 AM

    francisco.j.azevedo's Avatar

    Hi Kevin,

    This is very simple to check. You only need to create 2 robots for thumbs.
    Here goes an example i create to specifically test this problem. After processing file, you can see that "upvideo2" robot is ignored:

    {
      "steps": {
        "upvideo1": {
          "robot": "/video/thumbs",
          "offsets": [
            1
          ],
          "width": 680,
          "height": 480,
          "resize_strategy": "crop",
          "format": "jpg",
          "quality": 90
        },
        "upvideo2": {
          "robot": "/video/thumbs",
          "offsets": [
            3
          ],
          "width": 100,
          "height": 100,
          "resize_strategy": "crop",
          "format": "jpg",
          "quality": 50
        },
        "ofile": {
          "robot": "/cloudfiles/store",
          "path": "${file.id}-${file.url_name}",
          "container": "originals",
          "account_type": "uk",
          "user": "----myuser----",
          "key": "----mykey------",
          "use": [
            "upvideo1",
            "upvideo2"
          ]
        }
      }
    }
    

    best,
    Francisco Azevedo

  3. Support Staff 3 Posted by Kevin van Zonne... on 04 Jun, 2014 10:41 AM

    Kevin van Zonneveld's Avatar

    Hi Francisco,

    I think the problem is you did not specify a use parameter for the first 2 steps. Hence the behavior is to default to the previous step. Can you add use: ":original" to both steps?

    Best,
    Kevin

  4. Support Staff 4 Posted by Tim Koschützki on 04 Jun, 2014 10:43 AM

    Tim Koschützki's Avatar

    Hey francisco,

    You need to specify the use parameter. The video thimbs robot emits inages and you are piping them into the second video thumbs bot, which expects a video and ignores images.

    Kind regards,

    Tim Koschuetzki
    Co-Founder Transloadit
    @tim_kos

  5. 5 Posted by francisco.j.aze... on 04 Jun, 2014 10:48 AM

    francisco.j.azevedo's Avatar

    Hi Kevin,
    With "use": ":original" it works as expected.

    But.. I thought that if we don't specify a "use" it is same as specify a "use":":original". This sounds very strange.. is this a bug?

    Or is "by design".. and we should always specify a "use" parameter is every step so that we don't have unexpected results?

    best,
    Francisco Azevedo

  6. Support Staff 6 Posted by Kevin van Zonne... on 04 Jun, 2014 10:52 AM

    Kevin van Zonneveld's Avatar

    Hi Francisco,

    Please always specify a use parameter. The default is to plug in the previous step, but that's not airtight as ecma does not guarantee order inside javascript objects.

    There's information in our documentation should you want to learn more about all this.

    Kind regards,
    Kevin

  7. 7 Posted by francisco.j.aze... on 04 Jun, 2014 10:56 AM

    francisco.j.azevedo's Avatar

    Hi Kevin,
    I will update all steps so that always include "use" parameter.
    Thanks for your time.

    best,
    Francisco Azevedo

  8. Support Staff 8 Posted by Tim Koschützki on 04 Jun, 2014 11:31 AM

    Tim Koschützki's Avatar

    Hah, looks like Kevin and I typed a reply at the same time. :D You are getting some extra attention here, Francisco. ; )

    One thing to note is, that in the future we will make it mandatory to include a use parameter in every step. So while you are doing this for this template, you might also want to do it already for all your other templates.

    Kind regards,
    Tim

    Co-Founder Transloadit
    @tim_kos

  9. Support Staff 9 Posted by Tim Koschützki on 24 Jun, 2014 08:57 AM

    Tim Koschützki's Avatar

    Closing this for now. Please let us know in case you need more help, Francisco.

    Kind regards,
    Tim

    Co-Founder Transloadit
    @tim_kos

  10. Tim Koschützki closed this discussion on 24 Jun, 2014 08:57 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

20 Nov, 2016 02:52 AM
29 Oct, 2015 05:01 AM
27 Oct, 2015 05:01 AM
27 Oct, 2015 05:01 AM
26 Oct, 2015 05:03 AM

 

26 Oct, 2015 05:02 AM
26 Oct, 2015 05:02 AM
26 Oct, 2015 05:02 AM
26 Oct, 2015 05:02 AM
26 Oct, 2015 05:02 AM
26 Oct, 2015 05:01 AM