mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
fps switching in HISTORY channel #188
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cfsmp3 on GitHub (Oct 4, 2016).
Originally assigned to: @cfsmp3, @anshul1912 on GitHub.
Processing a HISTORY (writing it in uppercase because it seems to be a big deal to them) TS we get this:
67% | 00:16Changed fps using NAL to: 29.970030
72% | 00:18Changed fps using NAL to: 29.970030
repeated lots of times
A sample file:
https://drive.google.com/file/d/0BxRlGXOr_NhUNmh0NXg3S2dHeFE/view?usp=sharing
The FPS changes to that value here:
void seq_parameter_set_rbsp (struct avc_ctx *ctx, unsigned char *seqbuf, unsigned char *seqend)
{
[...]
if (current_fps != (double)time_scale / (2 * num_units_in_tick))
{
current_fps = (double)time_scale / (2 * num_units_in_tick); // Based on formula D-2, p. 359 of the ISO/IEC 14496-10:2012(E) spec.
mprint("Changed fps using NAL to: %f\n", current_fps);
}
}
However it's going back to double that FPS (however it's not logged) here:
void slice_header (struct lib_cc_decode *ctx, unsigned char *heabuf, unsigned char *heaend, int nal_unit_type, struct cc_subtitle *sub)
{
[...]
// TODO - Do this right.
// When bottom_field_flag is set the video is interlaced,
// override current_fps.
current_fps = framerates_values[7];
Where that TODO comment really seems to apply.
@mackworth commented on GitHub (Oct 10, 2016):
I'm seeing this on multiple channels on Comcast.
@cfsmp3 commented on GitHub (Oct 13, 2016):
I've been looking into this a bit more. The issue is probably more serious than it seems.
I'm assigning this to Anshul (since he did the context refactoring - Anshul, do you remember why current_fps was left as a global?) and myself.
@cfsmp3 commented on GitHub (Nov 9, 2016):
Code-in task created.
@ghost commented on GitHub (Nov 29, 2016):
Error is still here as of 0.82. Number of times it appears is equal to the number of jump-in frames.
@Izaron commented on GitHub (Dec 10, 2016):
Why we use this line? https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/avc_functions.c#L925
Why we can't use
current_fps = framerates_values[ctx->current_frame_rate];? As in this value write https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/es_functions.c#L435If we use
ctx->current_frame_rate, it does not seem to switch the fps, but probably it is just hiding the problem.Probably, this variable can be inserted into some data structure, but there is still a lot of global variables
@cfsmp3 commented on GitHub (Dec 13, 2016):
Confirmed fixed for HISTORY2.TS.