Before you ask, I have FFmpeg compiled with --enable-libass and I'm a Windows user.
First I convert one of the audio streams from the video to AAC, then I try to hardcode from the source video with a external ASS subtitle file but nothing works.
The only thing I get is error messages like thisCode:FOR %%I in (%idir1%\*.%ext%) DO ("%ffmpeg64%" ^ -i "%%I" ^ -map 0:a:%AIDN% ^ -f wav - | "%qaac%" ^ --ignorelength ^ --adts ^ --tvbr 127 ^ --no-delay - -o "%idir2%\%%~nI.aac" ^ --threading ) FOR %%O in (%idir1%\*.%ext%) DO ("%ffmpeg64%" ^ -i "%%O" ^ -i "%idir2%\%%~nO.AAC" ^ -filter:v 'ass="%idir1%\%%~nO.ass":charenc=UTF-8:fontsdir="%idir1%\Candara.ttf"' ^ -vcodec libx264 ^ -crf 18 ^ -preset slow ^ -profile:v high ^ -level 4.0 ^ -acodec:1:a copy ^ -map 0:v ^ -map 1:0 ^ "%odir1%\%%~nO.mp4" )
Code:[AVFilterGraph @ 000001d666a13c80] No such filter: 'ass=\path\sub.ass:charenc=UTF-8:fontsdir=\path\Candara.ttf' Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #0:0
+ Reply to Thread
Results 1 to 11 of 11
-
-
-
Give ProWo's Clever a try. I have not tried it for something like this but ProWo has helped me use Clever for other video projects.
You should have this filter but the code is not finding it.Last edited by cholla; 28th Dec 2025 at 17:09.
-
This is a ffmpeg code that works from command with ffmpeg.
I do not know if you can adapt it to your script.
Even though I have ffmpeg in my Enviorment paths I still needed to put the path to the file.
Also the "' & \\ need to be in the path for the ass subtitle file.
The input.mp4 has no subtiles.Code:ffmpeg -copyts -i C:\Users\User\Desktop\Final\input.mp4 -vf ass="'C\:\\Users\\User\\Desktop\\Final\\subtitles.ass'" -c:a copy -crf 14 -preset veryslow -profile:v high -level 4.1 C:\Users\User\Desktop\Final\output.mp4
The subtitles.ass is the subtitle file for this video.(I had to put the subtitles.ass in a .zip file to upload it here)
The output.mp4 is the video file with the subtitles burned in with ffmpeg.
I'm uploading them in case you want to try the code.Last edited by cholla; 28th Dec 2025 at 17:44.
-
-
-
Thanks ProWo,
This worked except I needed to do one additional step.
The original video needs to be unchecked in multiplex.
If this is not done then the multiplexed .mp4 will have two video tracks.
Track 2 will not have burned in subtitles.
If you want both tracks one with & one without burned in subtitles then leave both video tracks checked. -
I'm sorry, but your suggestion didn't work. As you may have noticed, the script is designed to work with variables and can process multiple files in batches.
In fact, the parameters before code execution are like this.
And everything works fine as long as -vf is not included in the script-Code:set DIR=%~d1\Transcoding set "ffmpeg64=%DIR%\Tools\ffmpeg\64bits\ffmpeg.exe" set "qaac=%DIR%\Tools\eac3to\UsEac3to\qaac.exe" set idir1=%DIR%\Video\input set idir2=%DIR%\Video\input\AAC set odir1=%DIR%\Video\output
Similar Threads
-
Batch sync ASS subtitles according to frames
By Pierrou in forum SubtitleReplies: 3Last Post: 21st Dec 2024, 23:01 -
Ways to Hardsub/Burn .ass subtitles into video?
By killerteengohan in forum SubtitleReplies: 4Last Post: 28th Jun 2024, 12:08 -
ffmpeg via batch script question
By imkira3 in forum Video ConversionReplies: 4Last Post: 8th Oct 2023, 13:35 -
[FFMPEG BATCH SCRIPT] Remux MP4 to MKV removing all details data!
By Cauptain in forum Video ConversionReplies: 3Last Post: 12th Aug 2021, 04:38 -
ffmpeg Burn ASS Subtitle Batch Script
By Daringbaaz in forum Newbie / General discussionsReplies: 3Last Post: 12th Jun 2021, 02:45


Quote
