CaptionTracks
IVideoFrame.CaptionTracks property
Returns the closed captions collection of the video. Read-only ICaptionsCollection
.
public ICaptionsCollection CaptionTracks { get; }
Examples
Example:
[C#]
using (Presentation pres = new Presentation("video with captions.pptx"))
{
foreach (IShape shape in pres.Slides[0].Shapes)
{
if (!(shape is IVideoFrame videoFrame)) continue;
foreach (var captionTrack in videoFrame.CaptionTracks)
{
// Extracts the captions binary data and saves them to the file
System.IO.File.WriteAllBytes(captionTrack.CaptionId + ".vtt", captionTrack.BinaryData);
}
}
}
See Also
- interface ICaptionsCollection
- interface IVideoFrame
- namespace Aspose.Slides
- assembly Aspose.Slides