Can’t get video meta from wp_read_video_metadata()

To make sure you’re getting the correct path to the video, pass the ID to get_attached_file(), and use that in wp_read_video_metadata(). wp_upload_dir() is for getting/creating a directory to write to now, so if the file has not been uploaded in the current month, the path will not be correct if you just add it to the filename.

$attachment_id = get_field( 'video_file', $post->ID, false); // Get the raw value, the attachment ID.
$file = get_attached_file( $attachment_id );
$metadata = wp_read_video_metadata( $file );

error code: 523