[FFmpeg-trac] #6533(avformat:reopened): Invalid EXT-X-TARGETDURATION in HLS

FFmpeg trac at avcodec.org
Thu Aug 10 10:28:57 EEST 2017


#6533: Invalid EXT-X-TARGETDURATION in HLS
-------------------------------------+------------------------------------
             Reporter:  tonn81       |                    Owner:
                 Type:  defect       |                   Status:  reopened
             Priority:  normal       |                Component:  avformat
              Version:  unspecified  |               Resolution:
             Keywords:  hls          |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------
Changes (by tonn81):

 * status:  closed => reopened
 * resolution:  wontfix =>


Comment:

 I would disagree with @stevenliu -- result generated by ffmpeg is not what
 is expected -- `TARGETDURATION` does not match the value given as
 `--hls_time`.

 Actually, there are two bugs in ffmpeg. Together they give this false
 result.

 Here are the bugs:

 1. **ffmpeg generate HLS chunks with duration that does not match given
 `--hls_time`**

    ffmpeg should generate chunks not longer than given with `--hls_time`.
 For `--hls_time 4` it generated `4.02` chunk instead of `4.0` or less.

 2. **ffmpeg converts chunk duration into `EXT-X-TARGETDURATION`
 incorrectly**

    According to official HLS validator (`mediastreamvalidator`), there
 could be 25% difference between actual chunk size and value. That means we
 should not ceil the value but rather round to nearest integer (so that
 delta between maximum chunk duration and `TARGETDURATION` is minimal).
 Then `4.02` would become `4`, not `5`.

 I could file another bug report for HLS chunks generation if needed.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6533#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list