Created
December 14, 2016 04:03
-
-
Save shinchiro/d483748458d82e296d46e5590494c71d to your computer and use it in GitHub Desktop.
How to hardsub subtitle with FFmpeg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: | |
:: This demonstrate on how to hardsub embeded subtitle and downscale video to 360p with only FFmpeg. Ensure FFmpeg is compiled with --enable-libass | |
ffmpeg -hide_banner -i "D:\oh\test\input.mkv" -vf "subtitles='D\:\\oh\\test\\input.mkv'",scale=-1:360:flags=spline -c:v libx264 -preset ultrafast output.mp4 | |
::Character ':', '\' need to be escaped if present in input's path | |
:: Escape both characters with sed. | |
echo "D\:\\oh\\test\\input.mkv" | sed "s,\\,\\\\,g;s,:,\\:,g" >>name | |
set /p modified=< name | |
del name | |
echo %modified% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment