Skip to content

AnalyzeClipClosedCaptions

function

Delphi
function AnalyzeClipClosedCaptions (ClipFileName: string; MaxScanDurationMs: LongInt): LongInt; /// 261106st
C++Builder
System::LongInt __fastcall AnalyzeClipClosedCaptions(System::UnicodeString ClipFileName, System::LongInt MaxScanDurationMs);
C#
public int AnalyzeClipClosedCaptions(string ClipFileName, int MaxScanDurationMs);
VB.NET
Public Function AnalyzeClipClosedCaptions(ClipFileName As String, MaxScanDurationMs As Integer) As Integer
C++/Qt
int AnalyzeClipClosedCaptions (wchar_t *ClipFileName, int MaxScanDurationMs);

Closed captions of a clip: captions of the clip and subtitle file.

Remarks

Returns -1 if the clip cannot be opened, else a combination of the following values (0 = no closed captions):

1: caption data in the SMPTE 436M caption track (MXF)

2: caption data in the video stream (A/53 captions of MPEG-2, H.264, HEVC)

4: caption data in a CEA-608 track (MOV / MP4)

8: subtitle file found and read (see PlayerClosedCaptionsFile; its path is returned by ClipClosedCaptionsFile)

16: caption channel present in the clip, but without caption data in the part of the clip read (the captions may start later)

MaxScanDurationMs: duration of the beginning of the clip that is read, e.g. 10000; the reading stops as soon as the captions are found. 0: subtitle file only (the clip is not opened).

The analysis is done by the Datastead RTSP/RTMP/HTTP/ONVIF DirectShow Source Filter (installed separately), outside of the player: it can be invoked while a clip is playing. The subtitle file is searched as for the playback (PlayerClosedCaptionsFile).