14 Commits

Author SHA1 Message Date
YILS
00a21aef46 修复渲染卡帧问题 2025-08-12 14:13:42 +08:00
YILS
50e3c403d0 修复混剪片段与语音时长不一致问题 2025-08-12 09:30:20 +08:00
YILS
29adaa3989 Update README.md 2025-08-12 08:54:26 +08:00
YILS
31780f4703 🎉 发布第一个1.0.0正式版 2025-08-08 14:27:38 +08:00
YILS
2cead83ddc 构建测试 2025-08-08 14:21:22 +08:00
YILS
95b1aa359f 构建测试 2025-08-08 14:02:40 +08:00
YILS
b9b656da9e 构建测试 2025-08-08 13:44:24 +08:00
YILS
a328a5aea3 构建测试 2025-08-08 13:38:27 +08:00
YILS
204468935b 构建测试 2025-08-08 10:13:34 +08:00
YILS
46c612946b 优化构建配置 2025-08-08 10:04:41 +08:00
YILS
8c77530f58 优化构建配置 2025-08-08 09:48:52 +08:00
YILS
d1be7c2043 优化构建配置 2025-08-07 18:01:51 +08:00
YILS
4423ca2ceb 优化构建配置 2025-08-07 17:46:59 +08:00
YILS
178cc1c1f9 优化构建配置 2025-08-07 17:37:40 +08:00
7 changed files with 49 additions and 24 deletions

View File

@@ -71,18 +71,16 @@ jobs:
echo "EOF" >> $GITHUB_ENV
shell: bash
# Upload artifacts
- name: Upload artifacts
uses: softprops/action-gh-release@v1
# Publish Release
- name: Publish Release
uses: softprops/action-gh-release@v2
with:
files: |
release/${env.VERSION}/*.dmg
release/${env.VERSION}/*.exe
release/${env.VERSION}/*.deb
release/${env.VERSION}/*.rpm
release/${env.VERSION}/*.AppImage
release/${env.VERSION}/latest*.yml
release/${env.VERSION}/*.blockmap
release/${{ env.VERSION }}/*.dmg
release/${{ env.VERSION }}/*.exe
release/${{ env.VERSION }}/*.deb
release/${{ env.VERSION }}/*.rpm
release/${{ env.VERSION }}/*.AppImage
body: ${{ env.NOTES }}
draft: false
prerelease: false

View File

@@ -1,7 +1,22 @@
# Changelog
此项目的所有显著更改都将记录在此文件中。
## [v0.7.2] - 2025-08-07
## [1.0.1] - 2025-08-12
### Fixed
- 修复混剪片段与语音时长不一致问题
- 修复渲染卡帧问题
## [v1.0.0] - 2025-08-08
### Added
- 发布第一个正式版本
- 支持使用大语言模型生成文案推荐免费的GLM-4.5-Flash
- 支持使用EdgeTTS免费合成语音
- 支持视频分镜自动混剪
- 支持渲染合成视频
- 支持自动化批量任务
- 美观的UI界面
## [v0.7.12] - 2025-08-08
### Added
- 构建测试
- 跨平台: macOS dmg, Windows exe, Linux deb/rpm/AppImage.
- 跨平台: macOS dmg, Windows exe, Linux AppImage.

View File

@@ -25,8 +25,8 @@
[![分支][forks-shield]][forks-url]
[![星标][stars-shield]][stars-url]
[![问题][issues-shield]][issues-url]
<!-- [![最新版本][release-shield]][release-url]
![发布日期][release-date-shield] -->
[![最新版本][release-shield]][release-url]
<!-- ![发布日期][release-date-shield] -->
[![许可证][license-shield]][license-url]
<p align="center">

View File

@@ -11,8 +11,13 @@
npmRebuild: false, // disable rebuild node_modules 使用包内自带预构建二进制,而不重新构建
beforePack: './scripts/before-pack.js',
mac: {
target: ['dmg'],
artifactName: '${productName}-Mac-${arch}-${version}-Installer.${ext}',
target: [
{
target: 'dmg',
arch: ['universal'],
},
],
artifactName: '${name}-${version}-mac-${arch}-installer.${ext}',
icon: './public/icon.png',
},
win: {
@@ -21,7 +26,7 @@
target: 'nsis',
},
],
artifactName: '${productName}-Windows-${arch}-${version}-Setup.${ext}',
artifactName: '${name}-${version}-win-${arch}-setup.${ext}',
icon: './public/icon.png',
},
nsis: {
@@ -33,7 +38,8 @@
},
linux: {
target: ['AppImage'],
artifactName: '${productName}-Linux-${arch}-${version}.${ext}',
artifactName: '${name}-${version}-linux-${arch}.${ext}',
icon: './public/icon.png',
},
publish: null, // disable auto publish 防止重复发版
}

View File

@@ -86,7 +86,10 @@ export async function renderVideo(
})
// 拼接视频
filters.push(`[${videoStreams.join('][')}]concat=n=${videoFiles.length}:v=1:a=0[vout]`)
filters.push(`[${videoStreams.join('][')}]concat=n=${videoFiles.length}:v=1:a=0[vconcat]`)
// 重置时间基、帧率、色彩空间
filters.push(`[vconcat]fps=30,format=yuv420p,setpts=PTS-STARTPTS[vout]`)
// 在视频拼接后添加字幕
filters.push(`[vout]subtitles=${subtitleFile.replace(/\:/g, '\\\\:')}[with_subs]`)
@@ -122,6 +125,8 @@ export async function renderVideo(
'aac',
'-b:a',
'128k',
'-fps_mode',
'cfr',
'-s',
`${outputSize.width}x${outputSize.height}`,
'-progress',
@@ -132,6 +137,7 @@ export async function renderVideo(
)
// 打印命令
// console.log('传入参数:', params)
// console.log('执行命令:', args.join(' '))
// 执行命令

View File

@@ -1,14 +1,14 @@
{
"name": "short-video-factory",
"description": "短视频工厂一键生成产品营销与泛内容短视频AI批量自动剪辑",
"version": "0.7.2",
"version": "1.0.1",
"author": {
"name": "YILS",
"developer": "YILS",
"email": "yils_lin@163.com",
"url": "https://yils.blog/"
},
"repository": "https://github.com/YILS-LIN/short-video-factory",
"homepage": "https://github.com/YILS-LIN/short-video-factory",
"main": "dist-electron/main.js",
"scripts": {
"dev": "cross-env VITE_CJS_IGNORE_WARNING=true vite",

View File

@@ -153,7 +153,7 @@ const getVideoSegments = (options: { duration: number }) => {
// 获取一个随机素材以及相关信息
const randomAsset = random.choice(tempVideoAssets)!
const randomAssetIndex = tempVideoAssets.indexOf(randomAsset)
const randomAssetIndex = videoAssets.value.findIndex((asset) => asset.path === randomAsset.path)
const randomAssetInfo = videoInfoList.value[randomAssetIndex]
// 删除已选素材
@@ -180,8 +180,8 @@ const getVideoSegments = (options: { duration: number }) => {
// 处理最后一个片段时长小于最小片段时长情况
if (options.duration - currentTotalDuration - randomSegmentDuration < minSegmentDuration) {
if (randomSegmentDuration + minSegmentDuration < randomAssetInfo.duration) {
randomSegmentDuration += minSegmentDuration
if (options.duration - currentTotalDuration < randomAssetInfo.duration) {
randomSegmentDuration = options.duration - currentTotalDuration
}
}