Opened 3 years ago

Closed 3 years ago

#2379 closed enhancement (fixed)

Add support for drtic (dtc) subtitles format

Reported by: kreddit Owned by: beastd
Priority: low Component: undetermined
Version: unspecified Severity: minor
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description (last modified by kreddit)

Summary of the bug: Feature request: add support for drtic subtitles (.dtc extension).

% mplayer -v
MPlayer Redxii-SVN-r38151-6.2.0 (x86_64) (C) 2000-2019 MPlayer Team
Using FFmpeg N-94664-g0821bc4eee (2019-08-26 16:09:11 -0700)
Compiled on 2019-08-28 01:29:43 EDT (rev. 1)

Sample subtitles:

Further information can be found here:

Change History (6)

comment:1 by kreddit, 3 years ago

Description: modified (diff)
Priority: normallow
Type: defectenhancement

comment:2 by kreddit, 3 years ago

Severity: blockerminor

comment:3 by reimar, 3 years ago

Just to check, you've tried it?
Because it looks to me like the format is 90% identical to microdvd format, which is supported. Just the time stamps might be off.
Though without a specification it's not possible to really properly support it.

comment:4 by reimar, 3 years ago

Ok, it might need a small adjustment to format autodetection:

Index: sub/subreader.c
===================================================================
--- sub/subreader.c	(Revision 38313)
+++ sub/subreader.c	(Arbeitskopie)
@@ -1159,6 +1159,10 @@
 	if (!stream_read_line (st, line, LINE_LEN, utf16))
 	    return SUB_INVALID;
 
+	// drtic/dtc format starts with [JRT2: line. It is not identical
+	// to microdvd, but very close and we have no spec
+	if (strncmp(line, "[JRT2:", 6) == 0)
+		{*uses_time=0;return SUB_MICRODVD;}
 	if (sscanf (line, "{%d}{%d}", &i, &i)==2)
 		{*uses_time=0;return SUB_MICRODVD;}
 	if (sscanf (line, "{%d}{}", &i)==1)

I can't really test, but it might work with just that.

comment:5 by reimar, 3 years ago

An easier way to test that avoids needing to recompile is to just remove the first line of the subtitles, should have the same effect as my patch

comment:6 by reimar, 3 years ago

Resolution: fixed
Status: newclosed

The patch mentioned above is included in 1.5.
That is not full support but I think it's good enough to close this one, and have specific problems with this limited support reported in new tickets.

Note: See TracTickets for help on using tickets.