Opened 14 months ago

#10134 new defect

Timescale value in manifest inconsistent in DASH Template mode vs Timeline mode

Reported by: Peter Chave Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: timescale dash manifest init segment initialization template timeline
Cc: Peter Chave Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


When using the DASH muxer output, if mode is set to use_template then the timescale value in manifest is always 1,000,000
However the timescale value set in the initialization segment is based on encoding configuration.

DASH stream with encoded video at 29.97fps results in:
Manifest timescale = 1,000,000
Init segment timescale = 30,000

DASH stream with encoded video at 30fps results in:
Manifest timescale = 1,000,000
Init segment timescale = 15,360

The understanding is that both the manifest and init segment should use the same timescale.

If the mode is set use_timeline
Then timescale value in the manifest AND init segment are the same.

Possible reason:

Inspecting the source code /libavformat/dashenc.c
line 654 appears to answer the question why does this occur.

That section of code starts with a conditional on use_template
However the very next line (655) sets timescale based on an inline conditional statement based on use_timeline.
That inline conditional will set the timescale variable always to AV_TIME_BASE

AV_TIME_BASE is defined in libavutil/avutil.h as being 1000000

Can someone determine if this is the root cause of the misalignment between Manifest and Init segment timescales?

If so what was the intend of the inline conditional?

If this is not the cause can it be investigated further to determine the true root cause?

Change History (0)

Note: See TracTickets for help on using tickets.