[FFmpeg-trac] #10659(undetermined:new): Converting to ass subtitles results in overlap.

FFmpeg trac at avcodec.org
Tue Nov 14 00:44:41 EET 2023


#10659: Converting to ass subtitles results in overlap.
-------------------------------------+-------------------------------------
             Reporter:  typological  |                    Owner:  (none)
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by typological):

 I'm new to ffmpeg's codebase, I know the following patch is horrible, but
 it's a start.

 Problem seems to be the following: ASS uses only 10ms precision. AVPackets
 store start time and duration and not end time; in this case, the first
 packet had a duration of 4766ms which gets rounded to 4770ms when
 converting to the ASS timebase. The start time also gets rounded upwards
 and this adds a + 1 to the end time that would not have happened had the
 end time been rounded to 10ms itself.

 the patch makes ass subtitles a special case, and uses a rescale_ts
 function that rounds duration + start, then subtracts the start.

 not sure what are the possible issues that could appear from this change.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10659#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list