mirror of
https://github.com/YILS-LIN/short-video-factory.git
synced 2025-11-25 19:37:50 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00a21aef46 | ||
|
|
50e3c403d0 | ||
|
|
29adaa3989 | ||
|
|
31780f4703 | ||
|
|
2cead83ddc | ||
|
|
95b1aa359f |
27
.github/workflows/build.yml
vendored
27
.github/workflows/build.yml
vendored
@@ -71,29 +71,18 @@ jobs:
|
|||||||
echo "EOF" >> $GITHUB_ENV
|
echo "EOF" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# Test
|
# Publish Release
|
||||||
- name: Test
|
- name: Publish Release
|
||||||
id: Test
|
|
||||||
run: |
|
|
||||||
ls -al
|
|
||||||
ls -al release
|
|
||||||
ls -al release/${env.VERSION}
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
# Create Release
|
|
||||||
- name: Create Release
|
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
release/${env.VERSION}/*.dmg
|
release/${{ env.VERSION }}/*.dmg
|
||||||
release/${env.VERSION}/*.exe
|
release/${{ env.VERSION }}/*.exe
|
||||||
release/${env.VERSION}/*.deb
|
release/${{ env.VERSION }}/*.deb
|
||||||
release/${env.VERSION}/*.rpm
|
release/${{ env.VERSION }}/*.rpm
|
||||||
release/${env.VERSION}/*.AppImage
|
release/${{ env.VERSION }}/*.AppImage
|
||||||
release/${env.VERSION}/latest*.yml
|
|
||||||
release/${env.VERSION}/*.blockmap
|
|
||||||
body: ${{ env.NOTES }}
|
body: ${{ env.NOTES }}
|
||||||
draft: true
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
此项目的所有显著更改都将记录在此文件中。
|
此项目的所有显著更改都将记录在此文件中。
|
||||||
|
|
||||||
## [v1.0.0] - 2025-08-07
|
## [1.0.1] - 2025-08-12
|
||||||
|
### Fixed
|
||||||
|
- 修复混剪片段与语音时长不一致问题
|
||||||
|
- 修复渲染卡帧问题
|
||||||
|
|
||||||
|
## [v1.0.0] - 2025-08-08
|
||||||
### Added
|
### Added
|
||||||
- 发布第一个正式版本
|
- 发布第一个正式版本
|
||||||
- 支持使用大语言模型生成文案(推荐免费的GLM-4.5-Flash)
|
- 支持使用大语言模型生成文案(推荐免费的GLM-4.5-Flash)
|
||||||
@@ -11,7 +16,7 @@
|
|||||||
- 支持自动化批量任务
|
- 支持自动化批量任务
|
||||||
- 美观的UI界面
|
- 美观的UI界面
|
||||||
|
|
||||||
## [v0.7.10] - 2025-08-07
|
## [v0.7.12] - 2025-08-08
|
||||||
### Added
|
### Added
|
||||||
- 构建测试
|
- 构建测试
|
||||||
- 跨平台: macOS dmg, Windows exe, Linux AppImage.
|
- 跨平台: macOS dmg, Windows exe, Linux AppImage.
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
[![分支][forks-shield]][forks-url]
|
[![分支][forks-shield]][forks-url]
|
||||||
[![星标][stars-shield]][stars-url]
|
[![星标][stars-shield]][stars-url]
|
||||||
[![问题][issues-shield]][issues-url]
|
[![问题][issues-shield]][issues-url]
|
||||||
<!-- [![最新版本][release-shield]][release-url]
|
[![最新版本][release-shield]][release-url]
|
||||||
![发布日期][release-date-shield] -->
|
<!-- ![发布日期][release-date-shield] -->
|
||||||
[![许可证][license-shield]][license-url]
|
[![许可证][license-shield]][license-url]
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
arch: ['universal'],
|
arch: ['universal'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
artifactName: '${name}-mac-${version}-installer.${ext}',
|
artifactName: '${name}-${version}-mac-${arch}-installer.${ext}',
|
||||||
icon: './public/icon.png',
|
icon: './public/icon.png',
|
||||||
},
|
},
|
||||||
win: {
|
win: {
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
target: 'nsis',
|
target: 'nsis',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
artifactName: '${name}-win-${arch}-${version}-setup.${ext}',
|
artifactName: '${name}-${version}-win-${arch}-setup.${ext}',
|
||||||
icon: './public/icon.png',
|
icon: './public/icon.png',
|
||||||
},
|
},
|
||||||
nsis: {
|
nsis: {
|
||||||
@@ -38,7 +38,8 @@
|
|||||||
},
|
},
|
||||||
linux: {
|
linux: {
|
||||||
target: ['AppImage'],
|
target: ['AppImage'],
|
||||||
artifactName: '${name}-linux-${arch}-${version}.${ext}',
|
artifactName: '${name}-${version}-linux-${arch}.${ext}',
|
||||||
icon: './public/icon.png',
|
icon: './public/icon.png',
|
||||||
},
|
},
|
||||||
|
publish: null, // disable auto publish 防止重复发版
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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]`)
|
filters.push(`[vout]subtitles=${subtitleFile.replace(/\:/g, '\\\\:')}[with_subs]`)
|
||||||
@@ -122,6 +125,8 @@ export async function renderVideo(
|
|||||||
'aac',
|
'aac',
|
||||||
'-b:a',
|
'-b:a',
|
||||||
'128k',
|
'128k',
|
||||||
|
'-fps_mode',
|
||||||
|
'cfr',
|
||||||
'-s',
|
'-s',
|
||||||
`${outputSize.width}x${outputSize.height}`,
|
`${outputSize.width}x${outputSize.height}`,
|
||||||
'-progress',
|
'-progress',
|
||||||
@@ -132,6 +137,7 @@ export async function renderVideo(
|
|||||||
)
|
)
|
||||||
|
|
||||||
// 打印命令
|
// 打印命令
|
||||||
|
// console.log('传入参数:', params)
|
||||||
// console.log('执行命令:', args.join(' '))
|
// console.log('执行命令:', args.join(' '))
|
||||||
|
|
||||||
// 执行命令
|
// 执行命令
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "short-video-factory",
|
"name": "short-video-factory",
|
||||||
"description": "短视频工厂,一键生成产品营销与泛内容短视频,AI批量自动剪辑",
|
"description": "短视频工厂,一键生成产品营销与泛内容短视频,AI批量自动剪辑",
|
||||||
"version": "0.7.10",
|
"version": "1.0.1",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "YILS",
|
"name": "YILS",
|
||||||
"developer": "YILS",
|
"developer": "YILS",
|
||||||
"email": "yils_lin@163.com",
|
"email": "yils_lin@163.com",
|
||||||
"url": "https://yils.blog/"
|
"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",
|
"main": "dist-electron/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env VITE_CJS_IGNORE_WARNING=true vite",
|
"dev": "cross-env VITE_CJS_IGNORE_WARNING=true vite",
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ const getVideoSegments = (options: { duration: number }) => {
|
|||||||
|
|
||||||
// 获取一个随机素材以及相关信息
|
// 获取一个随机素材以及相关信息
|
||||||
const randomAsset = random.choice(tempVideoAssets)!
|
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]
|
const randomAssetInfo = videoInfoList.value[randomAssetIndex]
|
||||||
|
|
||||||
// 删除已选素材
|
// 删除已选素材
|
||||||
@@ -180,8 +180,8 @@ const getVideoSegments = (options: { duration: number }) => {
|
|||||||
|
|
||||||
// 处理最后一个片段时长小于最小片段时长情况
|
// 处理最后一个片段时长小于最小片段时长情况
|
||||||
if (options.duration - currentTotalDuration - randomSegmentDuration < minSegmentDuration) {
|
if (options.duration - currentTotalDuration - randomSegmentDuration < minSegmentDuration) {
|
||||||
if (randomSegmentDuration + minSegmentDuration < randomAssetInfo.duration) {
|
if (options.duration - currentTotalDuration < randomAssetInfo.duration) {
|
||||||
randomSegmentDuration += minSegmentDuration
|
randomSegmentDuration = options.duration - currentTotalDuration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user