You are not logged in.

#1 2008-08-31 23:35:48

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 655

[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)


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#2 2008-09-01 16:38:43

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

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

Is the subtitle file encoded in UTF-8? Otherwise I think the easiest way would be to open them in some editor and save them as UTF-8, unless of course there are too many off them.

I think the track ordering is just counting the files as you input them (the AVI file should probably be counted as two tracks, video+audio). There seems to be a "--track-order" switch that might be worth playing around with otherwise.


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#3 2008-09-01 23:39:42

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 655

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

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

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

Board footer

Powered by FluxBB