diff --git wp-admin/js/post-formats.js wp-admin/js/post-formats.js
index 4ee97a4..10aab61 100644
--- wp-admin/js/post-formats.js
+++ wp-admin/js/post-formats.js
@@ -110,10 +110,21 @@ window.wp = window.wp || {};
 				}
 			});
 
-			mediaPreview = function (format, url, mime) {
+			mediaPreview = function (attachment) {
+				var dimensions = '', url = attachment.url,
+					mime = attachment.mime,
+					format = attachment.type;
+
+				if ( 'video' === format ) {
+					if ( attachment.width )
+						dimensions += ' width="' + attachment.width + '"';
+					if ( attachment.height )
+						dimensions += ' height="' + attachment.height + '"';
+				}
+
 				$('#' + format + '-preview').remove();
 				$holder.parent().prepend( '<div id="' + format + '-preview" class="wp-format-media-preview">' +
-					'<' + format + ' class="wp-' + format + '-shortcode" controls="controls" preload="none">' +
+					'<' + format + dimensions + ' class="wp-' + format + '-shortcode" controls="controls" preload="none">' +
 						'<source type="' + mime + '" src="' + url + '" />' +
 					'</' + format + '></div>' );
 				$('.wp-' + format + '-shortcode').mediaelementplayer();
@@ -122,25 +133,25 @@ window.wp = window.wp || {};
 			// When an image is selected, run a callback.
 			mediaFrame.on( 'select', function () {
 				// Grab the selected attachment.
-				var attachment = mediaFrame.state().get('selection').first(), mime, url, id;
-
-				id = attachment.get('id');
-				url = attachment.get('url');
-				mime = attachment.get('mime');
+				var attachment = mediaFrame.state().get('selection').first().toJSON();
 
-				if ( 0 === mime.indexOf('audio') ) {
-					$field.val(url);
+				if ( 0 === attachment.mime.indexOf('audio') ) {
+					$field.val(attachment.url);
 					// show one preview at a time
-					mediaPreview('audio', url, mime);
-				} else if ( 0 === mime.indexOf('video') ) {
-					$field.val(url);
+					mediaPreview(attachment);
+				} else if ( 0 === attachment.mime.indexOf('video') ) {
+					attachment.src = attachment.url;
+					$field.val(wp.shortcode.string({
+						tag:     'video',
+						attrs: _.pick( attachment, 'src', 'width', 'height' )
+					}));
 					// show one preview at a time
-					mediaPreview('video', url, mime);
+					mediaPreview(attachment);
 				} else {
 					// set the hidden input's value
-					$field.val(id);
+					$field.val(attachment.id);
 					// Show the image in the placeholder
-					$el.html('<img src="' + url + '" />');
+					$el.html('<img src="' + attachment.url + '" />');
 					$holder.removeClass('empty').show();
 				}
 			});
diff --git wp-includes/js/media-editor.js wp-includes/js/media-editor.js
index 561171e..1fde563 100644
--- wp-includes/js/media-editor.js
+++ wp-includes/js/media-editor.js
@@ -144,6 +144,12 @@
 
 			shortcode = {};
 
+			if ( attachment.width )
+				shortcode.width = attachment.width;
+
+			if ( attachment.height )
+				shortcode.height = attachment.height;
+
 			if ( props.mime ) {
 				switch ( props.mime ) {
 				case 'video/mp4':
diff --git wp-includes/media.php wp-includes/media.php
index e74cd02..97135e7 100644
--- wp-includes/media.php
+++ wp-includes/media.php
@@ -1638,6 +1638,11 @@ function wp_prepare_attachment_for_js( $attachment ) {
 		}
 
 		$response = array_merge( $response, array( 'sizes' => $sizes ), $sizes['full'] );
+	} elseif ( $meta && 'video' === $type ) {
+		if ( isset( $meta['width'] ) )
+			$response['width'] = (int) $meta['width'];
+		if ( isset( $meta['height'] ) )
+			$response['height'] = (int) $meta['height'];
 	}
 
 	if ( function_exists('get_compat_media_markup') )
@@ -2014,6 +2019,15 @@ function wp_video_embed( $matches, $attr, $url, $rawattr ) {
 		if ( ! empty( $rawattr['width'] ) && ! empty( $rawattr['height'] ) ) {
 			$dimensions .= sprintf( 'width="%d" ', (int) $rawattr['width'] );
 			$dimensions .= sprintf( 'height="%d" ', (int) $rawattr['height'] );
+		} elseif ( strstr( $url, home_url() ) ) {
+			$id = attachment_url_to_postid( $url );
+			if ( ! empty( $id ) ) {
+				$meta = wp_get_attachment_metadata( $id );
+				if ( ! empty( $meta['width'] ) )
+					$dimensions .= sprintf( 'width="%d" ', (int) $meta['width'] );
+				if ( ! empty( $meta['height'] ) )
+					$dimensions .= sprintf( 'height="%d" ', (int) $meta['height'] );
+			}
 		}
 		$video = do_shortcode( '[video ' . $dimensions . 'src="' . $url . '" /]' );
 	}
@@ -2437,4 +2451,25 @@ function get_the_post_format_image( $attached_size = 'full', &$post = null ) {
  */
 function the_post_format_image( $attached_size = 'full' ) {
 	echo get_the_post_format_image( $attached_size );
+}
+
+/**
+ * Retrieve the post id for an attachment file URL
+ *
+ * @since 3.6.0
+ *
+ * @param string $url Permalink to check.
+ * @return int Post ID, or 0 on failure.
+ */
+function attachment_url_to_postid( $url ) {
+	global $wpdb;
+	if ( preg_match( '#\.[a-zA-Z0-9]+$#', $url ) ) {
+		$id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' " .
+			"AND guid = %s", $url ) );
+
+		if ( ! empty( $id ) )
+			return (int) $id;
+	}
+
+	return 0;
 }
\ No newline at end of file
