I have an MKV and i want to add hard subtitles with a 'black box' background. Unfortunately, i can't find out how to do this despite some hours reading about the various plugins. Can anyone please tell me how to write an appropriate script?
As a corollary, after i gave up trying to encode the subs with avisynth, i used a simple script to open the MKV in virtualdub and used the textsub filter to achieve what i wanted to do. However, although the preview looked fine, the resulting avi (which took around 11 hours!) won't play in any media player. And if i try to open it in mkvmerge, i get 'the input file does not contain any tracks'. Mediainfo shows just a video file whether i convert the audio to lame mp3 or check the 'no audio' option. Any ideas what is happening here?
Thanks
+ Reply to Thread
Results 1 to 9 of 9
-
-
I was never able to get subs working at all in AviSynth and frankly it was just easier to give up and use Xvid4PSP instead, which I could get working. I was trying to use a non-Latin character set though and that might have been part of my problem.
You might want to post your AviSynth script here so people can check it. I'm not a real fan of using virtualdub for encoding (not because it sucks, but because it's complex and slow). You might also want to post your Mediainfo information here in case that helps people to figure out what you did wrong. I've used virtualdub a few times in the past and if I remember correctly, it was quite difficult for me to get audio encoding working with it. I think I just had it generate a video file only and took care of the audio with another program. -
Using Textsub is also how you hardsub with an AviSynth script, so apparently you didn't do that. Load the VSFilter and then use TextSub something like this:
TextSub("Movie.ssa")
Unless I'm misunderstanding you and what you're trying to do. By 'black box' do you mean one of those ugly rectangles around the subs? If so, why? With just a 2 pixel black outline they'll easily be read no matter what is showing in the background.
-
I've used avisynth for hardcoding subtitles before: a simple
TextSub("subs.srt", 1)
did the trick. But i didn't get the ugly rectangles, which are what i need this time (to blank out hard foreign subtitles).
The option is there in the virtualdub filter GUI, (border style > opaque box; outline > width) so i assume a script can be written as manono suggests. But i don't know what the command string (sorry if incorrect nomenclature) is. If i can write the script i'll use megui to encode with x264.
Also, i have no idea why the x264 avis i produced in virtualdub don't work.
(jman98: I think I just had it generate a video file only and took care of the audio with another program.)
That was what i decided to do in virtualdub but the file is unplayable and unopenable in mkvmerge
General
Complete name : film.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 3.69 GiB
Duration : 2h 11mn
Overall bit rate : 4 004 Kbps
Writing library : VirtualDub build 34807/release
Video
ID : 0
Format : AVC
Format/Info : Advanced Video Codec
Codec ID : H264
Duration : 2h 11mn
Bit rate : 3 839 Kbps
Width : 1 280 pixels
Height : 536 pixels
Display aspect ratio : 2.40:1
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bits/(Pixel*Frame) : 0.224
Stream size : 3.54 GiB (96%)Last edited by Bully9; 5th Jun 2013 at 15:34.
-
SSA subs have a way to do it. Convert your SRTs to SSA (SubResynch is one way). Then open them in Notepad and in the Styles section near the top:
[V4 Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style: Style1,Tahoma,60,11842740,8421504,8421504,0,0,0,3,2,0,2,20,20,60,0,0
Change the two numbers to be as shown in boldface. They're 'BorderStyle' and 'Outline'. SSA also allows you to configure the subs any way you like with font, size, colors, positioning, etc. They probably won't cover up all of those previous foreign subs though. Then load the SSA subs into the script using TextSub. To increase the size of the black box around the subs, increase the outline (change the '2' number to 20 or 40 or whatever you like).
Last edited by manono; 5th Jun 2013 at 18:01.
-
Yep, that's sorted the problem. I saw all this stuff when searching various forums yesterday, but not being familiar with ssa subs i could not make any sense of the instructions. Yours are easy to understand. Thanks a bunch.
BTW any idea why virtualdub didn't work? I notice the a/r is not mod16 - could that be it? -
You're welcome.
BTW any idea why virtualdub didn't work? I notice the a/r is not mod16 - could that be it?
I load AviSynth scripts into XviD4PSP and use it to make MP4s with x264 video. -
Yes, i've tried MPC and VLC, and like i said, it won't even load into mkvmerge. AFAIK it has to be an avi if using vitualdub, which is why i only normally use it for xvid encodes.
Not to worry.
I may try XviD4PSP sometime as it seems to be well recommended, but megui seems to work well for me and i know the app - if i can sort out the right avisynth script!
Similar Threads
-
Hardcoding subs problem
By jliggett in forum SubtitleReplies: 3Last Post: 3rd Feb 2011, 18:04 -
hardcoding subs
By zammil in forum SubtitleReplies: 27Last Post: 24th Sep 2010, 04:10 -
help hardcoding subs to mkv
By striker9 in forum SubtitleReplies: 14Last Post: 20th Aug 2010, 06:40 -
Help hardcoding subs to mkv
By striker9 in forum Authoring (DVD)Replies: 1Last Post: 16th Aug 2010, 02:01 -
Hardcoding subs problem?
By elliottpen in forum ffmpegX general discussionReplies: 9Last Post: 22nd Apr 2010, 18:24