[SOLVED] mkvmerge. making mkv's from avis and non-english srt files

hi! im converting all my huge amount of .avi's to .mkv's with mkvmerge, but i found that with non-english characters, mkvmerge make wrong subtitles in the resulting mkv file, all letters such as á,é,í,ó,ú,ñ and ¿/¡ results in the subtitle not displaying correctly, any advice?
i think i need some sort of "Options that only apply to text subtitle tracks: --sub-charset <TID:charset>" but don't know how to implement it in the cli
i only do a "mkvmerge -v -o mkvfile avifile srtfile"
Last edited by leo2501 (2008-09-01 23:40:53)

well i come around with this bash script
avi2mkv:
#!/bin/bash
INPUT=$(basename $1 .avi)
SRT=$(ls | grep $INPUT.srt)
SUB=$(ls | grep $INPUT.sub)
SSA=$(ls | grep $INPUT.ssa)
if [ "$SRT" != "" ]; then
# mkvmerge -v -o $INPUT.mkv $1 $INPUT.srt
mkvmerge -v -o $INPUT.mkv $1 --sub-charset 0:UTF8 -s 0 -D -A $INPUT.srt
# mkvmerge -v -o $INPUT.mkv $1 $INPUT.eng.srt --sub-charset 0:UTF8 -s 0 -D -A $INPUT.spa.srt
elif [ "$SUB" != "" ]; then
mkvmerge -v -o $INPUT.mkv $1 $INPUT.sub
elif [ "$SSA" != "" ]; then
mkvmerge -v -o $INPUT.mkv $1 $INPUT.ssa
else
mkvmerge -v -o $INPUT.mkv $1
fi

