Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

字幕是否可以作用于整个视频而不是单独的场景 #452

Open
xmy1024 opened this issue Nov 25, 2024 · 1 comment
Open

字幕是否可以作用于整个视频而不是单独的场景 #452

xmy1024 opened this issue Nov 25, 2024 · 1 comment

Comments

@xmy1024
Copy link

xmy1024 commented Nov 25, 2024

如果想在一整个视频里添加字幕和音频,但是视频包含了多个场景
目前我看只有场景里可以增加字幕元素,但是creator无法增加字幕

@drawcall
Copy link
Member

drawcall commented Dec 2, 2024

音频支持,字幕暂时不支持全局,后续可添加

// 1. 添加全局背景音
creator.addAudio('../audio/bg.mp3');  // 俩种配置方式
creator.addAudio({ loop: false, path: ... , volume:1.5});
// 2. 为每个场景添加单独音乐
scene.addAudio('../audio/bg.mp3');  // 俩种配置方式
scene.addAudio({ loop: false,path: ... , start: 20, volume:"20dB"});

// volume 音量调整参数
// 0.5:音量减半  1.5:音量为原来的150% 20dB:增加10分贝 -20dB:减小20分贝
// https://trac.ffmpeg.org/wiki/AudioVolume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants