mirror of
https://github.com/YILS-LIN/short-video-factory.git
synced 2025-11-25 19:37:50 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00a21aef46 | ||
|
|
50e3c403d0 | ||
|
|
29adaa3989 | ||
|
|
31780f4703 | ||
|
|
2cead83ddc | ||
|
|
95b1aa359f | ||
|
|
b9b656da9e | ||
|
|
a328a5aea3 | ||
|
|
204468935b |
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
@@ -71,19 +71,18 @@ jobs:
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
# Upload artifacts
|
||||
- name: Upload artifacts
|
||||
uses: ncipollo/release-action@v1
|
||||
# Publish Release
|
||||
- name: Publish Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
artifacts: |
|
||||
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
|
||||
files: |
|
||||
release/${{ env.VERSION }}/*.dmg
|
||||
release/${{ env.VERSION }}/*.exe
|
||||
release/${{ env.VERSION }}/*.deb
|
||||
release/${{ env.VERSION }}/*.rpm
|
||||
release/${{ env.VERSION }}/*.AppImage
|
||||
body: ${{ env.NOTES }}
|
||||
allowUpdates: true
|
||||
draft: false
|
||||
prerelease: false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -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.7] - 2025-08-07
|
||||
## [v0.7.12] - 2025-08-08
|
||||
### Added
|
||||
- 构建测试
|
||||
- 跨平台: macOS dmg, Windows exe, Linux AppImage.
|
||||
@@ -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">
|
||||
|
||||
@@ -11,8 +11,13 @@
|
||||
npmRebuild: false, // disable rebuild node_modules 使用包内自带预构建二进制,而不重新构建
|
||||
beforePack: './scripts/before-pack.js',
|
||||
mac: {
|
||||
target: ['dmg'],
|
||||
artifactName: '${name}-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: '${name}-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: '${name}-linux-${arch}-${version}.${ext}',
|
||||
artifactName: '${name}-${version}-linux-${arch}.${ext}',
|
||||
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]`)
|
||||
@@ -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(' '))
|
||||
|
||||
// 执行命令
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "short-video-factory",
|
||||
"description": "短视频工厂,一键生成产品营销与泛内容短视频,AI批量自动剪辑",
|
||||
"version": "0.7.7",
|
||||
"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",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user