[CEA-708] [Timing] Catchable bug with timing #236

Closed
opened 2026-01-29 16:38:36 +00:00 by claunia · 7 comments
Owner

Originally created by @Izaron on GitHub (Jan 12, 2017).

It is known that timing in our CEA-708 is different from the timing of CEA-708 in video player with a difference of a second or so and in general it's not critical error.
But sometimes the timing differs a lot - end of the time goes ahead ~10 seconds or so in different examples. This always happens due to this bug where window is undefined (decoder->current_window == -1) and it's col_count too: line (and line 129). It may be a one line fix or maybe hell with codecs, but I must sleep and somewhere else, so if you want we can fix it together.

Originally created by @Izaron on GitHub (Jan 12, 2017). It is known that timing in our CEA-708 is different from the timing of CEA-708 in video player with a difference of a second or so and in general it's not critical error. But sometimes the timing differs a lot - end of the time goes ahead ~10 seconds or so in different examples. This always happens due to this bug where window is undefined (**decoder->current_window == -1**) and it's col_count too: [line](https://github.com/Izaron/ccextractor/blob/7078f1015024d68115d8659a9187224d0d7ad363/src/lib_ccx/ccx_decoders_708_output.c#L122) (and line 129). It may be a one line fix or maybe hell with codecs, but I must sleep and somewhere else, so if you want we can fix it together.
claunia added the bugCEA-708GCI19 labels 2026-01-29 16:38:36 +00:00
Author
Owner

@cfsmp3 commented on GitHub (Jan 20, 2017):

GSoC qualification: This issues gives 2 points.

@cfsmp3 commented on GitHub (Jan 20, 2017): GSoC qualification: This issues gives 2 points.
Author
Owner

@shucon commented on GitHub (Dec 1, 2017):

@Izaron I was about to open an issue for the same , but found it here , maybe I could start working on this.

@shucon commented on GitHub (Dec 1, 2017): @Izaron I was about to open an issue for the same , but found it here , maybe I could start working on this.
Author
Owner

@cfsmp3 commented on GitHub (Dec 1, 2017):

Definitely, go ahead :-)

On Fri, Dec 1, 2017 at 2:28 AM, Saksham Gupta notifications@github.com
wrote:

@Izaron https://github.com/izaron I was about to open an issue for the
same , but found it here , maybe I could start working on this.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/CCExtractor/ccextractor/issues/641#issuecomment-348459470,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFrJ2WhB9BCsxNxvlo9RzezSYwgFy6fiks5s79TjgaJpZM4LiGbM
.

@cfsmp3 commented on GitHub (Dec 1, 2017): Definitely, go ahead :-) On Fri, Dec 1, 2017 at 2:28 AM, Saksham Gupta <notifications@github.com> wrote: > @Izaron <https://github.com/izaron> I was about to open an issue for the > same , but found it here , maybe I could start working on this. > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/CCExtractor/ccextractor/issues/641#issuecomment-348459470>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AFrJ2WhB9BCsxNxvlo9RzezSYwgFy6fiks5s79TjgaJpZM4LiGbM> > . >
Author
Owner

@ghost commented on GitHub (Dec 25, 2017):

Yo can I get a sample for this one?

@ghost commented on GitHub (Dec 25, 2017): Yo can I get a sample for this one?
Author
Owner

@MatejMecka commented on GitHub (Jan 4, 2018):

Sample?

@MatejMecka commented on GitHub (Jan 4, 2018): Sample?
Author
Owner

@thetransformerr commented on GitHub (Jul 9, 2018):

Hi all and @cfsmp3 ,
After analysing flow of packets , I can think of few reasons that might be responsible for these timing issues, although the current base for 708 is already following up to 90-95% standards laid down by CEA-708 specifications, problems mostly arise due to lack on video files , with missing PMT , broken TS, incorrect packet encoding.

Acc to specs,

whenever a window is to be deleted , If any one of the deleted windows is current window, the value of current window ID becomes "unknown/uninitialized" , and characters following this command do not go to any window until a SetCurrentWindow or DefineWindow command is received for this service.

