[FFmpeg-trac] #9001(ffmpeg:new): concat demuxed ASS subtitles don't work

FFmpeg trac at avcodec.org
Thu Aug 5 07:45:46 EEST 2021


#9001: concat demuxed ASS subtitles don't work
-------------------------------------+-------------------------------------
             Reporter:  Gregory      |                    Owner:  (none)
  Beauregard                         |
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  ffmpeg
              Version:  git-master   |               Resolution:
             Keywords:  ass libass   |               Blocked By:
  subtitles concat                   |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Description changed by Gregory Beauregard:

Old description:

> ffmpeg version used: master as of 2021-08-04
>
> Summary of the bug: The subtitles filter fails to display concat demuxed
> ASS/SSA subtitles due to choking on the frame number.
>
> How to reproduce:
> Attached are two sample videos `assconcatsamp1.mkv` and
> `assconcatsamp2.mkv`. We concat demux these files while rendering out the
> subtitles:
>
> Create a new file `concatplaylist.txt` in the same directory as the
> samples that contains the following (or download attached):
> {{{
> ffconcat version 1.0
> file assconcatsamp1.mkv
> file assconcatsamp2.mkv
> }}}
>
> Now, we try to render out subtitles:
> {{{
> ffmpeg -report -f concat -safe 0 -i concatplaylist.txt -vf
> subtitles=concatplaylist.txt -c:v libx264 -b:v 1M -c:a libopus -b:a 96k
> -map 0:v -map 0:a -y assconcat.mkv
> }}}
>
> A log from running this is attached as `ffmpeg-20210804-124257.log`
>
> The output `assconcat.mkv` can be inspected to see all the subtitles in
> second clip weren't rendered except a part that says G-li-co.
>
> When stored in MKV (ONLY when stored in MKV), ASS/SSA subtitle lines have
> an associated frame number that indicates their position within the
> original file. It's failing at lines with dupe frame numbers. The G-li-co
> part has high frame numbers not encountered in the first file.

New description:

 ffmpeg version used: master as of 2021-08-04

 Summary of the bug: The subtitles filter fails to display concat demuxed
 ASS/SSA subtitles due to choking on the frame number.

 How to reproduce:
 Attached are two sample videos `assconcatsamp1.mkv` and
 `assconcatsamp2.mkv`. We concat demux these files while rendering out the
 subtitles:

 Create a new file `concatplaylist.txt` in the same directory as the
 samples that contains the following (or download attached):
 {{{
 ffconcat version 1.0
 file assconcatsamp1.mkv
 file assconcatsamp2.mkv
 }}}

 Now, we try to render out subtitles:
 {{{
 ffmpeg -report -f concat -safe 0 -i concatplaylist.txt -vf
 subtitles=concatplaylist.txt -c:v libx264 -b:v 1M -c:a libopus -b:a 96k
 -map 0:v -map 0:a -y assconcat.mkv
 }}}

 A log from running this is attached as `ffmpeg-20210804-124257.log`

 The output `assconcat.mkv` can be inspected to see all the subtitles in
 second clip weren't rendered except a part that says G-li-co.

 When stored in MKV (ONLY when stored in MKV), ASS/SSA subtitle lines have
 an associated frame number that indicates their position within the
 original file. When concat demuxing two MKV files that each contain an
 ASS/SSA, the rendering will fail to render lines where it sees frame
 number dupes (i.e. in the second file that dupe from the first file). The
 G-li-co part rendered in the second file in the example has high frame
 numbers not encountered in the first file.

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


More information about the FFmpeg-trac mailing list