To get the URL of a video attachment (like an MP4 file), you should use wp_get_attachment_url()
and not wp_get_attachment_link()
because the latter returns an HTML for an anchor linking to the attachment page or the attachment file itself:
$video_url = wp_get_attachment_url( $attachment_ID );
// Sample output: https://example.com/wp-content/uploads/2020/11/video.mp4
$att_page = wp_get_attachment_link( $attachment_ID, 'full', true );
// Sample output: <a href="https://example.com/video/">video</a>
So the custom field header_background_video
should return an attachment ID — but you’ll need to figure out on your own the correct field type based on the plugin you are using.