Focus on Faces Not Working

Comments

8 comments

  • Avatar
    Tamara Yulevich

    Hi Jacob,

    Thanks for getting in touch.

    When Cloudinary returns an error for an image URL that failed to load due to a problem with the image or URL, we return an HTTP header containing more information about why the request failed. 
    We also return this header for requests where an image was returned but there was a warning, such as when the [default image placeholder](https://cloudinary.com/documentation/image_transformations#using_a_default_image_placeholder) was sent instead of the requested image.

    This information is sent in the `x-cld-error` header, and you can [see the value by using your browser's web developer tools](https://support.cloudinary.com/hc/en-us/articles/202520482-Why-isn-t-my-image-showing-up-) to examine the request and response for the image which didn't load correctly. 

    I've taken a look at your example, and in this case, the specific error is `Gravity face not supported for video`.

    Please take a look and see if that resolves the issue for you and if you have any additional questions.

    Regards,
    Tamara

    0
    Comment actions Permalink
  • Avatar
    Jacob Seeger

    Hi Tamara,

    Thanks so much for your quick response! 

    According to the error message, it appears that Gravity -> Face is not an option for any type of video, although that feature appears to be advertised on the site as a possible feature. Am I misunderstanding anything or does that seem accurate? If I am able to track a face/object via API, how would I do that? Feel free to point me to the right documentation page! I can't seem to find it.

    Thank you!

    Jacob

    0
    Comment actions Permalink
  • Avatar
    Tamara Yulevich

    Hi Jacob, 

    That's a good point, could you please tell me what's your cloud name? I don't see `dgaojz1sj` in our system. I would also love it if you share a URL or a public id for a video that is not working right.

    Our maximum video file sizes range based on the plan level. For example, our Advanced plan has a limit of 1GB for videos, and the Plus plan has a 500MB limit.

    This error appears sometimes when applying the `w` and `h` variables in the same transformation component as the overlayed videos - so it would take the values from the referenced video (which might result in a larger file - and the user gets this error). You can try separating them with a new component \. 

    Waiting for your response, 

    Tamara

     

    0
    Comment actions Permalink
  • Avatar
    Jacob Seeger

    Hi Tamara,

    Of course, my cloudname is "cutdown". The URL of the video is the sample URL that Cloudinary provides in the console: https://res.cloudinary.com/demo/video/upload/samples/cld-sample-video.mp4

    Perhaps this sample video wasn't analyzed with gravity when uploaded to the database? Let me know!

    Thanks,

    Jacob

    0
    Comment actions Permalink
  • Avatar
    Jacob Seeger

    Hi Tamara,

    Apologies for the double message. If it's helpful, this is what I'm hoping to achieve: https://demo.cloudinary.com/video-compare/.

    Thank you!

    Jacob

    0
    Comment actions Permalink
  • Avatar
    Thomas Gurung

    Hi Jacob,

    Thanks for getting back.

    Yes, so when using face detection on videos you have to use `g_auto:face` or ``g_auto:faces`. This is not currently supported by the transformation editor so you can use our Admin API to create the named transformation programmatically per https://cloudinary.com/documentation/admin_api#create_a_named_transformation.

    Here is a sample link: https://res.cloudinary.com/demo/video/upload/c_fill,g_auto:face,w_400,h_800/samples/cld-sample-video.mp4.

    Please note g_auto only supports fill,fill_pad.

    Please let me know if you have any other questions or queries.

    Kind Regards,
    Thomas

    0
    Comment actions Permalink
  • Avatar
    Jacob Seeger

    Hi Thomas,

    Thanks so much for your help and for pointing me in the right direction.

    Just to clarify - do I use the Upload API first to upload the video (without transforming upon upload) then use Admin API to transform the video?

    I'm having a bit of trouble understanding the workflow now - sorry!

    Thanks,

    Jacob

    0
    Comment actions Permalink
  • Avatar
    Anthony Datu

    Hi Jacob, 

    Thomas is offline at the moment but I'll chime in to the thread. You may use Upload API's explicit method to the already uploaded video and use `eager` param to include the transformation you need to generate.  Further code examples can be seen here: https://cloudinary.com/documentation/image_upload_api_reference#explicit_examples

    I hope this helps. 

    Regards, 

    Anthony 

    0
    Comment actions Permalink

Please sign in to leave a comment.