Skip to content

Commit

Permalink
fix: 修复文件名包含空格时转换为mp4失败的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
renxia committed Jan 12, 2024
1 parent 6f507aa commit a3728ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@
"registry": "https://registry.npmjs.com"
},
"devDependencies": {
"@lzwme/fed-lint-helper": "^2.4.1",
"@types/node": "^20.10.2",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"eslint": "^8.55.0",
"@lzwme/fed-lint-helper": "^2.5.1",
"@types/node": "^20.11.0",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^8.0.3",
"prettier": "^3.1.0",
"prettier": "^3.2.1",
"standard-version": "^9.5.0",
"typescript": "^5.3.2"
"typescript": "^5.3.3"
},
"dependencies": {
"@lzwme/fe-utils": "^1.5.6",
"@lzwme/fe-utils": "^1.5.10",
"commander": "^11.1.0",
"console-log-colors": "^0.4.0",
"enquirer": "^2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/m3u8-convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function m3u8Convert(options: M3u8DLOptions, data: TsItemInfo[]) {
if (process.platform === 'win32') filesAllArr = filesAllArr.map(d => d.replaceAll('\\', '/'));
await promises.writeFile(inputFilePath, 'ffconcat version 1.0\nfile ' + filesAllArr.join('\nfile '));

const cmd = `ffmpeg -y -f concat -safe 0 -i ${inputFilePath} -acodec copy -vcodec copy -absf aac_adtstoasc ${filepath}`;
const cmd = `ffmpeg -y -f concat -safe 0 -i ${inputFilePath} -acodec copy -vcodec copy -absf aac_adtstoasc "${filepath}"`;
logger.debug('[convert to mp4]cmd:', cyan(cmd));
const r = execSync(cmd);
ffmpegSupport = !r.error;
Expand Down

0 comments on commit a3728ed

Please sign in to comment.