Set featured image from auto generated video thumbnail url php

set_post_thumbnail() requires the second parameter to be an int for attachment id, so the statement $res2 = set_post_thumbnail( $new_ID, $file_name); does not work.

First you need to add the image to your database as an attachment and then you will be able to use its id to set it as thumbnail.

See this example for more help and detail to set an image as featured image.