and this might happen due to few commands like delete window, clear window etc.
for ex.

25a8b53ff5/src/lib_ccx/ccx_decoders_708.c (L1115)

In this line , although we check screen content and works correctly if there is any active window in decoder but current_window many times have value -1 and none of the windows are defined or active in decoder,

which causes above mentioned exception and also we cannot ignore content without defined windows, as I have tested we miss captions.

Therefore either we can store that data until a new window is defined or we can flush screen data before removing window.

This is just one instance , similar solution might be needed for handling this issue in other case .

in following patch I have done modification,

ae73f147a5/src/lib_ccx/ccx_decoders_708.c (L1206)

@thetransformerr commented on GitHub (Jul 9, 2018): Hi all and @cfsmp3 , After analysing flow of packets , I can think of few reasons that might be responsible for these timing issues, although the current base for 708 is already following up to 90-95% standards laid down by CEA-708 specifications, problems mostly arise due to lack on video files , with missing PMT , broken TS, incorrect packet encoding. Acc to specs, > whenever a window is to be deleted , If any one of the deleted windows is current window, the value of current window ID becomes "unknown/uninitialized" , and characters following this command do not go to any window until a SetCurrentWindow or DefineWindow command is received for this service. - so after analysing videos and report from this folder https://drive.google.com/drive/folders/0B_61ywKPmI0Ta2diT3l0eTlHc2c , one or one of the many reasons is whenever a current window is deleted which is visible , and there is not any active or defined window in decoder , the remaining content causes this problem, So the line referenced in first post of this issue , is this https://github.com/CCExtractor/ccextractor/blob/25a8b53ff55f904f29e4810bdaedd4f154567677/src/lib_ccx/ccx_decoders_708_output.c#L137 and this might happen due to few commands like delete window, clear window etc. for ex. https://github.com/CCExtractor/ccextractor/blob/25a8b53ff55f904f29e4810bdaedd4f154567677/src/lib_ccx/ccx_decoders_708.c#L1115 In this line , although we check screen content and works correctly if there is any active window in decoder but current_window many times have value -1 and none of the windows are defined or active in decoder, which causes above mentioned exception and also we cannot ignore content without defined windows, as I have tested we miss captions. Therefore either we can store that data until a new window is defined or we can flush screen data before removing window. This is just one instance , similar solution might be needed for handling this issue in other case . in following patch I have done modification, https://github.com/thetransformerr/ccextractor/blob/ae73f147a545003ea58c94925cf14891ad43d8dc/src/lib_ccx/ccx_decoders_708.c#L1206
Author
Owner

@thetransformerr commented on GitHub (Jul 9, 2018):

after this modification there is one similar message when I use following command on video ande.ts from folder https://drive.google.com/drive/folders/0B_61ywKPmI0Ta2diT3l0eTlHc2c

ccextractor ande.ts -svc all

_dtvcc_handle_G0: Window has to be defined first

this happens from here:
ae73f147a5/src/lib_ccx/ccx_decoders_708.c (L1389)

Although this doesn't look like other one above , I would really like to know , if we can set window ourselves before we receive command from stream , rather then ignoring the leftover data.

this can solve issues related to lost of data where as doing this would be deviation from standard EIA_708

@thetransformerr commented on GitHub (Jul 9, 2018): after this modification there is one similar message when I use following command on video ande.ts from folder https://drive.google.com/drive/folders/0B_61ywKPmI0Ta2diT3l0eTlHc2c `ccextractor ande.ts -svc all` __dtvcc_handle_G0: Window has to be defined first_ this happens from here: https://github.com/thetransformerr/ccextractor/blob/ae73f147a545003ea58c94925cf14891ad43d8dc/src/lib_ccx/ccx_decoders_708.c#L1389 Although this doesn't look like other one above , I would really like to know , if we can set window ourselves before we receive command from stream , rather then ignoring the leftover data. this can solve issues related to lost of data where as doing this would be deviation from standard EIA_708
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#236