Как мне лучше всего оптимизировать видео или (Код) для сайта без потери качества и скорости загрузки(сайта)? (Само видео 4К)
####################Видео####################
<div id="video-bg">
<video width="100%" height="auto" preload="auto" autoplay="autoplay" muted loop="loop" > <!--poster="bg/daisy-stock-poster.jpg"-->
<source src="Contents/Video/Video_Header.mp4" type="video/mp4">
<source src="Contents/Video/Video_Header.webm" type="video/webm">
</video>
</div>
####################HTML####################
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place logo.ico and logo.png in the root directory -->
<link rel='stylesheet' href='css/main.css'>
<link rel='stylesheet' href='css/normalize.min.css'>
<title></title>
</head>
<body>
<header>
<div id="video-bg">
<video width="100%" height="auto" preload="auto" autoplay="autoplay" muted loop="loop" > <!--poster="bg/daisy-stock-poster.jpg"-->
<source src="Contents/Video/Video_Header.mp4" type="video/mp4">
<source src="Contents/Video/Video_Header.webm" type="video/webm">
</video>
</div>
<ul class="nav">
<li><a href="#" class="logo"><img src="Contents/images/logo.png" alt=""></a></li>
<li><a href="#">О НАС</a></li>
<li><a href="#">УСЛУГИ</a></li>
<li><a href="#">ШКОЛА</a></li>
<li><a href="#">ИНТЕРЕСНОЕ</a></li>
<li><a href="#" class="logo"><img src="Contents/images/bag.png" alt=""></a></li>
</ul>
<div class="title_name">
<!--текст-->
<h1>DESIGN PRO 2021</h1>
<div class="title_name2">
<p>NEW CREATIVE FACTORY</p>
</div>
</div>
<!--<div class="title_design">
<div>DESIGN</div>
</div>-->
</header>
<!-- Main Block -->
<main>
<section>
</section>
</main>
<!-- Main Block -->
</body>
</html>
####################CSS####################
/*———————————————————————————Body / Основное ——————————————————————*/
* {
box-sizing: border-box;
}
Body {
background-color: #000000;
margin: 0;
}
/*———————————————————————————————Hedeer————— ————————————————————*/
header {
display: flex;
min-height: 100vh;
}
/*———————————————————————————Hedeer / Video———————————————————*/
#video-bg {
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
z-index: -2;
background: #000000;
background-size: cover;
opacity: 0.5;
}
#video-bg > video {
position: absolute;
top: 0;
left: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
}
@supports (object-fit: cover) {
#video-bg > video {
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
}
/*———————————————————————————Hedeer / Navigation———————————————————*/
ul.nav {
display: flex;
width: 100%;
padding: 10px;
list-style: none;
justify-content: center;
background-color: rgba(0, 0, 0, 0.6);
margin: 0;
}
.nav li {
float: left;
margin-top: 6px;
}
.logo img {
height: 24px;
width: auto;
margin-top: -6px;
right: 0;
top: 0;
}
ul.nav a {
Padding: 50px;
margin: 0 5px;
text-decoration: none;
color: rgb(255, 255, 255);
text-align: center;
}
ul.nav a:hover {
background-color: rgba(51, 51, 51, 0);
color: #f4f4f4;
}