ENVIRONMENT:
Python 3.10
Windows 11
ffmpeg-python==0.2.0
CONTEXT:
I am trying to add hardcoded subtitles on a video with ffmpeg and Pyton.
PROBLEM:
ffmpeg is not able to find the path of my ass subtitle file. So I tried different ways with different methods. I asked different AI to try to find a solution. Impossible! It is such a crazy issue that I tested the code from a "test" folder located on the root "C:" from the command line wid nows. No AI was able to fixed this issue. I tried chatGPT, deepseek, claude.ai. They proposed different solutions which were not working.
THE CODE :
import os
import ffmpeg
import subprocess
def add_subtitles_with_ass(video_path, ass_path, output_path):
video_path = os.path.abspath(video_path)
ass_path = os.path.abspath(ass_path)
output_path = os.path.abspath(output_path)
print(f"