ffmpeg.wasm: -vf subtitles=example.srt not work
how can i insert .srt format subtitle into mp4 video ?
ffmpeg.run('-i', 'output.mp4', '-vf', 'subtitles=xxx.srt', this.output)
not work
should compile ffmpeg.wasm with --enable-filter=subtitles ?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 25
Hi @kkxlkkxllb . I’m glad It compiled nicely. I have one more tip for you. You will need to upload the font file you want to use on your subtitles and then specify it on your command. I’m away from the computer, but as soon as possible, I’ll share some code to show how I’m doing.
Here is the example code:
Thanks @loe-lobo , the PR has been merged and this feature is included in release v0.9.8. 😄
@allilevine Thank you for your help
2022.5.11 my problem has been solved Fontname use this:
code
I’m glad it worked in the end, usually it’s something related with the font name.
Fontname=abel-v12-latin-regular
might not be the correct Fontname to be used, did you tryFontname=Abel
? I think it should work.I got it working with another font, but I think it was just an issue with the
Fontname
.@loe-lobo can you create a PR to https://github.com/ffmpegwasm/ffmpeg.wasm-core? So that I can merge it and publish a new version of ffmpeg.wasm-core.
BTW, I checked your commits already and I think they are amazing 😄