No duration subtitles again
Hello,
as you know, since #2397 (closed) and #2490 (closed) text subtitle blocks without an explicit duration (whether SimpleBlocks or Blocks in BlockGroups without duration elements, not duration zero elements) will be converted to BlockGroups whose duration is the difference of the current and the next frame of this track (except when it is the last packet of a track). But there is a problem when the initial block was not considered a keyframe and unfortunately, there are samples for this. I have uploaded bbconeapril.mkv to your server. It has initially been uploaded as part of FFmpeg ticket #7843. When remuxing the subtitle track (which exclusively uses SimpleBlocks not marked as keyframes), the output uses ReferenceBlock
elements:
|+ Cluster at 5396
| + Cluster timestamp: 00:00:01.140000000 at 5402
| + Block group at 5406
| + Block: track number 1, 1 frame(s), timestamp 00:00:01.140000000 at 5408
| + Frame with size 101 at 5414
| + Reference block: -00:00:01.140000000 at 5515
| + Block duration: 00:00:03.628000000 at 5519
| + Block group at 5523
| + Block: track number 1, 1 frame(s), timestamp 00:00:04.768000000 at 5525
| + Frame with size 66 at 5531
| + Reference block: -00:00:03.628000000 at 5597
| + Block duration: 00:00:02.880000000 at 5601
|+ Cluster at 5605
| + Cluster timestamp: 00:00:07.648000000 at 5611
| + Block group at 5615
| + Block: track number 1, 1 frame(s), timestamp 00:00:07.648000000 at 5617
| + Frame with size 49 at 5623
| + Reference block: -00:00:02.880000000 at 5672
| + Block duration: 00:00:02.240000000 at 5676
| + Block group at 5680
| + Block: track number 1, 1 frame(s), timestamp 00:00:09.888000000 at 5683
| + Frame with size 144 at 5690
| + Reference block: -00:00:02.240000000 at 5834
| + Block duration: 00:00:03.200000000 at 5838
There is one thing that is definitely wrong here: The ReferenceBlock
element of the first BlockGroup points to a block with timestamp 0 although such a block doesn't exist. And then there are the ReferenceBlock
elements of the other blocks which I don't like either. Maybe it's best to treat subtitles always as keyframes? (FFmpeg doesn't treat overlapping subtitles as keyframes; maybe mkvmerge shouldn't do either. I don't know.)
Gruß\ Andreas