auto-subtitle
auto-subtitle copied to clipboard
Unable to add subtitles to video!!!
This code exist bug: ` video = ffmpeg.input(path) audio = video.audio
ffmpeg.concat(
video.filter('subtitles', srt_path, force_style="OutlineColour=&H40000000,BorderStyle=3"), audio, v=1, a=1
).output(out_path).run(quiet=True, overwrite_output=True)`
To be specific, video = ffmpeg.filter(video, 'subtitles', subtitle_path, force_style="OutlineColour=&H40000000, BorderStyle=3"), lead to .run() error, ffmpeg maybe No such filter: 'subtitles'.
I hope you will reply as soon as
What kind of device are you using? You can set the quiet
option in run
to False
to get the error message from ffmpeg
.
Glad to hear from you, I have fixed the problem, it seems that the "ffmpeg-python" generation graph was incorrectly executed by "ffmpeg". Since what I want to do is to add "srt" subtitles to the "mp4" video, the two seem to be incompatible, setting the encoding of the subtitles to "mov_text" will successfully add subtitles to the video.
@RedHeartSecretMan I have the same issue, can you explain how you fixed it?
In my research and testing, the main reason for this problem is that the video format is incompatible with the subtitle format encoded into it. For details, you can look at the project I wrote https://github.com/RedHeartSecretMan/go_subtitle/blob/main/subtitler/app.py 145-171 lines