custom admin thumbnail for videos, not getting post’s id?

First, you don’t need the apply_filters below. That is called directly from the wp_mime_type_icon() function already.

The issue is that your add_filter() call is missing the $accepted_args parameter. The add_filter() function has the following construct:

add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1)

So the $accepted_args is 1 by default. Because of this, only the first argument of $icon gets passed into your function. You need to use the following code when adding your filter:

add_filter('wp_mime_type_icon', 'set_attachments_icon', 10, 3);