MediaInfoLib
MediaInfoLib copied to clipboard
SCC First / Last Question
For SCC, based on this discussion: https://github.com/MediaArea/MediaInfoLib/issues/2112 are TimeCode_FirstFrame and TimeCode_LastFrame supposed to be based on command start / end? The value is 1 frame past the command end.
Additionally, should we use Duration_Start_String4 and Duration_End_String4 to determine the actual text contents and Duration_Start_Command_String4 to make sure we don’t have any contents that are cut off on the start. With this sample while the command starts at 00:59:29:22, the text command doesn’t start until 01:00:04:13. Is it possible to identify the first command that has “contents” that would be displayed so we can accurately compare it to the start of composition?
<?xml version="1.0" encoding="UTF-8"?>
<MediaInfo
xmlns=https://mediaarea.net/mediainfo
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=[https://mediaarea.net/mediainfo https://mediaarea.net/mediainfo/mediainfo_2_0.xsd](https://mediaarea.net/mediainfo%20https:/mediaarea.net/mediainfo/mediainfo_2_0.xsd)
version="2.0">
<creatingLibrary version="24.06.20240920" url=https://mediaarea.net/MediaInfo>MediaInfoLib</creatingLibrary>
<media ref="file.scc">
<track type="General">
<Count>349</Count>
<StreamCount>1</StreamCount>
<StreamKind>General</StreamKind>
<StreamKind_String>General</StreamKind_String>
<StreamKindID>0</StreamKindID>
<TextCount>1</TextCount>
<Text_Format_List>EIA-608</Text_Format_List>
<Text_Format_WithHint_List>EIA-608</Text_Format_WithHint_List>
<Text_Codec_List>EIA-608</Text_Codec_List>
<CompleteName></CompleteName>
<FolderName>/Users/jsciame/Downloads</FolderName>
<FileNameExtension></FileNameExtension>
<FileName></FileName>
<FileExtension>scc</FileExtension>
<Format>SCC</Format>
<Format_String>SCC</Format_String>
<Format_Extensions>scc sc2</Format_Extensions>
<Format_Commercial>SCC</Format_Commercial>
<FileSize>93073</FileSize>
<FileSize_String>90.9 KiB</FileSize_String>
<FileSize_String1>91 KiB</FileSize_String1>
<FileSize_String2>91 KiB</FileSize_String2>
<FileSize_String3>90.9 KiB</FileSize_String3>
<FileSize_String4>90.89 KiB</FileSize_String4>
<Duration>1818.183</Duration>
<Duration_String>30 min 18 s</Duration_String>
<Duration_String1>30 min 18 s 183 ms</Duration_String1>
<Duration_String2>30 min 18 s</Duration_String2>
<Duration_String3>00:30:18.183</Duration_String3>
<Duration_String5>00:30:18.183</Duration_String5>
<OverallBitRate_Mode>CBR</OverallBitRate_Mode>
<OverallBitRate_Mode_String>Constant</OverallBitRate_Mode_String>
<OverallBitRate>410</OverallBitRate>
<OverallBitRate_String>410 b/s</OverallBitRate_String>
<StreamSize>93073</StreamSize>
<StreamSize_String>90.9 KiB (100%)</StreamSize_String>
<StreamSize_String1>91 KiB</StreamSize_String1>
<StreamSize_String2>91 KiB</StreamSize_String2>
<StreamSize_String3>90.9 KiB</StreamSize_String3>
<StreamSize_String4>90.89 KiB</StreamSize_String4>
<StreamSize_String5>90.9 KiB (100%)</StreamSize_String5>
<StreamSize_Proportion>1.00000</StreamSize_Proportion>
<File_Created_Date>2024-10-17 19:39:14 UTC</File_Created_Date>
<File_Created_Date_Local>2024-10-17 15:39:14</File_Created_Date_Local>
<File_Modified_Date>2024-10-17 19:39:14 UTC</File_Modified_Date>
<File_Modified_Date_Local>2024-10-17 15:39:14</File_Modified_Date_Local>
</track>
<track type="Text">
<Count>306</Count>
<StreamCount>1</StreamCount>
<StreamKind>Text</StreamKind>
<StreamKind_String>Text</StreamKind_String>
<StreamKindID>0</StreamKindID>
<ID>CC1</ID>
<ID_String>CC1</ID_String>
<Format>EIA-608</Format>
<Format_String>EIA-608</Format_String>
<Format_Commercial>EIA-608</Format_Commercial>
<Duration>1818.183</Duration>
<Duration_String>30 min 18 s</Duration_String>
<Duration_String1>30 min 18 s 183 ms</Duration_String1>
<Duration_String2>30 min 18 s</Duration_String2>
<Duration_String3>00:30:18.183</Duration_String3>
<Duration_String4>00:30:16:11</Duration_String4>
<Duration_String5>00:30:18.183 (00:30:16:11)</Duration_String5>
<Duration_Start2End>1777.675750</Duration_Start2End>
<Duration_Start2End_String>29 min 37 s</Duration_Start2End_String>
<Duration_Start2End_String1>29 min 37 s 676 ms</Duration_Start2End_String1>
<Duration_Start2End_String2>29 min 37 s</Duration_Start2End_String2>
<Duration_Start2End_String3>00:29:37.676</Duration_Start2End_String3>
<Duration_Start2End_String4>00:29:35:27</Duration_Start2End_String4>
<Duration_Start2End_String5>00:29:37.676 (00:29:35:27)</Duration_Start2End_String5>
<Duration_Start_Command>3573.303000</Duration_Start_Command>
<Duration_Start_Command_String>59 min 33 s</Duration_Start_Command_String>
<Duration_Start_Command_String1>59 min 33 s 303 ms</Duration_Start_Command_String1>
<Duration_Start_Command_String2>59 min 33 s</Duration_Start_Command_String2>
<Duration_Start_Command_String3>00:59:33.303</Duration_Start_Command_String3>
<Duration_Start_Command_String4>00:59:29:22</Duration_Start_Command_String4>
<Duration_Start_Command_String5>00:59:33.303 (00:59:29:22)</Duration_Start_Command_String5>
<Duration_Start>3608.705250</Duration_Start>
<Duration_Start_String>1 h 0 min</Duration_Start_String>
<Duration_Start_String1>1 h 0 min 8 s 705 ms</Duration_Start_String1>
<Duration_Start_String2>1 h 0 min</Duration_Start_String2>
<Duration_Start_String3>01:00:08.705</Duration_Start_String3>
<Duration_Start_String4>01:00:05:03</Duration_Start_String4>
<Duration_Start_String5>01:00:08.705 (01:00:05:03)</Duration_Start_String5>
<Duration_End>5386.381000</Duration_End>
<Duration_End_String>1 h 29 min</Duration_End_String>
<Duration_End_String1>1 h 29 min 46 s 381 ms</Duration_End_String1>
<Duration_End_String2>1 h 29 min</Duration_End_String2>
<Duration_End_String3>01:29:46.381</Duration_End_String3>
<Duration_End_String4>01:29:41:00</Duration_End_String4>
<Duration_End_String5>01:29:46.381 (01:29:41:00)</Duration_End_String5>
<Duration_End_Command>5391.419500</Duration_End_Command>
<Duration_End_Command_String>1 h 29 min</Duration_End_Command_String>
<Duration_End_Command_String1>1 h 29 min 51 s 419 ms</Duration_End_Command_String1>
<Duration_End_Command_String2>1 h 29 min</Duration_End_Command_String2>
<Duration_End_Command_String3>01:29:51.419</Duration_End_Command_String3>
<Duration_End_Command_String4>01:29:46:01</Duration_End_Command_String4>
<Duration_End_Command_String5>01:29:51.419 (01:29:46:01)</Duration_End_Command_String5>
<BitRate_Mode>CBR</BitRate_Mode>
<BitRate_Mode_String>Constant</BitRate_Mode_String>
<FrameRate>29.970</FrameRate>
<FrameRate_String>29.970 (30000/1001) FPS</FrameRate_String>
<FrameRate_Num>30000</FrameRate_Num>
<FrameRate_Den>1001</FrameRate_Den>
<FrameCount>54491</FrameCount>
<Delay>3573.303</Delay>
<Delay_String>59 min 33 s</Delay_String>
<Delay_String1>59 min 33 s 303 ms</Delay_String1>
<Delay_String2>59 min 33 s</Delay_String2>
<Delay_String3>00:59:33.303</Delay_String3>
<Delay_String4>00:59:29:22</Delay_String4>
<Delay_String5>00:59:33.303 (00:59:29:22)</Delay_String5>
<TimeCode_FirstFrame>00:59:29:22</TimeCode_FirstFrame>
<TimeCode_LastFrame>01:29:46:02</TimeCode_LastFrame>
<TimeCode_DropFrame>No</TimeCode_DropFrame>
<TimeCode_Source>Container</TimeCode_Source>
<TimeCode_MaxFrameNumber>23</TimeCode_MaxFrameNumber>
<TimeCode_MaxFrameNumber_Theory>23</TimeCode_MaxFrameNumber_Theory>
<StreamSize>0</StreamSize>
<StreamSize_String>0.00 Byte (0%)</StreamSize_String>
<StreamSize_String1> Byte0</StreamSize_String1>
<StreamSize_String2>0.0 Byte</StreamSize_String2>
<StreamSize_String3>0.00 Byte</StreamSize_String3>
<StreamSize_String4>0.000 Byte</StreamSize_String4>
<StreamSize_String5>0.00 Byte (0%)</StreamSize_String5>
<StreamSize_Proportion>0.00000</StreamSize_Proportion>
<Events_Total>547</Events_Total>
<Events_PopOn>547</Events_PopOn>
<Lines_Count>890</Lines_Count>
<Lines_MaxCountPerEvent>3</Lines_MaxCountPerEvent>
<FirstDisplay_Delay_Frames>1061</FirstDisplay_Delay_Frames>
<FirstDisplay_Type>PopOn</FirstDisplay_Type>
<extra>
<CaptionServiceName>CC1</CaptionServiceName>
</extra>
</track>
</media>
</MediaInfo>
For SCC, based on this discussion: https://github.com/MediaArea/MediaInfoLib/issues/2112 are TimeCode_FirstFrame and TimeCode_LastFrame supposed to be based on command start / end? The value is 1 frame past the command end.
TimeCode_FirstFrame and TimeCode_LastFrame are always (for any format) always:
- TimeCode_FirstFrame: Time code of the first frame of a stream. For SCC it includes 8080 padding
- TimeCode_LastFrame: Time code of the first frame of a stream. For SCC it includes 8080 padding, and it is the timecode associated to the last frame, so not after the last frame. This is due to the idea behind theses fields, it is for the whole stream (not content), and there may be a discontinuity in the time code (it is not a time stamp), the timecode after the last frame may be a totally different value. Not for SCC, but for e.g. MXF SDTI.
It is different compared to Duration_* fields, because it is a time line (no discontinuity and useful to know the time when it is the end) so we indicate the time point after the last frame.
Additionally, should we use Duration_Start_String4 and Duration_End_String4 to determine the actual text contents and Duration_Start_Command_String4 to make sure we don’t have any contents that are cut off on the start. With this sample while the command starts at 00:59:29:22, the text command doesn’t start until 01:00:04:13. Is it possible to identify the first command that has “contents” that would be displayed so we can accurately compare it to the start of composition?
Here we are in the definition of what is a command. 942c is Erase Displayed Memory, so it is a command, so the output is not wrong, from the point of view of a stupid processing. But obviously it is a useless command. We didn't do any difference between a useful command and a useless command (we didn't go so far in the description of this field!), but we could. We could define Duration_Start field not as the time stamp/code of the first command, whatever it is, but as the time stamp/code of the first useful command. Same for Duration_End. It is more complex because we have to store the command timestamp and wait for an actual content, but not a lot more complex.
I imagine:
Start: EDM - Erase Displayed Memory (before any content) EOC - End of Caption (before any content) BS - Backspace (before any content) AOF - Alarm Off AON - Alarm On DER - Delete to End of Row (before any content) FON - Flash On EDM - Erase Displayed Memory CR - Carriage Return ENM - Erase Non-Displayed Memory EOC - End of Caption (before any content)
End: EDM - Erase Displayed Memory (only if repeated, the first one would be considered as the end of the content) EOC - End of Caption (only if repeated, the first one would be considered as the end of the content) AOF - Alarm Off AON - Alarm On FON - Flash On EDM - Erase Displayed Memory (only if repeated, the first one would be considered as the end of the content) CR - Carriage Return ENM - Erase Non-Displayed Memory EOC - End of Caption (only if repeated, the first one would be considered as the end of the content)
With your file, it would lead to 01:00:04:13 --> 01:29:35:29 (after first EOC after the last character).
Hi Jerome,
When do you think you'd be able to provide support for this?
Thanks, Joe
I finish that this week.