[FFmpeg-trac] #11200(avformat:new): FFmpeg unintelligently meddled input timestamps during "-c copy"

FFmpeg trac at avcodec.org
Sun Sep 22 19:09:21 EEST 2024


#11200: FFmpeg unintelligently meddled input timestamps during "-c copy"
-------------------------------------+-------------------------------------
             Reporter:  hachi        |                    Owner:  (none)
                 Type:  enhancement  |                   Status:  new
             Priority:  normal       |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  Non-         |               Blocked By:
  monotonic DTS                      |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Description changed by hachi:

Old description:

> Summary of the bug:
>
> FFmpeg incorrecly alters timestamps, which results in subtitles not
> displayed when viewing output file:
>
> {{{
> [sost#0:6/copy @ 0x127e150b0] Non-monotonic DTS; previous: 1268750,
> current: 150; changing to 1268750. This may result in incorrect
> timestamps in the output file.
> [sost#0:6/copy @ 0x127e150b0] Non-monotonic DTS; previous: 1268750,
> current: 2020; changing to 1268750. This may result in incorrect
> timestamps in the output file.
> [sost#0:6/copy @ 0x127e150b0] Non-monotonic DTS; previous: 1268750,
> current: 5070; changing to 1268750. This may result in incorrect
> timestamps in the output file.
> }}}
>
> I have not found an option to preserve original timestamps and bypass
> this error.
>
> How to reproduce:
> {{{
> % ffmpeg -i input.mkv -c copy -map 0 output.mkv
>
> ffmpeg version 7.0.2 Copyright (c) 2000-2024 the FFmpeg developers
> built with Apple clang version 15.0.0 (clang-1500.3.9.4)
> }}}

New description:

 Summary of the bug:

 FFmpeg incorrecly alters timestamps, which results in subtitles not
 displayed when viewing output file:

 {{{
 [sost#0:6/copy @ 0x127e150b0] Non-monotonic DTS; previous: 1268750,
 current: 150; changing to 1268750. This may result in incorrect timestamps
 in the output file.
 [sost#0:6/copy @ 0x127e150b0] Non-monotonic DTS; previous: 1268750,
 current: 2020; changing to 1268750. This may result in incorrect
 timestamps in the output file.
 [sost#0:6/copy @ 0x127e150b0] Non-monotonic DTS; previous: 1268750,
 current: 5070; changing to 1268750. This may result in incorrect
 timestamps in the output file.
 }}}

 I have not found an option to preserve original timestamps and bypass this
 error.

 How to reproduce:
 {{{
 % cat input_*.mkv > input.mkv
 % ffmpeg -i input.mkv -c copy -map 0 output.mkv

 ffmpeg version 7.0.2 Copyright (c) 2000-2024 the FFmpeg developers
 built with Apple clang version 15.0.0 (clang-1500.3.9.4)
 }}}

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


More information about the FFmpeg-trac mailing list