Estou surpreso que você não tenha tentado o VirtualDub, que seria a alternativa mais strong. Funciona bem sob o vinho.
Esta questão pertence apenas ao Linux e FreeBSD.
Eu tenho vários soft mbed arquivos anime mkv que eu preciso para hardsub. todos eles estão usando legendas .ass com fontes incorporadas. por exemplo mkvinfo em um deles me dá:
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ EBML maximum ID length: 4
|+ (Unknown element: EBMLMaxSizeLength; ID: 0x42f3 size: 4)
|+ Doc type: matroska
|+ Doc type version: 2
|+ Doc type read version: 2
+ Segment, size 622344259
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 4013)
|+ Segment information
| + Timecode scale: 1000000
| + Muxing application: libebml v1.0.0 + libmatroska v1.0.0
| + Writing application: mkvmerge v4.4.0 ('Die Wiederkehr') built on Oct 31 2010 21:52:48
| + Duration: 1384.853s (00:23:04.853)
| + Date: Sat Jun 18 05:53:42 2011 UTC
| + Segment UID: 0xb4 0x1e 0xa7 0x16 0x2e 0xe2 0x35 0x46 0x9b 0xb6 0x7c 0x35 0x18 0x69 0x84 0xc6
|+ Segment tracks
| + A track
| + Track number: 1
| + Track UID: 1
| + Track type: video
| + Lacing flag: 0
| + MinCache: 1
| + Codec ID: V_MPEG4/ISO/AVC
| + CodecPrivate, length 42
| + Default duration: 41.708ms (23.976 fps for a video track)
| + Language: jpn
| + Name: Cee - 10
| + Video track
| + Pixel width: 1280
| + Pixel height: 720
| + Display width: 1280
| + Display height: 720
| + A track
| + Track number: 2
| + Track UID: 952275621
| + Track type: audio
| + Codec ID: A_AAC
| + CodecPrivate, length 2
| + Default duration: 21.333ms (46.875 fps for a video track)
| + Language: jpn
| + Name: AAC 2.0
| + Audio track
| + Sampling frequency: 48000
| + Channels: 2
| + A track
| + Track number: 3
| + Track UID: 608595611
| + Track type: subtitles
| + Lacing flag: 0
| + Codec ID: S_TEXT/ASS
| + CodecPrivate, length 2214
| + Name: ass
|+ EbmlVoid (size: 1120)
|+ Attachments
| + Attached
| + File name: Helvetica CE Regular.ttf
| + Mime type: application/x-truetype-font
| + File data, size: 52412
| + File UID: 3055405240
| + Attached
| + File name: l_10646.ttf
| + Mime type: application/x-truetype-font
| + File data, size: 325400
| + File UID: 1366813323
| + Attached
| + File name: PURIB10.TTF
| + Mime type: application/x-truetype-font
| + File data, size: 23232
| + File UID: 1837754524
| + Attached
| + File name: TIMESS_.ttf
| + Mime type: application/x-truetype-font
| + File data, size: 253852
| + File UID: 1030865051
| + Attached
| + File name: aeaswfte.ttf
| + Mime type: application/x-truetype-font
| + File data, size: 46900
| + File UID: 3926331521
| + Attached
| + File name: arialbd.ttf
| + Mime type: application/x-truetype-font
| + File data, size: 751104
| + File UID: 2840438428
| + Attached
| + File name: GaramondPremrPro.otf
| + Mime type: application/x-truetype-font
| + File data, size: 359040
| + File UID: 2335914165
| + Attached
| + File name: l_10646.ttf
| + Mime type: application/x-truetype-font
| + File data, size: 325400
| + File UID: 3148854668
| + Attached
| + File name: arial.ttf
| + Mime type: application/x-truetype-font
| + File data, size: 772192
| + File UID: 488371860
| + Attached
| + File name: PURIB10.TTF
| + Mime type: application/x-truetype-font
| + File data, size: 23232
| + File UID: 1014572700
| + Attached
| + File name: PURIBI10.TTF
| + Mime type: application/x-truetype-font
| + File data, size: 24696
| + File UID: 400339132
| + Attached
| + File name: subpear.ttf
| + Mime type: application/x-truetype-font
| + File data, size: 75704
| + File UID: 3123006086
| + Attached
| + File name: Syntax.otf
| + Mime type: application/x-truetype-font
| + File data, size: 21700
| + File UID: 3519688351
| + Attached
| + File name: TIMESS__.ttf
| + Mime type: application/x-truetype-font
| + File data, size: 253852
| + File UID: 2672448677
| + Attached
| + File name: aeaswfte.ttf
| + Mime type: application/x-truetype-font
| + File data, size: 46900
| + File UID: 3495655056
| + Attached
| + File name: curswfte.ttf
| + Mime type: application/x-truetype-font
| + File data, size: 50696
| + File UID: 2317778051
| + Attached
| + File name: PURI10.TTF
| + Mime type: application/x-truetype-font
| + File data, size: 23492
| + File UID: 239740086
|+ Chapters
| + EditionEntry
| + EditionFlagHidden: 0
| + EditionFlagDefault: 0
| + EditionUID: 721729707
| + ChapterAtom
| + ChapterUID: 3979152268
| + ChapterTimeStart: 00:00:00.000000000
| + ChapterFlagHidden: 0
| + ChapterFlagEnabled: 1
| + ChapterDisplay
| + ChapterString: EVERYONE IS GETTING HACKED
| + ChapterLanguage: eng
| + ChapterAtom
| + ChapterUID: 540927916
| + ChapterTimeStart: 00:01:11.071000000
| + ChapterFlagHidden: 0
| + ChapterFlagEnabled: 1
| + ChapterDisplay
| + ChapterString: then again
| + ChapterLanguage: eng
| + ChapterAtom
| + ChapterUID: 68503466
| + ChapterTimeStart: 00:02:40.994000000
| + ChapterFlagHidden: 0
| + ChapterFlagEnabled: 1
| + ChapterDisplay
| + ChapterString: it can't be helped.
| + ChapterLanguage: eng
| + ChapterAtom
| + ChapterUID: 1400111522
| + ChapterTimeStart: 00:14:31.954000000
| + ChapterFlagHidden: 0
| + ChapterFlagEnabled: 1
| + ChapterDisplay
| + ChapterString: ICE CREAM
| + ChapterLanguage: eng
| + ChapterAtom
| + ChapterUID: 1320654241
| + ChapterTimeStart: 00:14:46.969000000
| + ChapterFlagHidden: 0
| + ChapterFlagEnabled: 1
| + ChapterDisplay
| + ChapterString: animu
| + ChapterLanguage: eng
| + ChapterAtom
| + ChapterUID: 1532255160
| + ChapterTimeStart: 00:21:35.502000000
| + ChapterFlagHidden: 0
| + ChapterFlagEnabled: 1
| + ChapterDisplay
| + ChapterString: money never sleeps, kid!
| + ChapterLanguage: eng
|+ EbmlVoid (size: 101)
|+ Cluster
como você pode ver, existem muitas fontes incorporadas que são usadas neste mkv. Eu gastei 8 horas até agora tentando descobrir como fazer com que o mencoder codifique corretamente este arquivo para um avi que tenha as fontes incorporadas usadas no fluxo de vídeo. Mesmo que eu tenha extraído as fontes usando mkvextract, copiei-as para o meu diretório ~ / .fonts, e fc-cache -v ~ / .fonts para fontconfig, o melhor que posso obter é que o mencoder crie um arquivo usando a sub fonte default do mencoder .
Eu sei que deve haver uma maneira de fazer isso.
Eu preferiria uma resposta que usasse apenas ferramentas cli. Também prefiro evitar o avidemux como a praga, uma vez que ele gosta de travar ao lidar com subs .ass [apesar de qualquer sugestão ser bem-vinda].
Estou surpreso que você não tenha tentado o VirtualDub, que seria a alternativa mais strong. Funciona bem sob o vinho.
Você pode usar ffmpeg
para anexar arquivos a um arquivo mkv. Um exemplo do manual do ffmpeg:
ffmpeg -i INPUT -attach DejaVuSans.ttf -metadata:s:2 mimetype=application/x-truetype-font out.mkv
IMO, ffmpeg
(atualmente estou na versão 2.0.1 no FreeBSD de /usr/ports/multimedia/ffmpeg2/
) é um bom substituto para o mencoder.