Usage of external files with CC data
By default, if a file contains a Closed Captions data the data is decoded automatically and it can be used for preview or for output to a device.
Also, SCC and ANC files captured with MFWriter or MWriter objects are used by default as sources of CC data when you playback the video file.
For example, you have 3 files located in the same folder:
- A captured video file, e.g. myVideo.mp4
- An SCC file with EIA-608 data, myVideo.scc
- An ANC file with CEA-708 data, myVideo.anc
When you play myVideo.mp4, data from SCC and ANC files is used automatically.
If you have an SCC, MCC, or ANC file and you need to use this file with your video file to have Closed Captions on output, you can specify "force_cc_file" property with a path to the required file. You can specify it the moment you initialize a file or through the PropsSet method:
m_objMFReader.ReaderOpen(_filename, @"force_cc_file='c:\myCustomCCFile.scc'"); (m_objMFReader as IMProps) .PropsSet("force_cc_file", @"c:\myCustomCCFile.scc");
myFile.FileNameSet(_filename, @"force_cc_file='c:\myCustomCCFile.scc'"); (myFile as IMProps) .PropsSet("force_cc_file", @"c:\myCustomCCFile.scc");
If you use a file as an item in an MPlaylist or as a stream in an MMixer object, then you should add "file::" prefix to the property:
(myStream as IMProps).PropsSet("file::force_cc_file", @"c:\myCustomCCFile.scc");