diff --git a/frontend/app.js b/frontend/app.js
index 61d3cdb..188e5ca 100644
--- a/frontend/app.js
+++ b/frontend/app.js
@@ -345,11 +345,45 @@ function displayComparison(data) {
originalSource.src = `${API_BASE}/stream/original/${currentFileId}`;
optimizedSource.src = `${API_BASE}/stream/optimized/${currentFileId}`;
+ // Display video specifications
+ displayVideoSpecs('originalSpecs', {
+ resolution: `${currentVideoInfo.width}×${currentVideoInfo.height}`,
+ codec: currentVideoInfo.codec.toUpperCase(),
+ bitrate: `${currentVideoInfo.bitrate} kbps`,
+ duration: formatDuration(currentVideoInfo.duration),
+ fileSize: formatBytes(data.input_size),
+ aspectRatio: currentVideoInfo.aspect_ratio
+ });
+
+ const conversionDetails = data.conversion_details;
+ displayVideoSpecs('optimizedSpecs', {
+ resolution: conversionDetails.resolution,
+ codec: conversionDetails.codec.replace('lib', '').toUpperCase(),
+ bitrate: conversionDetails.bitrate,
+ duration: formatDuration(conversionDetails.duration),
+ fileSize: formatBytes(data.output_size),
+ platform: conversionDetails.platform.charAt(0).toUpperCase() + conversionDetails.platform.slice(1),
+ aspectRatio: conversionDetails.aspect_ratio
+ });
+
// Reload videos
originalVideo.load();
optimizedVideo.load();
}
+function displayVideoSpecs(elementId, specs) {
+ const specsElement = document.getElementById(elementId);
+ specsElement.innerHTML = `
+ ${specs.platform ? `
Platform: ${specs.platform}
` : ''}
+ Resolution: ${specs.resolution}
+ Aspect Ratio: ${specs.aspectRatio}
+ Codec: ${specs.codec}
+ Bitrate: ${specs.bitrate}
+ Duration: ${specs.duration}
+ File Size: ${specs.fileSize}
+ `;
+}
+
// Video Playback Controls
function syncPlayback() {
originalVideo.currentTime = 0;
diff --git a/frontend/index.html b/frontend/index.html
index 60c8cfe..fa439da 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -98,6 +98,9 @@
Your browser does not support the video tag.
+
+
+
🔊 Mute
Download Original
@@ -110,6 +113,9 @@
Your browser does not support the video tag.
+
+
+
🔊 Mute
Download Optimized
diff --git a/frontend/style.css b/frontend/style.css
index eb47a18..f424d83 100644
--- a/frontend/style.css
+++ b/frontend/style.css
@@ -363,11 +363,43 @@ body {
.video-player {
width: 100%;
+ max-width: 100%;
+ height: auto;
border-radius: 6px;
- margin-bottom: 1rem;
+ margin-bottom: 0.75rem;
background-color: #000000;
}
+.video-specs {
+ background-color: var(--primary-black);
+ border: 1px solid var(--border-color);
+ border-radius: 6px;
+ padding: 0.75rem;
+ margin-bottom: 1rem;
+ font-size: 0.8125rem;
+}
+
+.video-specs .spec-row {
+ display: flex;
+ justify-content: space-between;
+ padding: 0.25rem 0;
+ border-bottom: 1px solid var(--border-color);
+}
+
+.video-specs .spec-row:last-child {
+ border-bottom: none;
+}
+
+.video-specs .spec-label {
+ color: var(--text-muted);
+ font-weight: 500;
+}
+
+.video-specs .spec-value {
+ color: var(--primary-yellow);
+ font-weight: 600;
+}
+
.video-controls {
display: flex;
gap: 0.5rem;