FreeCut 自由剪辑 v1.0.0: 免费开源视频编辑器(Web)

- 多轨道时间线: 视频/图片/音频/文字, 拖拽/修剪/分割/复制/删除
- 12款滤镜特效 + 4种转场 + 4种文字动画
- 6款程序化原创配乐(Web Audio 实时合成, 零版权风险)
- Canvas 合成 + MediaRecorder 实时导出 WebM(VP9+Opus)
- 账号体系 + 每日导出额度 + 企业/AI短剧付费升级 + 管理后台
- 项目自动保存/缩略图, 移动端自适应
- 个人免费每天30次导出, 企业¥299/月 不限量, AI短剧¥499/月 不限量
This commit is contained in:
2026-08-26 17:37:56 +08:00
commit 3a6d4fc683
14 changed files with 2668 additions and 0 deletions
+213
View File
@@ -0,0 +1,213 @@
:root {
--bg: #0f1117;
--bg2: #171a23;
--bg3: #1e2230;
--line: #2a2f42;
--text: #e8eaf2;
--muted: #8b93a7;
--accent: #6c5ce7;
--accent2: #00d2ff;
--ok: #2ecc71;
--warn: #f39c12;
--err: #e74c3c;
--grad: linear-gradient(135deg, #6c5ce7, #00d2ff);
--radius: 12px;
--shadow: 0 8px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
background: var(--bg);
color: var(--text);
font-size: 14px;
line-height: 1.6;
}
a { color: var(--accent2); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea {
font-family: inherit; background: var(--bg3); color: var(--text);
border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #333a52; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
.btn {
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
background: var(--grad); color: #fff; border: none; border-radius: 10px;
padding: 9px 18px; font-size: 14px; font-weight: 600; transition: transform .12s, opacity .12s;
}
.btn:hover { transform: translateY(-1px); opacity: .92; }
.btn:active { transform: translateY(0); }
.btn.ghost { background: var(--bg3); border: 1px solid var(--line); color: var(--text); }
.btn.danger { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.btn.small { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tag {
display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.tag.free { background: rgba(46,204,113,.15); color: var(--ok); }
.tag.pro { background: rgba(108,92,231,.2); color: #a29bfe; }
.tag.business { background: rgba(0,210,255,.15); color: var(--accent2); }
.tag.ai { background: rgba(243,156,18,.15); color: var(--warn); }
/* ---------- toast ---------- */
#toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
background: var(--bg3); border: 1px solid var(--line); color: var(--text);
padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow);
animation: toastIn .25s ease; max-width: 90vw;
}
.toast.err { border-color: var(--err); color: #ff8f8f; }
.toast.ok { border-color: var(--ok); color: #7ce0a5; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
/* ---------- modal ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal {
background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
width: 100%; max-width: 460px; max-height: 88vh; overflow: auto; box-shadow: var(--shadow); padding: 24px;
}
.modal h3 { margin-bottom: 14px; }
.modal .row { margin-bottom: 12px; }
.modal .row label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 13px; }
/* ---------- 首页 ---------- */
.land-nav {
position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px;
padding: 12px 5vw; background: rgba(15,17,23,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.land-nav .logo { font-size: 18px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.land-nav .spacer { flex: 1; }
.hero { padding: 56px 5vw 40px; text-align: center; }
.hero h1 { font-size: clamp(28px, 5vw, 52px); font-weight: 900; line-height: 1.2; margin-bottom: 14px; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 26px; font-size: clamp(14px, 2vw, 17px); }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 20px 5vw 10px; }
.feature { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.feature .ic { font-size: 26px; margin-bottom: 10px; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 13px; }
.pricing { padding: 40px 5vw; }
.pricing h2 { text-align: center; margin-bottom: 24px; font-size: 24px; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.price-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 24px; position: relative; }
.price-card.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.price-card .p-name { font-size: 17px; font-weight: 700; }
.price-card .p-price { font-size: 28px; font-weight: 900; margin: 10px 0 4px; }
.price-card .p-price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.price-card ul { list-style: none; margin: 14px 0 18px; }
.price-card li { padding: 4px 0; color: var(--muted); font-size: 13px; }
.price-card li::before { content: "✓ "; color: var(--ok); }
.footer { text-align: center; color: var(--muted); padding: 30px 5vw 40px; font-size: 13px; border-top: 1px solid var(--line); margin-top: 20px; }
/* ---------- 项目列表 ---------- */
.app-shell { max-width: 1080px; margin: 0 auto; padding: 20px 16px 60px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 18px; }
.proj-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .15s, border-color .15s; }
.proj-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.proj-thumb { aspect-ratio: 16/9; background: linear-gradient(135deg,#1e2230,#171a23); display: flex; align-items: center; justify-content: center; font-size: 34px; }
.proj-info { padding: 12px 14px; }
.proj-info .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-info .s { color: var(--muted); font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }
/* ---------- 编辑器 ---------- */
.editor { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.ed-top {
display: flex; align-items: center; gap: 10px; padding: 8px 12px;
background: var(--bg2); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.ed-top .logo { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 16px; }
.ed-top input[name=projname] { border: none; background: transparent; font-weight: 600; width: 160px; padding: 4px 8px; }
.ed-top input[name=projname]:focus { background: var(--bg3); }
.ed-main { flex: 1; display: flex; min-height: 0; }
/* 素材面板 */
.ed-left { width: 250px; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs .tab { flex: 1; text-align: center; padding: 10px 4px; cursor: pointer; color: var(--muted); font-size: 13px; border-bottom: 2px solid transparent; }
.tabs .tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.ed-left .body { flex: 1; overflow-y: auto; padding: 10px; }
.asset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.asset-item { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: grab; position: relative; }
.asset-item:active { cursor: grabbing; }
.asset-item video, .asset-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #000; }
.asset-item .nm { padding: 4px 6px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.asset-item .dur { position: absolute; right: 4px; bottom: 20px; background: rgba(0,0,0,.7); font-size: 10px; padding: 1px 5px; border-radius: 4px; }
.music-item, .filter-item, .trans-item { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; cursor: pointer; }
.music-item:hover, .filter-item:hover, .trans-item:hover { border-color: var(--accent); }
.music-item .nm { font-weight: 600; font-size: 13px; }
.music-item .desc { font-size: 11px; color: var(--muted); }
.filter-item { display: flex; align-items: center; gap: 8px; }
.filter-item .swatch { width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg,#888,#444); flex-shrink: 0; border: 1px solid var(--line); }
.upload-drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 18px 8px; text-align: center; color: var(--muted); cursor: pointer; margin-bottom: 10px; }
.upload-drop:hover { border-color: var(--accent); color: var(--text); }
.upload-drop input { display: none; }
/* 中间预览 */
.ed-center { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #0b0d12; }
.preview-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 10px; min-height: 0; position: relative; }
#preview { background: #000; border-radius: 6px; box-shadow: var(--shadow); max-width: 100%; max-height: 100%; }
.ratio-toggle { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; background: rgba(0,0,0,.6); border-radius: 8px; padding: 3px; }
.ratio-toggle button { background: transparent; border: none; color: var(--muted); padding: 4px 8px; border-radius: 6px; font-size: 12px; }
.ratio-toggle button.active { background: var(--accent); color: #fff; }
.play-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--bg2); border-top: 1px solid var(--line); }
.play-bar .time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; min-width: 110px; }
#seekbar { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; background: var(--line); outline: none; }
#seekbar::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); cursor: pointer; }
.btn-play { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); border: none; color: #fff; font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
/* 时间线 */
.timeline { background: var(--bg2); border-top: 1px solid var(--line); height: 240px; display: flex; flex-direction: column; }
.tl-head { display: flex; padding: 6px 10px; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); }
.tl-head .lbl { color: var(--muted); font-size: 13px; font-weight: 600; }
.timeline .inner { flex: 1; overflow: auto; position: relative; }
.tl-tracks { position: relative; }
.tl-track { height: 48px; border-bottom: 1px solid var(--line); position: relative; }
.tl-track .tk-name { position: absolute; left: 0; top: 0; bottom: 0; width: 60px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); background: var(--bg3); z-index: 3; border-right: 1px solid var(--line); }
.tl-ruler { height: 22px; position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.tl-clip { position: absolute; top: 6px; height: 36px; border-radius: 6px; background: var(--bg3); border: 1px solid var(--line); display: flex; align-items: center; padding: 0 6px; gap: 4px; font-size: 11px; overflow: hidden; cursor: pointer; user-select: none; }
.tl-clip.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tl-clip .trim { position: absolute; top: 0; bottom: 0; width: 8px; background: rgba(255,255,255,.2); cursor: ew-resize; }
.tl-clip .trim.l { left: 0; } .tl-clip .trim.r { right: 0; }
.tl-clip.video { background: rgba(108,92,231,.25); }
.tl-clip.audio { background: rgba(0,210,255,.22); }
.tl-clip.text { background: rgba(46,204,113,.22); }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent2); z-index: 5; pointer-events: none; }
.tl-playhead::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: var(--accent2); }
/* 右侧属性 */
.ed-right { width: 250px; background: var(--bg2); border-left: 1px solid var(--line); overflow-y: auto; padding: 12px; }
.prop-group { margin-bottom: 16px; }
.prop-group h4 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.prop-row { margin-bottom: 8px; }
.prop-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.prop-row input[type=range] { width: 100%; accent-color: var(--accent); }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg button { flex: 1; background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 5px 4px; border-radius: 6px; font-size: 11px; }
.seg button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
/* 导出 */
.export-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--bg2); border-top: 1px solid var(--line); flex-wrap: wrap; }
.export-bar .spacer { flex: 1; }
.progress-wrap { width: 240px; background: var(--bg3); border-radius: 6px; height: 8px; overflow: hidden; }
.progress-wrap .bar { height: 100%; background: var(--grad); width: 0%; transition: width .2s; }
/* 移动端适配 */
@media (max-width: 760px) {
.ed-main { flex-direction: column; }
.ed-left { width: 100%; height: 30%; border-right: none; border-bottom: 1px solid var(--line); }
.ed-right { width: 100%; height: 26%; border-left: none; border-top: 1px solid var(--line); }
.timeline { height: 30%; }
.tl-track { height: 42px; }
.tl-clip { height: 32px; top: 5px; }
.ed-top { font-size: 12px; }
.progress-wrap { width: 140px; }
}