6 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
7 changed files with 33 additions and 32 deletions

View File

@@ -71,29 +71,18 @@ jobs:
echo "EOF" >> $GITHUB_ENV
shell: bash
# Test
- name: Test
id: Test
run: |
ls -al
ls -al release
ls -al release/${env.VERSION}
shell: bash
# Create Release
- name: Create Release
# 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: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

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

@@ -17,7 +17,7 @@
arch: ['universal'],
},
],
artifactName: '${name}-mac-${version}-installer.${ext}',
artifactName: '${name}-${version}-mac-${arch}-installer.${ext}',
icon: './public/icon.png',
},
win: {
@@ -26,7 +26,7 @@
target: 'nsis',
},
],
artifactName: '${name}-win-${arch}-${version}-setup.${ext}',
artifactName: '${name}-${version}-win-${arch}-setup.${ext}',
icon: './public/icon.png',
},
nsis: {
@@ -38,7 +38,8 @@
},
linux: {
target: ['AppImage'],
artifactName: '${name}-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.10",
"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
}
}