mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
chore(wasm-output): authors, comments, cspell dict
This commit is contained in:
parent
cf3d9fd956
commit
760942ce68
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -17,6 +17,7 @@
|
||||
"afterbegin",
|
||||
"afterend",
|
||||
"akari",
|
||||
"alac",
|
||||
"BALH",
|
||||
"Bangumi",
|
||||
"bcache",
|
||||
@ -75,6 +76,7 @@
|
||||
"minmax",
|
||||
"mixins",
|
||||
"Muuri",
|
||||
"muxer",
|
||||
"overscroll",
|
||||
"pako",
|
||||
"plusplus",
|
||||
|
||||
@ -11,10 +11,16 @@ export const plugin: PluginMetadata = {
|
||||
name: 'downloadVideo.outputs.wasm',
|
||||
displayName: `下载视频 - ${title}`,
|
||||
description: desc,
|
||||
author: {
|
||||
name: 'WakelessSloth56',
|
||||
link: 'https://github.com/WakelessSloth56',
|
||||
},
|
||||
author: [
|
||||
{
|
||||
name: 'WakelessSloth56',
|
||||
link: 'https://github.com/WakelessSloth56',
|
||||
},
|
||||
{
|
||||
name: 'LainIO24',
|
||||
link: 'https://github.com/LainIO24',
|
||||
},
|
||||
],
|
||||
setup: ({ addData }) => {
|
||||
addData('downloadVideo.outputs', (outputs: DownloadVideoOutput[]) => {
|
||||
outputs.push({
|
||||
|
||||
@ -10,6 +10,7 @@ const mp4Format: Format = {
|
||||
args.push('-i', 'cover', '-i', 'metadata')
|
||||
args.push('-map', '0', '-map', '1', '-map', '2')
|
||||
args.push('-map_metadata', '3', '-disposition:2', 'attached_pic')
|
||||
// mdta atom 格式元数据和封面互相干扰,不启用 +use_metadata_tags
|
||||
} else if (hasCover && !hasMetadata) {
|
||||
args.push('-i', 'cover')
|
||||
args.push('-map', '0', '-map', '1', '-map', '2')
|
||||
@ -19,7 +20,7 @@ const mp4Format: Format = {
|
||||
args.push('-map_metadata', '2', '-movflags', '+use_metadata_tags')
|
||||
}
|
||||
args.push('-codec:v', 'copy')
|
||||
args.push('-codec:a', isFlac ? 'alac' : 'copy')
|
||||
args.push('-codec:a', isFlac ? 'alac' : 'copy') // MP4不支持FLAC,使用ALAC重新编码FLAC
|
||||
args.push('-f', 'mp4')
|
||||
return args
|
||||
},
|
||||
@ -62,6 +63,9 @@ export async function mux(
|
||||
metadata: Uint8Array,
|
||||
) {
|
||||
if (outputType === 'auto') {
|
||||
// 自动选择格式:
|
||||
// FLAC音轨 -> MKV
|
||||
// 元数据+封面 -> MKV
|
||||
outputType = isFlac ? 'matroska' : 'mp4'
|
||||
outputType = cover && metadata ? 'matroska' : outputType
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user