forked from yebekhe/vidify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
123 lines (111 loc) · 7.38 KB
/
index.html
File metadata and controls
123 lines (111 loc) · 7.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI VIDIFY</title>
<link rel="stylesheet" href="styles.css"> <!-- Link to external CSS -->
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" integrity="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body class="light-theme">
<div class="app-container">
<header class="app-header">
<h1 class="app-title">AI VIDIFY</h1>
<button id="themeToggle" class="theme-button" onclick="toggleTheme()">
<i class="icon">🌙</i> Dark Mode
</button>
</header>
<main class="app-main">
<section class="input-section">
<div class="api-key-group">
<label for="apiKey" class="input-label">API Key</label>
<div class="api-key-input-wrapper">
<input type="text" id="apiKey" class="input-field" placeholder="Enter your Gemini API Key">
<button id="addApiKey" class="api-key-button" onclick="addApiKeyField()">+</button>
</div>
<div id="extraApiKeys"></div>
</div>
<div class="input-mode-switch">
<span class="input-mode-label">Input Source:</span>
<button class="mode-button active" data-mode="file" onclick="setInputMode('file')">File</button>
<button class="mode-button" data-mode="url" onclick="setInputMode('url')">URL</button>
</div>
<div id="fileInputSection">
<label for="videoInput" class="input-label">Video File</label>
<input type="file" id="videoInput" class="input-field file-input" accept="video/mp4,video/mpeg,video/mov,video/avi,video/x-flv,video/mpg,video/webm,video/wmv,video/3gpp">
</div>
<div id="urlInputSection" style="display: none;">
<label for="videoUrl" class="input-label">Video URL</label>
<input type="text" id="videoUrl" class="input-field" placeholder="Enter a video URL (e.g., YouTube)">
</div>
</section>
<section class="options-section">
<div class="select-group">
<label for="modelSelect" class="input-label">Model</label>
<select id="modelSelect" class="select-field">
<option value="gemini-2.0-flash">Gemini 2.0 Flash</option>
<option value="gemini-2.0-flash-lite">Gemini 2.0 Flash-Lite</option>
<option value="gemini-1.5-flash" selected>Gemini 1.5 Flash</option>
<option value="gemini-1.5-flash-8b">Gemini 1.5 Flash-8B</option>
<option value="gemini-1.5-pro">Gemini 1.5 Pro</option>
</select>
</div>
<div class="select-group">
<label for="promptSelect" class="input-label">Prompt</label>
<select id="promptSelect" class="select-field" onchange="togglePromptSelect()">
<option value="generate-subtitles">Generate Subtitles</option>
<option value="summarize-video">Summarize Video</option>
<option value="describe-scenes">Describe Scenes</option>
<option value="extract-key-events">Extract Key Events</option>
<option value="custom">Custom Prompt</option>
</select>
</div>
<div id="customPromptSection" class="custom-prompt-group" style="display: none;">
<label for="customPrompt" class="input-label">Custom Prompt</label>
<textarea id="customPrompt" rows="3" class="textarea-field" placeholder="Enter your custom prompt"></textarea>
</div>
<div id="durationInputSection" class="duration-group" style="display: none;">
<div class="manual-duration-toggle">
<input type="checkbox" id="manualDurationCheckbox" class="duration-checkbox" onchange="toggleManualDurationInput()">
<label for="manualDurationCheckbox" class="duration-checkbox-label">Enter Duration Manually</label>
</div>
<div id="manualDurationFields" style="display: none;">
<label for="manualDuration" class="input-label">Total Duration (HH:MM:SS)</label>
<input type="text" id="manualDuration" class="input-field" placeholder="HH:MM:SS" pattern="([0-9]{2}:[0-5][0-9]:[0-5][0-9])" title="Please enter duration in HH:MM:SS format">
<label for="partDuration" class="input-label">Part Duration (minutes, min 1)</label>
<input type="number" id="partDuration" class="input-field" placeholder="e.g., 1" value="1" min="1" step="1">
</div>
<div id="aiDetectedDurationSection">
<p id="aiDetectedDuration" class="duration-info" style="font-size: 0.95em; margin-top: 5px;"></p>
<p class="duration-warning" style="color: orange; font-size: 0.9em; margin-top: 5px;" id="aiDurationWarning"><b>Warning: AI duration detection may be inaccurate.</b> Please verify and consider manual input if needed.</p>
</div>
<p id="estimatedTime" class="duration-info" style="font-size: 0.95em; margin-top: 10px; display:none;">Estimated processing time: <span id="estimatedTimeValue"></span></p>
</div>
</section>
<section class="action-section">
<button class="process-button" onclick="processVideo()">Process Video</button>
</section>
<section class="output-section">
<div class="log-area">
<h3 class="section-title">Log</h3>
<div id="log" class="output-box log-box"></div>
</div>
<div class="output-area">
<h3 class="section-title">Output</h3>
<div class="output-header">
<button id="copyOutputButton" class="action-button copy-button" onclick="copyOutputToClipboard()"><i class="fa fa-copy"></i> Copy</button>
<button id="downloadOutputButton" class="action-button download-button" onclick="downloadOutputAsSRT()" style="display:none;"><i class="fa fa-download"></i> Download SRT</button>
</div>
<div id="output" class="output-box"></div>
</div>
</section>
</main>
<footer class="app-footer">
<p>© 2024 AI VIDIFY by <a href="https://x.com/yebekhe">YeBeKhe</a></p>
</footer>
</div>
<script src="script.js"></script>
</body>
</html>