[FFmpeg-trac] #10134(avformat:new): Timescale value in manifest inconsistent in DASH Template mode vs Timeline mode

FFmpeg trac at avcodec.org
Thu Jan 5 19:56:14 EET 2023


#10134: Timescale value in manifest inconsistent in DASH Template mode vs Timeline
mode
-------------------------------------+-------------------------------------
             Reporter:  Peter Chave  |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avformat     |                  Version:  git-
             Keywords:  timescale    |  master
  dash manifest init segment         |               Blocked By:
  initialization template timeline   |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 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.

 Example:
 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?
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10134>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list