I have search for a while now and didn't find anything similar or maybe I didn't searched enough but I want to hardcode over 12k of mp4 files , so I wonder what is the most easy way to do it ? Is there a program or a script that can detect the mp4 file and subtitle file and hardcode multiple video files ? Like a batch script or something. But also with the possibility to set the font size and style. Even if it's a software that you now , I will buy it if it's doing the job.
Thanks,
+ Reply to Thread
Results 1 to 8 of 8
-
-
Perhaps some more info. Like OS and format of subtitles and perhaps target codecs/container.
At any rate: You could use a batch job with Subtitle Edit CLI to convert to .ass to have font size and style and then hardcode with ffmpeg using https://ffmpeg.org/ffmpeg-filters.html#ass -
I want to use on Windows 8.1 and container to be the same , with the same specification like the source file.To copy the video and audio and burn in the subtitle.
But for exemple in a folder I have 22 mp4 files and 22 ass files.How can I burn them using a batch with ffmpeg ?Last edited by zyck; 9th Mar 2017 at 09:32.
-
You say "copy the video" and "burn in the subtitle" which makes it hard to understand because those are usually mutually exclusive. Do you want softsubbing or hardsubbing? Hardsubbing ("burn in") implies video re-encoding.
-
I want to hardsub a video (burn in) and it mean that I need to re-encode the video it's ok , but there it must be some settings to have the same video quality like before or at least appropriate.
Like I said in the exemple I have 22 mp4 files and 22 .ass every .mp4 and .ass file whit the same name (bla01.mp4 bla01.ass; bla02.mp4 bla02.ass etc ) and I want with a simple command to hardsub those videos and if not possible with ffmpeg on Windows , maybe is there a software that can't do exactly that. -
You could try something like this
Code:for %%g in (*.mp4) do ( ffmpeg -i "%%g" -c:v libx264 -preset slow -crf 20 -vf ass='%%~ng.ass' -c:a copy "%%~ng_HC.mp4" )
You can expand it with test of the existence of the .ass file etc. -
@videobruger
Man you are awesome thanks.
I had a problem with subtitle the first time.Than I searched a bit and found a fix to this error :
"[Parsed_ass_0 @ 0000000001cdee60] Shaper: FriBidi 0.19.6 (SIMPLE)
Fontconfig error: Cannot load default config file
[Parsed_ass_0 @ 0000000001cdee60] No usable fontconfig configuration file found,
using fallback."
I just installed ffmpeg and then I need it to add also fonts folder into the same folder where ffmpeg.exe.
The font config I downloaded from here : http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip -
Try to add (before calling ffmpeg) something like this:
Code:@set FC_CONFIG_DIR=.\fonts @set FONTCONFIG_FILE=fonts.conf @set FONTCONFIG_PATH=.\fonts
Code:<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <!-- /etc/fonts/fonts.conf file to configure system font access --> <fontconfig> <!-- DO NOT EDIT THIS FILE. IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED. LOCAL CHANGES BELONG IN 'local.conf'. The intent of this standard configuration file is to be adequate for most environments. If you have a reasonably normal environment and have found problems with this configuration, they are probably things that others will also want fixed. Please submit any problems to the fontconfig bugzilla system located at fontconfig.org Note that the normal 'make install' procedure for fontconfig is to replace any existing fonts.conf file with the new version. Place any local customizations in local.conf which this file references. Keith Packard --> <!-- Font directory list --> <dir>WINDOWSFONTDIR</dir> <dir>~/fonts</dir> <dir>.</dir> <dir>~/.fonts</dir> <!-- Accept deprecated 'mono' alias, replacing it with 'monospace' --> <match target="pattern"> <test qual="any" name="family"> <string>mono</string> </test> <edit name="family" mode="assign"> <string>monospace</string> </edit> </match> <!-- Accept alternate 'sans serif' spelling, replacing it with 'sans-serif' --> <match target="pattern"> <test qual="any" name="family"> <string>sans serif</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match> <!-- Accept deprecated 'sans' alias, replacing it with 'sans-serif' --> <match target="pattern"> <test qual="any" name="family"> <string>sans</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match> <!-- Load local system customization file --> <include ignore_missing="yes">conf.d</include> <!-- Font cache directory list --> <cachedir>WINDOWSTEMPDIR_FONTCONFIG_CACHE</cachedir> <cachedir>~/.fontconfig</cachedir> <config> <!-- These are the default Unicode chars that are expected to be blank in fonts. All other blank chars are assumed to be broken and won't appear in the resulting charsets --> <blank> <int>0x0020</int> <!-- SPACE --> <int>0x00A0</int> <!-- NO-BREAK SPACE --> <int>0x00AD</int> <!-- SOFT HYPHEN --> <int>0x034F</int> <!-- COMBINING GRAPHEME JOINER --> <int>0x0600</int> <!-- ARABIC NUMBER SIGN --> <int>0x0601</int> <!-- ARABIC SIGN SANAH --> <int>0x0602</int> <!-- ARABIC FOOTNOTE MARKER --> <int>0x0603</int> <!-- ARABIC SIGN SAFHA --> <int>0x06DD</int> <!-- ARABIC END OF AYAH --> <int>0x070F</int> <!-- SYRIAC ABBREVIATION MARK --> <int>0x115F</int> <!-- HANGUL CHOSEONG FILLER --> <int>0x1160</int> <!-- HANGUL JUNGSEONG FILLER --> <int>0x1680</int> <!-- OGHAM SPACE MARK --> <int>0x17B4</int> <!-- KHMER VOWEL INHERENT AQ --> <int>0x17B5</int> <!-- KHMER VOWEL INHERENT AA --> <int>0x180E</int> <!-- MONGOLIAN VOWEL SEPARATOR --> <int>0x2000</int> <!-- EN QUAD --> <int>0x2001</int> <!-- EM QUAD --> <int>0x2002</int> <!-- EN SPACE --> <int>0x2003</int> <!-- EM SPACE --> <int>0x2004</int> <!-- THREE-PER-EM SPACE --> <int>0x2005</int> <!-- FOUR-PER-EM SPACE --> <int>0x2006</int> <!-- SIX-PER-EM SPACE --> <int>0x2007</int> <!-- FIGURE SPACE --> <int>0x2008</int> <!-- PUNCTUATION SPACE --> <int>0x2009</int> <!-- THIN SPACE --> <int>0x200A</int> <!-- HAIR SPACE --> <int>0x200B</int> <!-- ZERO WIDTH SPACE --> <int>0x200C</int> <!-- ZERO WIDTH NON-JOINER --> <int>0x200D</int> <!-- ZERO WIDTH JOINER --> <int>0x200E</int> <!-- LEFT-TO-RIGHT MARK --> <int>0x200F</int> <!-- RIGHT-TO-LEFT MARK --> <int>0x2028</int> <!-- LINE SEPARATOR --> <int>0x2029</int> <!-- PARAGRAPH SEPARATOR --> <int>0x202A</int> <!-- LEFT-TO-RIGHT EMBEDDING --> <int>0x202B</int> <!-- RIGHT-TO-LEFT EMBEDDING --> <int>0x202C</int> <!-- POP DIRECTIONAL FORMATTING --> <int>0x202D</int> <!-- LEFT-TO-RIGHT OVERRIDE --> <int>0x202E</int> <!-- RIGHT-TO-LEFT OVERRIDE --> <int>0x202F</int> <!-- NARROW NO-BREAK SPACE --> <int>0x205F</int> <!-- MEDIUM MATHEMATICAL SPACE --> <int>0x2060</int> <!-- WORD JOINER --> <int>0x2061</int> <!-- FUNCTION APPLICATION --> <int>0x2062</int> <!-- INVISIBLE TIMES --> <int>0x2063</int> <!-- INVISIBLE SEPARATOR --> <int>0x206A</int> <!-- INHIBIT SYMMETRIC SWAPPING --> <int>0x206B</int> <!-- ACTIVATE SYMMETRIC SWAPPING --> <int>0x206C</int> <!-- INHIBIT ARABIC FORM SHAPING --> <int>0x206D</int> <!-- ACTIVATE ARABIC FORM SHAPING --> <int>0x206E</int> <!-- NATIONAL DIGIT SHAPES --> <int>0x206F</int> <!-- NOMINAL DIGIT SHAPES --> <int>0x2800</int> <!-- BRAILLE PATTERN BLANK --> <int>0x3000</int> <!-- IDEOGRAPHIC SPACE --> <int>0x3164</int> <!-- HANGUL FILLER --> <int>0xFEFF</int> <!-- ZERO WIDTH NO-BREAK SPACE --> <int>0xFFA0</int> <!-- HALFWIDTH HANGUL FILLER --> <int>0xFFF9</int> <!-- INTERLINEAR ANNOTATION ANCHOR --> <int>0xFFFA</int> <!-- INTERLINEAR ANNOTATION SEPARATOR --> <int>0xFFFB</int> <!-- INTERLINEAR ANNOTATION TERMINATOR --> </blank> <!-- Rescan configuration every 30 seconds when FcFontSetList is called --> <rescan> <int>30</int> </rescan> </config> </fontconfig>
Similar Threads
-
Hardcode subs and change position of SOME lines
By bhra0 in forum SubtitleReplies: 10Last Post: 28th Sep 2016, 17:35 -
Hardcode subtitles into a MP4\MKV file
By uncivil002 in forum SubtitleReplies: 18Last Post: 12th May 2015, 04:16 -
Trying to demux MKV file and remux as AVI with hardcode subs
By medicated in forum Video ConversionReplies: 24Last Post: 2nd Aug 2013, 20:48 -
Hardcode srt subs into avi file
By LegendX in forum SubtitleReplies: 1Last Post: 9th May 2013, 15:35 -
is there a software allows me to hardcode srt subs and change their size?
By HeartBreak_Kid in forum SubtitleReplies: 17Last Post: 2nd Jul 2012, 03:52