This code gives this error: ffmpeg exited with code 1: Error reinitializing filters!\nFailed to inject frame into filter network: Invalid argument\nError while processing the decoded data for stream #0:0\nConversion failed!
However when i placed the subtitle file in the same directory in which the code is running and changed
this line: .videoFilters([subtitles=${subtitleFilePath}])
to this: .videoFilters([subtitles=${"./subtitle.srt"}])
Then the code ran successfully.
P.S : I am using the temp directory (os.tmpdir()) to place all my input and output files feeded to ffmpeg. The paths are set correctly. I even tried to convert the subtitleFilePath from C:\\Users\\User1\\AppData\\Local\\Temp\\sample.srt to this file:///C:/Users/User1/AppData/Local/Temp/sample.srt but still the same error pops up.
I am trying to access the subtitle (.srt) file from the temp directory , here is my code
This code gives this error:
ffmpeg exited with code 1: Error reinitializing filters!\nFailed to inject frame into filter network: Invalid argument\nError while processing the decoded data for stream #0:0\nConversion failed!
However when i placed the subtitle file in the same directory in which the code is running and changed this line:
.videoFilters([
subtitles=${subtitleFilePath}])
to this:.videoFilters([
subtitles=${"./subtitle.srt"}])
Then the code ran successfully. P.S : I am using the temp directory (os.tmpdir()) to place all my input and output files feeded to ffmpeg. The paths are set correctly. I even tried to convert the subtitleFilePath from
C:\\Users\\User1\\AppData\\Local\\Temp\\sample.srt
to thisfile:///C:/Users/User1/AppData/Local/Temp/sample.srt
but still the same error pops up.