0

I'm currently working on a video processor project and aiming to generate subtitles for the videos processed.

I've found that code that combines audio, video, and adds subtitles. However, I'm struggling to figure out how to format the subtitles, such as changing their size or location within the video.

input_video = ffmpeg.input(video_path)
input_audio = ffmpeg.input(audio_path)
    
ffmpeg.concat(input_video, input_audio, v=1, a=1).filter("subtitles", subtitle_path).output(output_path).run()

Thank you in advance for any advice or suggestions.

I want the Subtitles in the midel off the screen, but they were at the bottom

1

1 Answer 1

1

Hi just found the solution and i wanted to let other now in case they also search for it:

style = "FontName=Londrina Solid,FontSize=20,PrimaryColour=&H00ffffff,OutlineColour=&H00000000,BackColour=&H80000000,Bold=1,Italic=0,Alignment=10"
ffmpeg.concat(input_video, input_audio, v=1, a=1).filter("subtitles", subtitle_path, force_style=style).output(output_path).run()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.