Index: src/wp-admin/includes/media.php
===================================================================
--- src/wp-admin/includes/media.php	(revision 27125)
+++ src/wp-admin/includes/media.php	(working copy)
@@ -2616,6 +2616,20 @@
 	$att_url = wp_get_attachment_url( $post->ID ); ?>
 	<div class="wp_attachment_holder">
 	<?php
+	if ( $attachment_id && preg_match( '#^(audio|video)#', $post->post_mime_type ) ) {
+		$file = get_attached_file( $attachment_id );
+		$meta = wp_get_attachment_metadata( $attachment_id );
+		if ( empty( $meta ) && file_exists( $file ) ) {
+			$_meta = get_post_meta( $attachment_id );
+			$regeneration_lock = 'wp_regenerating_' . $attachment_id;
+			if ( ! array_key_exists( '_wp_attachment_metadata', $_meta ) && ! get_transient( $regeneration_lock ) ) {
+				set_transient( $regeneration_lock, $file );
+				wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file ) );
+				delete_transient( $regeneration_lock );
+			}
+		}
+	}
+
 	if ( wp_attachment_is_image( $post->ID ) ) :
 		$image_edit_button = '';
 		if ( wp_image_editor_supports( array( 'mime_type' => $post->post_mime_type ) ) ) {
