1

This is somewhat related to Play subtitles automatically with mpv

I am running mpv 0.26.0-3 and trying for the media file to load subtitles but is failing although mediainfo shows that there is en/utf-8 text file for about 80 KB . The media file is in mkv format -

Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 699 MiB
Duration                                 : 2 h 15 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 723 kb/s
Movie name                               : TamilRockers.com 
Encoded date                             : UTC 2017-10-11 11:55:33
Writing application                      : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
Writing library                          : libebml v1.3.1 + libmatroska v1.4.2

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2 h 15 min
Bit rate mode                            : Variable
Bit rate                                 : 627 kb/s
Maximum bit rate                         : 40.0 Mb/s
Width                                    : 640 pixels
Height                                   : 272 pixels
Display aspect ratio                     : 2.35:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.150
Stream size                              : 606 MiB (87%)
Writing library                          : x264 core 142 r2431 ac76440
Encoding settings                        : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=3 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=1 / weightp=1 / keyint=24 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=24 / rc=2pass / mbtree=1 / bitrate=627 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=40000 / vbv_bufsize=30000 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : HE-AAC / LC
Format settings                          : Explicit
Codec ID                                 : A_AAC-2
Duration                                 : 2 h 15 min
Bit rate                                 : 93.8 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz / 24.0 kHz
Frame rate                               : 23.438 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : 31 ms
Stream size                              : 90.7 MiB (13%)
Default                                  : Yes
Forced                                   : No

Text
ID                                       : 3
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 2 h 9 min
Bit rate                                 : 78 b/s
Count of elements                        : 2491
Stream size                              : 74.3 KiB (0%)
Default                                  : No
Forced                                   : No

Menu
00:00:00.000                             : en:Chapter 01
00:02:05.267                             : en:Chapter 02
00:05:09.367                             : en:Chapter 03
00:10:03.400                             : en:Chapter 04
00:22:55.734                             : en:Chapter 05
00:34:40.668                             : en:Chapter 06
00:44:35.035                             : en:Chapter 07
00:58:14.802                             : en:Chapter 08
01:10:22.502                             : en:Chapter 09
01:14:09.669                             : en:Chapter 10
01:22:36.236                             : en:Chapter 11
01:30:17.736                             : en:Chapter 12
01:35:45.570                             : en:Chapter 13
01:41:16.837                             : en:Chapter 14
01:56:03.705                             : en:Chapter 15
01:59:13.306                             : en:Chapter 16
02:11:47.606                             : en:Chapter 17

I have not shared the hash or the filename for privacy reasons. but as can be seen there is this -

Text
    ID                                       : 3
    Format                                   : UTF-8
    Codec ID                                 : S_TEXT/UTF8
    Codec ID/Info                            : UTF-8 Plain Text
    Duration                                 : 2 h 9 min
    Bit rate                                 : 78 b/s
    Count of elements                        : 2491
    Stream size                              : 74.3 KiB (0%)
    Default                                  : No
    Forced                                   : No

This is how my ~/.mpv/config is set up.

┌─[shirish@debian] - [~/.mpv] - [10033]
└─[$] cat config                                                                                                                     
     1  # Write your default config options here!
     2  alang=eng,en,english,hin,hindi
     3  slang=en,eng,english
     4  sub-scale=1.25

I tried to toggle v while the media was playing but with no success. There are no subs. Toggling v says -

a. Subtitles hidden b. subtitles visble (but no subtitles selected)

How do I get out of this quagmire ?

1

the answer is -

either adding --sid=1 or --sid=2 depending if there are one or more subtitles internally. the two flags are also convenient if you have an internal subtitle and an external subtitle and want to choose between the two as well.

0

Rename the subtitle file to the exact same name as the media file, except the extension. So if the files are:

foo_s01e01_xvid.mkv
foo.srt

Run mv foo.srt foo_s01e01_xvid.srt. After that run mpv foo_s01e01_xvid.mkv.

  • There is no separate .srt . The subtitles are embedded. Anyways I got the answer. – shirish Oct 19 '17 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.