Quantcast
Channel: MCEBuddy 2.x
Viewing all articles
Browse latest Browse all 10715

New Post: Subtitles... adjust via cut amount, or can subtitles be hard burned-in before comskip?

$
0
0
Thank you for adding these. I have been playing with the build and burning in subtitles, and have found a few things. Also, with an added parameter for profiles.conf, this can be done in a single step without chaining.


First, mencoder is terrible at burning in subtitles. It works, but there are so many artifacts on the screen, it is hard to watch.
Second, handbrake cannot burn in SRT subtitles. So that is out.
That leaves FFmpeg, which works fantastic at burning in subtitles. A few things are required in order to make FFmpeg burn in subtitles though:

1) In the folder that ffmpeg.exe is located, a new folder called "fonts" must be created. Inside this folder, a file called "fonts.conf" must exist. The "fonts.conf" file, needs to have data such as the following in it:
<?xml version="1.0"?>
<fontconfig>

<dir>C:\WINDOWS\Fonts</dir>

<match target="pattern">
<test qual="any" name="family"><string>mono</string></test>
<edit name="family" mode="assign"><string>monospace</string></edit>
</match>

<match target="pattern">
<test qual="all" name="family" compare="not_eq"><string>sans-serif</string></test>
<test qual="all" name="family" compare="not_eq"><string>serif</string></test>
<test qual="all" name="family" compare="not_eq"><string>monospace</string></test>
<edit name="family" mode="append_last"><string>sans-serif</string></edit>
</match>

<alias>
<family>Times</family>
<prefer><family>Times New Roman</family></prefer>
<default><family>serif</family></default>
</alias>
<alias>
<family>Helvetica</family>
<prefer><family>Arial</family></prefer>
<default><family>sans</family></default>
</alias>
<alias>
<family>Courier</family>
<prefer><family>Courier New</family></prefer>
<default><family>monospace</family></default>
</alias>
<alias>
<family>serif</family>
<prefer><family>Times New Roman</family></prefer>
</alias>
<alias>
<family>sans</family>
<prefer><family>Arial</family></prefer>
</alias>
<alias>
<family>monospace</family>
<prefer><family>Andale Mono</family></prefer>
</alias>
<match target="pattern">
<test name="family" compare="eq">
<string>Courier New</string>
</test>
<edit name="family" mode="prepend">
<string>monospace</string>
</edit>
</match>
<match target="pattern">
<test name="family" compare="eq">
<string>Courier</string>
</test>
<edit name="family" mode="prepend">
<string>monospace</string>
</edit>
</match>

</fontconfig>
2) in the -vf section of the command line for ffmpeg, the option "subtitles=" must be added. What comes next must be the full path and file name of the SRT file to be hardcoded. The issue is that the path must be properly escaped (ffmpeg escaping rules). I have tried single quotes, double quotes, in all sorts of places. Bottom line is it doesn't work using <source_without_ext> as this is not properly escaped for ffmpeg. I understand how it might mess things up, but the whole option can be enclosed in double quotes, and this works. For example, in the profiles.conf file, for the "MP4 High Quality" settings, if I add (including the quotes and leading comma):

,"subtitles=c\:/temp/test.srt"

To the end of the -vf options, then it works perfect. So the -vf options look like:

-vf yadif=0:-1:1,hqdn3d,"subtitles=c\:/temp/test.srt"


If an option like <ffmpeg_escaped_source_without_ext> could be added, it would work very well, the profiles.conf looking like this:

-vf yadif=0:-1:1,hqdn3d,"subtitles=<ffmpeg_escaped_source_without_ext>.srt"

If that is not possible, an alternative would be to have an option like <source_without_ext_and_without_path>, meaning just the filename. MCEBuddy would have to be set to only do 1 conversion at a time, and the location of the working0 directory would be hardcoded into the profiles.conf, something like:

-vf yadif=0:-1:1,hqdn3d,"subtitles=c\:/temp/working0/<source_without_ext_and_without_path>.srt"


Thanks again.

Viewing all articles
Browse latest Browse all 10715

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>