get_CaptionTracks()
IVideoFrame::get_CaptionTracks() method
Returns the closed captions collection of the video. Read-only ICaptionsCollection.
virtual System::SharedPtr<ICaptionsCollection> Aspose::Slides::IVideoFrame::get_CaptionTracks()=0
Remarks
Example:
System::SharedPtr<Presentation> pres = System::MakeObject<Presentation>(u"video with captions.pptx");
for (auto&& shape : pres->get_Slide(0)->get_Shapes())
{
System::SharedPtr<IVideoFrame> videoFrame = System::AsCast<IVideoFrame>(shape);
if (videoFrame != nullptr)
{
continue;
}
for (auto&& captionTrack : videoFrame->get_CaptionTracks())
{
// Extracts the captions binary data and saves them to the file
System::IO::File::WriteAllBytes(System::Convert::ToString(captionTrack->get_CaptionId()) + u".vtt", captionTrack->get_BinaryData());
}
}
See Also
- Typedef SharedPtr
- Class ICaptionsCollection
- Class IVideoFrame
- Namespace Aspose::Slides
- Library Aspose.Slides