Estou tentando usar legendas com um arquivo mkv da seguinte maneira:
mplayer video.mkv
mplayer -sub video.srt video.mkv
mplayer video.mkv -sub video.srt
mas apenas o vídeo foi reproduzido, mas sem legendas. Também pressionei vários botões enquanto reproduzia o vídeo ('j', 'u', 's'), mas sem qualquer alteração.
OS: MacOS 10.13.16
mplayer: 1.3.0-4.2.1
Talvez eu esteja sentindo falta de algo? Ou o mplayer
deve ser compilado de alguma maneira especial e complicada? Ou uma biblioteca está faltando? Ou é porque é um mac?
Existe uma maneira de usar as legendas no arquivo srt com um vídeo mkv com mplayer
?
Eu tentei, conforme sugerido no comentário, definir a configuração como mostrado aqui . Mas recebo o seguinte erro ao reproduzir o arquivo mkv
com o arquivo srt na mesma pasta:
Warning unknown option subfont-text-scale at line 3
Warning unknown option subfont-osd-scale at line 4
The fontconfig option can't be used in a config file.
Error parsing option fontconfig=yes at line 5
As duas primeiras entradas no arquivo srt são as seguintes:
1
00:00:00,000 --> 00:00:05,000
<font face="Hiruko" size="38">Test</font>
2
00:00:05,000 --> 00:00:14,060
<font face="Hiruko" size="38">Subs: English</font>
Conteúdo atual de .mplayer/config
:
# Write your default config options here!
subalign=2
font = "Arial"
subcp = iso8859-1
# Set font.
#font=/home/osmo/.fonts/microsoft-vista/calibri.ttf
# Set font encoding.
subfont-encoding=unicode
# Set subtitle file encoding.
unicode=yes
utf8=yes
Quando reproduzo o arquivo da seguinte forma
mplayer -v video.mkv
o vídeo é reproduzido bem com áudio, mas sem legendas. A saída no console é a seguinte:
Configuration: --cc=clang --host-cc=clang --disable-cdparanoia --prefix=/usr/local/Cellar/mplayer/1.3.0 --disable-x11
CommandLine: '-v' 'video.mkv'
Using Darwin accurate timing
get_path('input.conf') -> '/Users/adietz/.mplayer/input.conf'
Reading optional input config file /Users/adietz/.mplayer/input.conf: No such file or directory
Reading optional input config file /usr/local/Cellar/mplayer/1.3.0/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
Can't init Apple Remote.
get_path('video.mkv.conf') -> '/Users/adietz/.mplayer/video.mkv.conf'
Playing video.mkv.
get_path('sub/') -> '/Users/adietz/.mplayer/sub/'
[file] File size is 745530259 bytes
STREAM: [file] video.mkv
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
libavformat version 57.25.100 (internal)
Configuration: --enable-gpl --enable-postproc
LAVF_check: Matroska / WebM
libavformat file format detected.
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
[matroska,webm @ 0x103b35490]Before avformat_find_stream_info() pos: 5647 bytes read:32768 seeks:0
[h264 @ 0x103b53440]user data:"x264 - core 125 r2200 999b753 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:1:1 analyse=0x3:0x133 me=umh subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=4 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=0 open_gop=0 weightp=2 keyint=240 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00"
[h264 @ 0x103b53440]user data:"x264 - core 125 r2200 999b753 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:1:1 analyse=0x3:0x133 me=umh subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=4 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=0 open_gop=0 weightp=2 keyint=240 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00"
[h264 @ 0x103b53440]no picture
[matroska,webm @ 0x103b35490]All info found
[matroska,webm @ 0x103b35490]After avformat_find_stream_info() pos: 213450 bytes read:229205 seeks:0 frames:12
==> Found video stream: 0
======= VIDEO Format ======
biSize 82
biWidth 1440
biHeight 1080
biPlanes 1
biBitCount 0
biCompression 875967048='H264'
biSizeImage 0
Unknown extra header dump: [1] [64] [0] [28] [ff] [e1] [0] [19] [67] [64] [0] [28] [ac] [d9] [80] [5a] [2] [27] [e5] [c0] [44] [0] [0] [f] [a4] [0] [2] [ee] [2] [3c] [60] [c6] [68] [1] [0] [6] [68] [e9] [70] [6c] [b2] [2c]
===========================
[lavf] stream 0: video (h264), -vid 0
==> Found audio stream: 1
======= WAVE Format =======
Format Tag: 61868 (0xF1AC)
Channels: 2
Samplerate: 48000
avg byte/sec: 0
Block align: 1
bits/sample: 24
cbSize: 34
Unknown extra header dump: [10] [0] [10] [0] [0] [1] [89] [0] [1e] [54] [b] [b8] [3] [70] [4] [6d] [31] [30] [6b] [fc] [52] [fd] [5d] [86] [7e] [6f] [3] [e] [0] [89] [52] [77] [46] [67]
==========================================================================
[lavf] stream 1: audio (flac), -aid 0
LAVF: 1 audio and 1 video streams found
LAVF: build 3742052
VIDEO: [H264] 1440x1080 0bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44 fourcc:0x34363248 size:1440x1080 fps:23.976 ftime:=0.0417
2018-10-16 08:08:13.995 mplayer[62669:997915] *** WARNING: Textured window <NSWindow: 0x7fa16f51f4a0> is getting an implicitly transparent titlebar. This will break when linking against newer SDKs. Use NSWindow's -titlebarAppearsTransparent=YES instead.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 57.24.102 (internal)
Configuration: --enable-gpl --enable-postproc
INFO: libavcodec init OK!
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
encoder: libebml v1.2.3 + libmatroska v1.3.0
creation_time: 2012-09-12 10:05:57
Load subtitles in ./
get_path('sub/') -> '/Users/adietz/.mplayer/sub/'
[file] File size is 43583 bytes
STREAM: [file] ./video.srt
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
SUB: Detected subtitle file format: subviewer
SUB: opened iconv descriptor.
SUB: closed iconv descriptor.
SUB: Read 318 subtitles, 0 bad line(s).
SUB: Adjusted 102 subtitle(s).
SUB: Added subtitle file (1): ./video.srt
Full mplayer
install output:
$ brew install mplayer
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/mplayer-1.3.0.high_sierra.bottle.tar.gz
Already downloaded: /Users/adietz/Library/Caches/Homebrew/downloads/2c54638881d1afb804282a3afa22709af0d3dec157559541892847a555610955--mplayer-1.3.0.high_sierra.bottle.tar.gz
==> Pouring mplayer-1.3.0.high_sierra.bottle.tar.gz