Use and Examples
<< Click to Display Table of Contents >> Navigation: Batch conversions and automation > Command Line Conversion Tool > Use and Examples |
Conversion of files with two subtitle tracks
EZConvert's command line conversion tool supports conversion of files with two subtitle tracks, but in order to properly handle them, please make sure that the DetectSecondSubtitlesTrack attribute in the config.file is enabled in the [General] section:
DetectSecondSubtitlesTrack=1
as well as that the selected subtitles output format supports such subtitles as well.
As we already mentioned Command Line conversion tool is able to create conversion log file by using the -l switch from the command line:
ezc6c -c sample_config.cfg -i PAC -o EBU c:\test\ezcc\exmp1.pac c:\test\ezcc\@.stl -l c:\test\ezcc\log.txt
This, however, may not be sufficient when EZConvert needs to be integrated in a more complex workflows or it becomes essential to immediately identify if a conversion has been successfully completed or not. Below is additional information intended to the system administrators who may need to automate the process by running advanced scripts or additional programs to effectively detect the outcome of each individual file conversion.
EZConvert, like every other Windows application, will output exit code when executes the conversion. Exit Code is "0" if the conversion has been successful and "1" when it has failed. Respectively, the command line application will also output results to the STDOUT and STDERR streams. All warnings are output directly to STDOUT, while all error messages are send to STDERR.
Please mind that if a conversion has been successfully completed it may still be beneficial to verify there were no warnings send to STDOUT as they usually indicate potential issues.
Sometimes, getting results from the STDOUT in plain text might not be beneficial, for example when using the -detailedCheck parameter to get list of all errors found for each subtitle in the file. Whenever this is required, the -print parameter can be used to change the output format for the STDOUT stream.
For example, running the following command:
ezc6c -c sample_config.cfg -recongize "C:\Test\Test File.xml" -fileDetails -print XML
will produce nicely structured XML:
<?xml version="1.0" encoding="UTF-8"?>
<EZConvert version="6.0.1">
<exitcode>0</exitcode>
<initialization/>
<file name="C:\Test\Test File.dfxp" inputFormat="NFLX_TT">
<read time="23.08.2020 10:12:33"/>
<details>
<Title/>
<Lang>en</Lang>
<frameRate>29.97 fps</frameRate>
<MediaStartTC/>
<ttp-frameRate>30</ttp-frameRate>
<ttp-frameRateMultiplier>1000 1001</ttp-frameRateMultiplier>
<ttp-timeBase>smpte</ttp-timeBase>
<ttp-dropMode>dropNTSC</ttp-dropMode>
<FirstInCue>00:00:07:15</FirstInCue>
<LastOutCue>00:01:11:24</LastOutCue>
<SubtitlesCount>31</SubtitlesCount>
<SubtitlesWithoutText>0</SubtitlesWithoutText>
<SubtitlesWithoutTC>0</SubtitlesWithoutTC>
<HiddenSubtitles>0</HiddenSubtitles>
</details>
</file>
</EZConvert>
Custom Text Export using the Command Line
If you wish to export a file with a custom layout of the subtitles using the Command Line tool you need to define a Template using the Custom Text Export option and save it.
Then on the Command line you need to use the -t parameter and to specify the exact path to the template file. For example:
ezc6c -c sample_config.cfg -i PAC -o CUSTOM_TXT -t C:\ezcc\template.txt c:\ezcc\PAC_file.pac c:\ezcc\Custom_txt.txt
Examples
You need to start the command line and then go to the EZConvert installation folder which by default is:
cd c:\program files\ezconvert
Then you can start the EZConvert command line version.
In the following example EZConvert will import PAC file and will export it to EBU (.stl):
ezc6c -c sample_config.cfg -i PAC -o EBU c:\test\ezcc\exmp1.pac c:\test\ezcc\exmp1.stl
ezc6c -c sample_config.cfg -i PAC -o EBU c:\test\ezcc\exmp1.pac c:\test\ezcc\@.stl
ezc6c -c sample_config.cfg -i PAC -r 30d/29.97 -o EBU c:\test\ezcc\exmp2.pac c:\test\ezcc\exmp2.stl
The output result of the second example is again exmp1.stl file, but using the '@' character the program will automatically export it using the input file name.
The third example illustrates how a conversion of the frame rate shall be executed.