[Return]

Report a post

Preview
180829
I was going to ask this to staff-san directly but I figured out a thread is better for preservation of knowledge

I used the below ffmpeg cmd script (created by AI) for some anime and it worked fine, but for the one I'm trying right now it placed the subtitle at wrong location and made the text very small for some reason. Probably because they are in some weird DVD-based format.

@echo off
setlocal enabledelayedexpansion

for %%F in ("*.mkv") do (
set "name=%%~nF"
set "out=!name!.mp4"

echo.
echo ===== Processing "%%~nxF" =====

ffmpeg -y ^
-i "%%~fF" ^
-filter_complex "[0:v][0:s:0]overlay" ^
-map 0:v ^
-map 0:2 ^
-c:v libx264 -pix_fmt yuv420p -preset slow -crf 22 ^
-c:a aac -b:a 128k ^
-movflags +faststart ^
"!out!"

if errorlevel 1 (
echo ERROR: Encode failed.
) else (
echo Done: "!out!"
)
)

endlocal


If there is a script you have been using to convert torrent'd mkv anime to lo-res mp4 while burning the subs in, or any useful tutorial links, plz share (´人`)
Post number No.6238
Board Anime/Manga@Heyuri
Optional. Describe what's wrong with it.