Reading up on the somewhat cryptic ffmpeg documentation, I learned that the drawtext filter may probably be only good for PTS, timecode, and single-line text. The proverbial lightbulb somehow flickered when I came upon the sendcmd filter. Hmmm... I imagined hearing the sound of rusty gears slowly turning in my head. The quietest most hesitant 'eureka' in the history of mankind may have escaped my lips. Uhh no, I didn't actually say 'eureka', because I'm Filipino, and we don't talk like that, but you get my drift.
After some quick tests, the verdict was out: All one has to do is create a sendcmd file (*.txt) containing all the drawtext commands telling ffmpeg what text to draw and when to draw it. It's quite simple really!
The idea is to change this:
1
00:00:19,420 --> 00:00:23,090
A SERBIAN FILM
into this:
00:00:19.420-00:00:23.090 [enter] drawtext reinit text='A SERBIAN FILM', [leave] drawtext reinit text='';
This is my eureka moment I want to share with anyone who has lost a good amount of hair trying to figure out how to burn-in those d*mn subtitles.
This tiny app (absolutely free) for Windows is about 641 kb (includes the CLI executable, a GUI, and source code) and you can download it here:
updated: 2014.05.26
http://www.mediafire.com/download/3is5jc5v851h274/srtdrawtext_2014. 05.26.zip
An easier-to-use version that works in conjunction with VidProk (included in 'En Masse' which is also absolutely free) can be downloaded here: http://enmassevideo.blogspot.com/2014/02/en-masse-batch-processor-for-videos.html
Update 2014.05.26:
Yeah, I made a boo-boo... I didn't bother googling SubRip specifications prior to coding with a handful of SubRip files as samples (hehehe oops!).
No comments:
Post a Comment