Similar Messages

  • How to extract keyframe from AVI and MPG

    Hi guy,
    I'm Marco and I'm using JMF; I need for an help because I don't know how to extract keyframes from AVI and MPG files.
    I'm using the code posted in this forum for extracting all frame in a video with the adding of an if expression that in the accessFrame method that I report below:
    void accessFrame(Buffer frame) {
    BufferToImage stopBuffer = new BufferToImage((VideoFormat) frame.getFormat());
    Image stopImage = stopBuffer.createImage(frame);
    try {
    BufferedImage outImage = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
    Graphics og = outImage.getGraphics();
    og.drawImage(stopImage, 0, 0, size.width, size.height, null);
    Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
    ImageWriter writer = (ImageWriter) writers.next();
    File f = new File(frame.getSequenceNumber() + ".jpg");
    {color:#ff0000}
    if ((frame.getFlags() & Buffer.FLAG_KEY_FRAME) != 0){{color}
    {color:#ff9900}
    ImageOutputStream ios = ImageIO.createImageOutputStream(f);
    writer.setOutput(ios);
    {color}
    {color:#ff9900}
    writer.write(outImage);
    ios.close();}
    } catch (IOException e) {{color}
    System.out.println("Error :" + e);
    So, I'm able to extract some keyframe, but i'm not sure it is the correct way and my dubt grows out of the fact that without the if expression highlighted in red, it seems that I have more keyframes (those ones with flag ==1040). Another problem is that it works only with AVI because MPG instead of 1040, they have alternate sequence of 32 and 1056.
    Cheers and thank u
    Marco

    my email-id is [email protected].. anyone plz send me the codings for extracting all the frames from a video..

  • I somehow changed a video in my imovie to zero fps, so it just plays black.  The video still exists on my desktop but even when I delete the files from imovie and reimport them the file is still in zero fps and play black.

    somehow changed a video in my imovie to zero fps, so it just plays black.  The video still exists on my desktop but even when I delete the files from imovie and reimport them the file is still in zero fps and play black.

    I'm not sure of your question.
    Are you asking how to use Photoshop?
    Or are you asking for the dimensions of video iMovie uses?
    It edits in 720P HD, which is 1280x720.
    You can make it a bit bigger so you can zoom in.
    Much bigger then this is a waste of time.

  • HT1660 when deleting music files from iTunes and you select Keep File, where is that file stored and how it is retireved?

    when deleting music files from iTunes and you select Keep File, where is that file stored and how it is retrieved?

    The file is just left where it was when it was connected to the library. Typically:
         <User>/Music/iTunes/iTunes Media/Music/<Artist>/<Album>/## <Name>.<Ext>
    If you want to add it back just drag it into iTunes. If you want to cull the files you kept previously add the entire iTunes Media folder back into iTunes (or use one of Doug's scripts that has the same effect), then delete (and don't keep) the recent additions.
    Note that warning/prompt is only issued when the files you are removing are located inside the designated iTunes Media folder.
    tt2

  • How can the symbol and non-English diacritical marking, etc accessed with combinations of letters and functional keys prior to Snow Leopard be achieved in Snow Leopard?

    How can the symbol and non-English diacritical marking/punctuation pallet, available in pre-Snow Leopard OSes with various combinations of letter or number keys and functional keys, be accessed in Snow Leopard?  Those pre-Snow Leopard versions worked on the fly as one was making text in any pedestrian application and its native font (Mail, Text Edit, for example).  One didn't need to dig around in font libraries, change font preferences, etc.

    > One didn't need to dig around in font libraries, change font
    > preferences, etc.
    It hasn't worked like that since the Early Chalcolithic (ie, System 7 or thereabouts).
    You've already got plenty of answers. Briefly (and grossly oversimplified),
    - Mac OS X conforms to a standard known as Unicode; in its current incarnation, it defines over 100k characters.
    - A keypress is translated into a character according to the current keyboard layout.
    - The graphic representation of a character (ie, glyph), is provided by the current font.
    - If a font lacks a glyph for the requested character, either another font will be automatically chosen (Mac OS X text engine), or some form of feedback (empty box, question mark, etc) will be used.
    - To inspect the actual key codes, use a utility such as Key Codes.
    - To inspect the current keyboard layout, invoke Keyboard Viewer.
    - To inspect the full complement of glyphs of a font, invoke Character Viewer (also accessed with the Special Characters command).
    (Remember that both these utilities are resizable and zoomable -- you can enlarge them to a comfortable viewing size, then zoom out to see more of the screen for your original task.)
    - For a more detailed look, use a utility such as UnicodeChecker.
    - The default keyboard layout depends on your Mac OS X localisation.
    (Keep in mind that there's no need to stick with the default layout; choose whichever one makes sense to you, given your language, habits, and proclivities. Mac OS X comes bundled with quite a few, including some obviously designed for the huddled masses of refugees from the Dark Side, who, in their wretched ignorance, have the unmitigated gall of labelling our native ways "really uncomfortable". Oh well, this, too, shall pass.
    If none of the supplied keyboard layouts fits your needs -- if, for instance, you write your emails in Etruscan -- go out on the 'net, you'll find quite a few. Or write your own with Ukulele, it's not really all that difficult.)
    - Use Keyboard Viewer to familiarise yourself with the current layout and to enter the odd character; but, to be proficient, you should learn your layout to the point that KV is no longer needed.
    - Use Character Viewer to enter the odd character not available in the current keyboard layout.
    Neither Keyboard Viewer nor Character Viewer are effective tools for more extensive needs, eg, for writing and editing bilingual or multilingual texts. In such a case, you should enable the respective keyboard layouts and switch between them with a keyboard shortcut.
    A few interesting layouts bundled with Mac OS X have already been mentioned. Let me add three.
    - Dvorak: several layouts based on the Dvorak keyboard. It is claimed that the latter is more productive and lessens RSI risk.
    - US Extended: based on QWERTY, it offers a more extensive set of diacritics (eg, caron, breve) via dead keys.
    - Unicode Hex Input: also based QWERTY, it allows input by Unicode codepoint (in hexadecimal), so it's the most extensive layout of all; eg, to enter the character "Parenthesized Number Twelve" (U+247F), hold down Option, type "247f", release Option.

  • How can build help file for right to left and non english language

    hi erverybody, i have a big problem ,please help me
    i creat a c# appliction with vs.net2005 and i want to write
    help file for it .i need a software to creat help file for non
    english language(such as persian or arabic) and right to left
    support . i tried many helpware chm builder tools but each of them
    made a problem .i dont know what to do .what is the best solution
    for creating help files for right to left and non english languages
    how can i build my help file with f1 helping ability .thank u
    so much
    Text

    Hi Mr_Sia and welcome to the RH community.
    You could try looking at the HAT Matrix. This is a comparison
    of all the help tools around. Click
    here to go to it.
    RoboHelp itself, whilst it does support over 35 different languages
    does not support Persian or Arabic.

  • Lion OS and Non-English langugae

    Hi There,
    I have some issues with Lion OS and non-english language like arabic. for instance when I want to go through some websitel like مهاجرت به کانادا and کانادا مهاجرت and مهاجرت کانادا and اقامت کانادا I run into some messy words and when I check with snow leopard, every thing work perfectely. How can I figure that out?
    Thank you

    Could you send me a screen shot of what you mean by "messy words"?
    If you are using Safari, do you have the same problem with FireFox?

  • I have logged in to my itunes account on a different pc and none of my files are on there

    Hello
    I have logged in to my itunes account on a different pc and none of my files are on there. Please help!

    Hello Rosie, see if these help...
    http://support.apple.com/kb/ht4627
    http://support.apple.com/kb/ht1203

  • Firefox will not open on startup and takes over system resorces. Uninstalled. When attempting to reinstall, installer will not run from website, and can not save file to HD. No error message, it just never appears.

    After a system reboot, Firefox would not open. I opened the task manager, and saw that Firefox was using alot of memory, and was using 50% of the CPU. I ended the process, and restarted. The situation just repeated several time.
    I uninstalled Firefox using uninstall programs from the control panel.
    I then tried to run the Firefox installer from the website, it would open the download window, then the "run the install" window. After clicking "Run", the window just closes. So I attempted to just download the install file, and clicked "Save". I tried to save the file to several different locations. A download window would open, and run, but the file would not be there.
    I was running 3.6.12, the current version. And that is was I tried to install. After that failed, I also tried to install the beta 4, with the same results.
    No error messages have opened, and I have run scans for malware/spyware, and didn't see anything that jumped out as a problem. I am running Win Explorer right now. And it is running fine, but I much prefer my Firefox.

    After a system reboot, Firefox would not open. I opened the task manager, and saw that Firefox was using alot of memory, and was using 50% of the CPU. I ended the process, and restarted. The situation just repeated several time.
    I uninstalled Firefox using uninstall programs from the control panel.
    I then tried to run the Firefox installer from the website, it would open the download window, then the "run the install" window. After clicking "Run", the window just closes. So I attempted to just download the install file, and clicked "Save". I tried to save the file to several different locations. A download window would open, and run, but the file would not be there.
    I was running 3.6.12, the current version. And that is was I tried to install. After that failed, I also tried to install the beta 4, with the same results.
    No error messages have opened, and I have run scans for malware/spyware, and didn't see anything that jumped out as a problem. I am running Win Explorer right now. And it is running fine, but I much prefer my Firefox.

  • Problem with Vcard and non-English character

    VCard feature is what I would like to use, but I have quite a few contacts with Non-English name (Korean).
    I know Ipod can display in Korean, but when I create a v-card with Korean character and copy the vcard file over into /contacts folder, I can see the filename as the person's name (From windows explorer), but I can ONLY see first character of the file when I display contacts in iPod.
    Does anyone have tips/tricks on displaying all the filename in IPod contacts?
    Thanks.
      Windows XP Pro  

    Because i use the string nota into a jsp page and i print the string nota into a textarea and the text is with no newline, example:
    <textarea name="nota" rows="4" cols="60"><%= nota %></textarea>
    the text into textarea is:
    first linesecond linethird line
    but i want that the text displayed into textarea is equal the text into the CDATA section:
    first line
    second line
    third line

  • Cfimage and non-english characters

    I've been googling for hours and just can not find anything
    related to this, very strange, I am trying to use ImageDrawText
    draw Chinese onto an image but could never get it to work, tried so
    many things, setting the page encoding to UTF-8, cfcontent,
    setEncoding etc., it displays the Chinese fine on the page, but
    passing it to the ImageDrawText method, writetobrowser gives me an
    image with all square boxes instead of the chinese characters.
    anyone else having same problem with other non-english
    languages?
    thanks

    edwardch wrote:
    > thanks, tried Arial unicode MS, but unfortunately my
    hosting server doesn't
    > have the font :(, CF gives an error: Unable to find
    font: Serif.
    serif? not sure where that's coming from. can you try "@Arial
    Unicode MS"?
    unfortunately this is image work so you *have* to have a
    unicode capable font
    physically available (unlike PDF/flashpaper where you might
    "poke & hope" that
    the font's on the client & simply not embed the font).
    > Have also tried Lucida Sans Unicode, doesn't work for
    Chinese.
    no it doesn't.
    > and can't find the Arial unicode MS.ttf file, even if I
    have the file, how can
    > I install it using coldfusion codes?
    you can't, either have to add it via windows control panel
    (or whatever for
    linux) or via cfadmin font management. see these for
    potential fonts, etc.
    http://en.wikipedia.org/wiki/Arial_Unicode_MS
    http://en.wikipedia.org/wiki/Free_software_Unicode_typefaces
    http://en.wikipedia.org/wiki/Unicode_typefaces
    http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&cat_id=FontDownloads
    or you might simply ask your host what fonts are on the
    server that can support
    chinese.

  • Cfqueryparam and non-English languages

    Hi,
    I want to store non-English characters in NCHAR NVARCHAR and
    NTEXT field types.
    In the examples below fields LastName and FirstName are
    NVARCHAR type and
    Comments is NTEXT
    In the past when I wanted to store non English (Greek)
    strings or texts in these field types I was writting
    <!-------------->
    <cfquery name="Q" datasource="Db">
    INSERT INTO Books
    ( LastName,
    FirstName,
    Comments )
    VALUES
    ( N '#var_LastName#' ,
    N '#var_FirstName#' ,
    N '#var_Comments#' )
    </cfquery>
    <!-------------->
    Now I want to use the cfqueryparam, so the syntax is
    <!-------------->
    <cfquery name="Q" datasource="Db">
    INSERT INTO Books
    ( LastName,
    FirstName,
    Comments )
    VALUES
    ( <cfqueryparam value="#var_LastName#"
    cfsqltype="CF_SQL_VARCHAR" MaxLength="40">,
    <cfqueryparam value="#var_FirstName#"
    cfsqltype="CF_SQL_VARCHAR" MaxLength="30">,
    <cfqueryparam value="#var_Comments#"
    cfsqltype="CF_SQL_LONGVARCHAR"> )
    </cfquery>
    <!-------------->
    but ...... the non English characters are not stored
    correctly.
    So my question is
    How can I use the cfqueryparam in order to store non English
    characters in NCHAR NVARCHAR and NTEXT field types ???
    The documentation has not any info on that.
    Thank you in advance for your help
    ANX
    Greece

    You didn't say what version of CF you were using.
    Also, which database driver are you using (ODBC or JDBC
    version #)?
    Anyway, it looks like you do not have the unicode support
    turned on. See
    http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entry&entry=F9553D86-20ED-7DEE-2A 913AFD8651643F,
    etc.
    If that doesn't help, post
    sample data that inserts ok without cfparam but not ok with
    cfparam.

  • Reading .txt file and non-english chars

    i added .txt files to my app for translations of text messages
    the problem is when i read the translations, non-english characters are read wrong on my Nokia. In Sun Wireless Toolkit it works.
    See the trouble is because I don't even know what is expected by phone...
    UTF-8, ISO Latin 2 or Windows CP1250?
    im using CLDC1.0 and MIDP1.0
    What's the rigth way to do it?
    here's what i have...
    String locale =System.getProperty("microedition.locale");
    String language = locale.substring(0,2);
    String localefile="lang/"+language+".txt";
    InputStream r= getClass().getResourceAsStream("/lang/"+language+".txt");
    byte[] filetext=new byte[2000];
    int len = 0;
    try {
    len=r.read(filetext);
    then i get translation by
    value = new String(filetext,start, i-start).trim();

    Not sure what the issue is with the runtime. How are you outputing the file and accessing the lists? Here is a more complete sample:
    public class Foo {
         final private List colons = new ArrayList();
         final private List nonColons = new ArrayList();
         static final public void main(final String[] args)
              throws Throwable {
              Foo foo = new Foo();
              foo.input();
              foo.output();
         private void input()
              throws IOException {
             BufferedReader reader = new BufferedReader(new FileReader("/temp/foo.txt"));
             String line = reader.readLine();
             while (line != null) {
                 List target = line.indexOf(":") >= 0 ? colons : nonColons;
                 target.add(line);
                 line = reader.readLine();
             reader.close();
         private void output() {
              System.out.println("Colons:");
              Iterator itorColons = colons.iterator();
              while (itorColons.hasNext()) {
                   String current = (String) itorColons.next();
                   System.out.println(current);
              System.out.println("Non-Colons");
              Iterator itorNonColons = nonColons.iterator();
              while (itorNonColons.hasNext()) {
                   String current = (String) itorNonColons.next();
                   System.out.println(current);
    }The output generated is:
    Colons:
    a:b
    b:c
    Non-Colons
    a
    b
    c
    My guess is that you are iterating through your lists incorrectly. But glad I could help.
    - Saish

  • Flex, xml, and non-English characters

    Hello! I have a Flex web app with AdvancedDataGrid. And I use httpService component to load some data to grid. The .xml file contains non-english characters in attributes (russian in my case) like this:
    <?xml version="1.0" encoding="utf-8" ?>
       <Autoparts>
        <autopart  DESCRIPTION="Барабан">
    </Autoparts>
    And when i run app, AdvancedDataGrid display it like "Ñ&#129;ПÐ". How can i fix it? I try to change encoding="utf-8" with some another charsets, bun unsuccesfully. Thank you.

    Try changing the xml structure by using CDATA instead of having the russian part as an attribute and see if that makes any difference.
    What I meant is use something like this:
    <?xml version="1.0" encoding="utf-8" ?>
       <Autoparts>
        <autopart>
           <description><![CDATA[Барабан]]></description>
      </autopart>
    </Autoparts>
    instead of the current xml.

  • [solved]How can I copy from urxvt and paste in firefox?

    I can't copy anything from urxvt to firefox,but I can copy from firefox to urxvt.
    I use fluxbox,anyone can help me?

    zen_guerrilla wrote:
    Add these lines to your .Xdefaults:
    URxvt*perl-ext: default,mark-urls
    URxvt*urlLauncher: firefox
    and source it with xrdb ~/.Xdefaults. Then double-click on the url on urxvt, press Ctrl and right click the url. Select 'run firefox' and you're good to go.
    ...or you can just middle-click the link and it'll open in firefox.

Maybe you are looking for