#7843 closed defect (duplicate)
FFmpeg not outputting to spec MKV files
Reported by: | alexrichmond | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Hello,
It seems ffmpeg is not outputting valid mkv files according to MKValidator (0.5.2).
MKValidator reports:
ERR0B1: Block at 1020711 track #3 is not a keyframe
over and over again.
Please note these are errors & not warnings. If they were just warnings then I would just ignore the issue as warnings will still allow a file to be valid according to MKValidator.
Track 3 is Subtitles. The subtitles are text copied from a satellite recording. The Subtitles are plain text, not pictures.
Now, this gets more interesting, as If i run the mkv ffmpeg outputs through mkvtoolnix (just basic re-mux) and then test with MKValidator again, there are no issues at all; no warnings or errors. So it looks like this is a issue with the way FFmpeg is dealing with subtitles in mkv containers.
Here is my ffmpeg command line:
ffmpeg -fix_sub_duration -txt_format text -i ./testrecording.ts -c:v libx264 -vf zscale=w=1280:h=720:f=spline36,setsar=1 -preset slow -crf 25 -level 4.1 -c:a copy -c:s copy ./mysubstest.mkv
Any ideas? Thanks for any help!
Change History (7)
comment:1 by , 6 years ago
Priority: | important → normal |
---|
comment:2 by , 6 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
- As cehoyos has already said, this is not a valid ticket in the current form.
- Are you sure your subtitles are plain text and that you are not accidentally muxing a DVB subtitles stream? Because actually c:s copy would AFAIK not work if your input were a teletext stream.
- I think I already know what this is about:
a) FFmpeg writes unknown-length subtitle blocks as BlockGroups with a duration element indicating a duration of zero. This is insane and I intend to change this (after my current open patchset for the Matroska muxer has been dealt with...), but it is not spec-incompliant.
b) mkvalidator's error is based upon an insane and now removed part of the Matroska specs: That a BlockGroup with a duration of zero can't be a keyframe. This has since been removed (see https://github.com/Matroska-Org/matroska-specification/commit/9313a00f7391a285f95e9d6f0a5f8f3f80ed4779), but mkvalidator 0.5.2 has not been fixed. A PR for this is here: https://github.com/Matroska-Org/foundation-source/pull/40, but it hasn't been accepted yet. - Did you really use a current version of mkvmerge? Newer versions (since 31.0) keep a BlockGroup with an explicit duration of 0ms that way, so that mkvalidator's error should also be emitted for the remuxed file; earlier versions mostly muxed such subtitles as SimpleBlocks. The relevant mkvmerge issue is 2490: https://gitlab.com/mbunkus/mkvtoolnix/issues/2490
- Btw: This is also a duplicate of #2023. Therefore closed.
comment:3 by , 6 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Thank you Cehoyos & Mkver for your quick responses last night.
Apologies for not making this a valid ticket.
Thank you for your detailed analysis. I did come across the ticket in #5 but I didn't think it was the same issue.
Just so everything is clear and dotting the I's & crossing the T's I'll reopen briefly with full uncut console and input sample and hopefully somebody can confirm whether this is a properly to spec mkv output or if something is wrong.
Just a quick note. It was late last night when I was doing this and I was trying loads of different things so the command line I pasted was a little messed up, as I used that particular command line after I had run the file through something else first. Also, the mkvmerge version I used is not the latest version, as you thought mkver, it is v22.0.0.
Ok, command line:
./ffmpeg -fix_sub_duration -i /root/bbconeapril.mkv -map 0:0 -map 0:3 -map 0:4 -c:v libx264 -preset slow -crf 25 -level 4.1 -c:a copy -c:s copy /root/mysubstest.mkv
console output:
root@VMHome:~/bin#
root@VMHome:~/bin# ./ffmpeg -fix_sub_duration -i /root/bbconeapril.mkv -map 0:0 -map 0:3 -map 0:4 -c:v libx264 -preset slow -crf 25 -level 4.1 -c:a copy -c:s copy /root/mysubstest.mkv
ffmpeg version N-93575-gabfeba9 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/root/bin --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 51.100 / 58. 51.100
libavformat 58. 27.102 / 58. 27.102
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[h264 @ 0x43ef180] mmco: unref short failure
Last message repeated 1 times
Input #0, matroska,webm, from '/root/bbconeapril.mkv':
Metadata:
title : bbconeapril
encoder : Tvheadend Matroska muxer
DATE_BROADCASTED: 2019-04-16 15:41:41
ORIGINAL_MEDIA_TYPE: TV
Duration: 00:01:41.51, start: 0.000000, bitrate: 4027 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
Stream #0:1(nar): Audio: mp2, 48000 Hz, stereo, s16p, 256 kb/s (default)
Stream #0:2(eng): Subtitle: dvb_subtitle (default)
Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
Stream #0:4(eng): Subtitle: subrip (default)
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:3 -> #0:1 (copy)
Stream #0:4 -> #0:2 (copy)
Press [q] to stop, ? for help
[h264 @ 0x4461740] mmco: unref short failure
[h264 @ 0x4655b80] mmco: unref short failure
[libx264 @ 0x44174c0] using SAR=1/1
[libx264 @ 0x44174c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x44174c0] profile Progressive High, level 4.1, 4:2:0, 8-bit
[libx264 @ 0x44174c0] 264 - core 157 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=4 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, matroska, to '/root/mysubstest.mkv':
Metadata:
title : bbconeapril
ORIGINAL_MEDIA_TYPE: TV
DATE_BROADCASTED: 2019-04-16 15:41:41
encoder : Lavf58.27.102
Stream #0:0(eng): Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 1k tbn, 25 tbc (default)
Metadata:
encoder : Lavc58.51.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s (default)
Stream #0:2(eng): Subtitle: subrip (default)
frame= 57 fps=0.0 q=0.0 size= 1kB time=00:00:03.58 bitrate= 2.4kbits/sframe= 73 fps= 62 q=30.0 size= 1kB time=00:00:04.44 bitrate= 1.9kbits/frame= 93 fps= 54 q=30.0 size= 50kB time=00:00:05.31 bitrate= 76.5kbits/frame= 112 fps= 50 q=30.0 size= 50kB time=00:00:05.76 bitrate= 70.6kbits/frame= 132 fps= 47 q=30.0 size= 50kB time=00:00:06.56 bitrate= 62.0kbits/frame= 155 fps= 47 q=30.0 size= 50kB time=00:00:07.68 bitrate= 52.9kbits/frame= 176 fps= 46 q=27.0 size= 50kB time=00:00:08.99 bitrate= 45.2kbits/frame= 199 fps= 46 q=30.0 size= 898kB time=00:00:09.82 bitrate= 748.9kbits/frame= 225 fps= 46 q=30.0 size= 898kB time=00:00:10.43 bitrate= 705.3kbits/frame= 246 fps= 45 q=30.0 size= 1259kB time=00:00:11.32 bitrate= 910.4kbits/frame= 266 fps= 44 q=30.0 size= 1259kB time=00:00:12.67 bitrate= 813.9kbits/frame= 287 fps= 44 q=30.0 size= 1608kB time=00:00:13.47 bitrate= 977.9kbits/frame= 305 fps= 44 q=30.0 size= 1608kB time=00:00:13.82 bitrate= 953.0kbits/frame= 326 fps= 42 q=30.0 size= 1888kB time=00:00:14.49 bitrate=1066.8kbits/frame= 343 fps= 42 q=30.0 size= 1888kB time=00:00:15.32 bitrate=1008.9kbits/frame= 361 fps= 41 q=30.0 size= 1888kB time=00:00:16.19 bitrate= 955.0kbits/frame= 376 fps= 40 q=30.0 size= 1888kB time=00:00:16.44 bitrate= 940.2kbits/frame= 397 fps= 40 q=30.0 size= 1888kB time=00:00:17.47 bitrate= 885.1kbits/frame= 415 fps= 40 q=30.0 size= 2644kB time=00:00:18.30 bitrate=1183.5kbits/frame= 428 fps= 39 q=30.0 size= 3242kB time=00:00:18.62 bitrate=1426.2kbits/frame= 449 fps= 40 q=30.0 size= 3242kB time=00:00:19.39 bitrate=1369.8kbits/frame= 467 fps= 39 q=30.0 size= 3242kB time=00:00:20.28 bitrate=1309.3kbits/frame= 484 fps= 39 q=30.0 size= 3242kB time=00:00:21.12 bitrate=1257.7kbits/frame= 501 fps= 39 q=30.0 size= 3242kB time=00:00:21.40 bitrate=1240.8kbits/frame= 521 fps= 39 q=30.0 size= 3242kB time=00:00:22.27 bitrate=1192.6kbits/frame= 537 fps= 38 q=30.0 size= 3242kB time=00:00:23.10 bitrate=1149.7kbits/frame= 556 fps= 38 q=30.0 size= 4541kB time=00:00:24.06 bitrate=1545.7kbits/frame= 577 fps= 38 q=30.0 size= 4541kB time=00:00:24.35 bitrate=1527.4kbits/frame= 594 fps= 38 q=30.0 size= 4541kB time=00:00:25.24 bitrate=1473.2kbits/frame= 614 fps= 38 q=30.0 size= 4541kB time=00:00:26.11 bitrate=1424.5kbits/frame= 632 fps= 38 q=30.0 size= 4541kB time=00:00:27.00 bitrate=1377.2kbits/frame= 651 fps= 38 q=30.0 size= 4541kB time=00:00:27.93 bitrate=1331.5kbits/frame= 670 fps= 38 q=30.0 size= 4541kB time=00:00:28.28 bitrate=1314.9kbits/frame= 685 fps= 38 q=30.0 size= 5574kB time=00:00:28.99 bitrate=1574.9kbits/frame= 704 fps= 38 q=30.0 size= 5574kB time=00:00:29.82 bitrate=1531.0kbits/frame= 721 fps= 37 q=30.0 size= 5574kB time=00:00:30.11 bitrate=1516.3kbits/frame= 740 fps= 37 q=30.0 size= 5574kB time=00:00:31.04 bitrate=1471.0kbits/frame= 756 fps= 37 q=30.0 size= 5574kB time=00:00:31.87 bitrate=1432.6kbits/frame= 772 fps= 37 q=30.0 size= 5574kB time=00:00:32.70 bitrate=1396.2kbits/frame= 793 fps= 37 q=30.0 size= 5574kB time=00:00:33.05 bitrate=1381.3kbits/frame= 808 fps= 37 q=30.0 size= 5574kB time=00:00:33.85 bitrate=1348.6kbits/frame= 825 fps= 37 q=30.0 size= 6802kB time=00:00:34.65 bitrate=1607.8kbits/frame= 836 fps= 36 q=30.0 size= 6802kB time=00:00:34.88 bitrate=1597.5kbits/frame= 856 fps= 36 q=30.0 size= 6802kB time=00:00:35.71 bitrate=1560.3kbits/frame= 867 fps= 36 q=30.0 size= 6802kB time=00:00:36.51 bitrate=1526.1kbits/frame= 889 fps= 36 q=30.0 size= 6802kB time=00:00:36.92 bitrate=1508.9kbits/frame= 904 fps= 36 q=30.0 size= 6802kB time=00:00:37.69 bitrate=1478.2kbits/frame= 927 fps= 35 q=30.0 size= 7864kB time=00:00:38.59 bitrate=1669.3kbits/frame= 947 fps= 35 q=30.0 size= 7864kB time=00:00:39.48 bitrate=1631.4kbits/frame= 969 fps= 35 q=30.0 size= 7864kB time=00:00:40.41 bitrate=1593.9kbits/frame= 992 fps= 36 q=30.0 size= 7864kB time=00:00:41.40 bitrate=1555.8kbits/frame= 1006 fps= 35 q=30.0 size= 7864kB time=00:00:41.66 bitrate=1546.2kbits/frame= 1024 fps= 35 q=30.0 size= 7864kB time=00:00:42.49 bitrate=1515.9kbits/frame= 1033 fps= 35 q=30.0 size= 7864kB time=00:00:42.72 bitrate=1508.0kbits/frame= 1054 fps= 35 q=30.0 size= 9060kB time=00:00:43.58 bitrate=1702.9kbits/frame= 1074 fps= 35 q=30.0 size= 9060kB time=00:00:44.35 bitrate=1673.4kbits/frame= 1088 fps= 35 q=30.0 size= 9060kB time=00:00:45.18 bitrate=1642.6kbits/frame= 1105 fps= 35 q=30.0 size= 9060kB time=00:00:45.44 bitrate=1633.4kbits/frame= 1116 fps= 35 q=30.0 size= 9060kB time=00:00:46.33 bitrate=1601.8kbits/frame= 1134 fps= 35 q=30.0 size= 9060kB time=00:00:47.20 bitrate=1572.4kbits/frame= 1145 fps= 34 q=30.0 size= 9060kB time=00:00:47.48 bitrate=1562.9kbits/frame= 1161 fps= 34 q=30.0 size= 9060kB time=00:00:48.22 bitrate=1539.1kbits/frame= 1177 fps= 34 q=30.0 size= 10081kB time=00:00:48.44 bitrate=1704.5kbits/frame= 1193 fps= 34 q=30.0 size= 10081kB time=00:00:49.60 bitrate=1665.0kbits/frame= 1208 fps= 34 q=30.0 size= 10081kB time=00:00:49.66 bitrate=1662.8kbits/frame= 1220 fps= 34 q=30.0 size= 10081kB time=00:00:50.68 bitrate=1629.2kbits/frame= 1236 fps= 34 q=30.0 size= 10081kB time=00:00:50.88 bitrate=1623.1kbits/frame= 1258 fps= 34 q=30.0 size= 10081kB time=00:00:51.77 bitrate=1595.0kbits/frame= 1269 fps= 34 q=30.0 size= 11049kB time=00:00:52.54 bitrate=1722.6kbits/frame= 1293 fps= 34 q=30.0 size= 11049kB time=00:00:53.50 bitrate=1691.7kbits/frame= 1313 fps= 34 q=30.0 size= 11049kB time=00:00:54.36 bitrate=1664.8kbits/frame= 1338 fps= 34 q=30.0 size= 11049kB time=00:00:55.29 bitrate=1636.9kbits/frame= 1347 fps= 34 q=30.0 size= 11049kB time=00:00:55.42 bitrate=1633.1kbits/frame= 1373 fps= 34 q=30.0 size= 11049kB time=00:00:56.48 bitrate=1602.6kbits/frame= 1399 fps= 34 q=30.0 size= 11049kB time=00:00:57.47 bitrate=1574.9kbits/frame= 1417 fps= 34 q=30.0 size= 11861kB time=00:00:58.24 bitrate=1668.4kbits/frame= 1436 fps= 34 q=30.0 size= 11861kB time=00:00:59.10 bitrate=1644.0kbits/frame= 1449 fps= 34 q=30.0 size= 11861kB time=00:00:59.39 bitrate=1636.0kbits/frame= 1468 fps= 34 q=30.0 size= 11861kB time=00:01:00.22 bitrate=1613.4kbits/frame= 1475 fps= 34 q=30.0 size= 11861kB time=00:01:00.35 bitrate=1610.0kbits/frame= 1491 fps= 34 q=30.0 size= 11861kB time=00:01:01.18 bitrate=1588.1kbits/frame= 1510 fps= 34 q=30.0 size= 13749kB time=00:01:02.01 bitrate=1816.1kbits/frame= 1523 fps= 34 q=30.0 size= 13749kB time=00:01:02.40 bitrate=1804.9kbits/frame= 1538 fps= 34 q=30.0 size= 13749kB time=00:01:03.10 bitrate=1784.8kbits/frame= 1554 fps= 34 q=30.0 size= 13749kB time=00:01:03.64 bitrate=1769.6kbits/frame= 1569 fps= 33 q=30.0 size= 13749kB time=00:01:04.32 bitrate=1751.1kbits/frame= 1587 fps= 34 q=30.0 size= 13749kB time=00:01:04.96 bitrate=1733.8kbits/frame= 1604 fps= 33 q=30.0 size= 13749kB time=00:01:05.47 bitrate=1720.3kbits/frame= 1617 fps= 33 q=30.0 size= 13749kB time=00:01:06.24 bitrate=1700.3kbits/frame= 1630 fps= 33 q=30.0 size= 13749kB time=00:01:06.81 bitrate=1685.7kbits/frame= 1646 fps= 33 q=30.0 size= 13749kB time=00:01:07.32 bitrate=1672.8kbits/frame= 1657 fps= 33 q=30.0 size= 13749kB time=00:01:07.58 bitrate=1666.5kbits/frame= 1669 fps= 33 q=30.0 size= 13749kB time=00:01:08.19 bitrate=1651.6kbits/frame= 1677 fps= 33 q=30.0 size= 13749kB time=00:01:08.48 bitrate=1644.7kbits/frame= 1683 fps= 33 q=30.0 size= 13749kB time=00:01:08.80 bitrate=1637.0kbits/frame= 1689 fps= 32 q=30.0 size= 13749kB time=00:01:08.92 bitrate=1634.0kbits/frame= 1703 fps= 32 q=30.0 size= 13749kB time=00:01:09.44 bitrate=1622.0kbits/frame= 1716 fps= 32 q=30.0 size= 13749kB time=00:01:09.95 bitrate=1610.1kbits/frame= 1728 fps= 32 q=30.0 size= 13749kB time=00:01:10.33 bitrate=1601.3kbits/frame= 1741 fps= 32 q=30.0 size= 13749kB time=00:01:10.91 bitrate=1588.3kbits/frame= 1757 fps= 32 q=30.0 size= 13749kB time=00:01:11.45 bitrate=1576.2kbits/frame= 1772 fps= 32 q=30.0 size= 13749kB time=00:01:12.19 bitrate=1560.1kbits/frame= 1788 fps= 32 q=30.0 size= 14880kB time=00:01:12.89 bitrate=1672.3kbits/frame= 1805 fps= 32 q=30.0 size= 14880kB time=00:01:13.53 bitrate=1657.7kbits/frame= 1819 fps= 32 q=30.0 size= 14880kB time=00:01:14.40 bitrate=1638.5kbits/frame= 1835 fps= 32 q=30.0 size= 14880kB time=00:01:15.04 bitrate=1624.5kbits/frame= 1850 fps= 32 q=30.0 size= 14880kB time=00:01:15.52 bitrate=1614.2kbits/frame= 1859 fps= 32 q=30.0 size= 14880kB time=00:01:15.93 bitrate=1605.3kbits/frame= 1872 fps= 32 q=30.0 size= 14880kB time=00:01:16.28 bitrate=1597.9kbits/frame= 1888 fps= 31 q=30.0 size= 16224kB time=00:01:16.92 bitrate=1727.6kbits/frame= 1902 fps= 31 q=30.0 size= 16224kB time=00:01:17.44 bitrate=1716.2kbits/frame= 1917 fps= 31 q=30.0 size= 16224kB time=00:01:18.11 bitrate=1701.5kbits/frame= 1928 fps= 31 q=30.0 size= 16224kB time=00:01:18.52 bitrate=1692.4kbits/frame= 1943 fps= 31 q=30.0 size= 16224kB time=00:01:19.16 bitrate=1678.8kbits/frame= 1956 fps= 31 q=30.0 size= 16224kB time=00:01:19.48 bitrate=1672.0kbits/frame= 1971 fps= 31 q=30.0 size= 16224kB time=00:01:20.25 bitrate=1656.0kbits/frame= 1986 fps= 31 q=30.0 size= 16224kB time=00:01:20.89 bitrate=1642.9kbits/frame= 1999 fps= 31 q=30.0 size= 16224kB time=00:01:21.34 bitrate=1633.9kbits/frame= 2011 fps= 31 q=30.0 size= 19450kB time=00:01:21.88 bitrate=1945.8kbits/frame= 2025 fps= 31 q=30.0 size= 19450kB time=00:01:22.17 bitrate=1939.0kbits/frame= 2032 fps= 31 q=30.0 size= 19450kB time=00:01:22.43 bitrate=1932.9kbits/frame= 2043 fps= 30 q=30.0 size= 19450kB time=00:01:23.13 bitrate=1916.6kbits/frame= 2052 fps= 30 q=30.0 size= 19450kB time=00:01:23.32 bitrate=1912.1kbits/frame= 2064 fps= 30 q=30.0 size= 19450kB time=00:01:24.06 bitrate=1895.4kbits/frame= 2076 fps= 30 q=30.0 size= 19450kB time=00:01:24.28 bitrate=1890.4kbits/frame= 2093 fps= 30 q=30.0 size= 19450kB time=00:01:25.12 bitrate=1871.9kbits/frame= 2106 fps= 30 q=30.0 size= 19450kB time=00:01:25.44 bitrate=1864.9kbits/frame= 2121 fps= 30 q=30.0 size= 19450kB time=00:01:26.08 bitrate=1851.0kbits/frame= 2138 fps= 30 q=30.0 size= 21652kB time=00:01:27.16 bitrate=2034.8kbits/frame= 2153 fps= 30 q=30.0 size= 21652kB time=00:01:27.52 bitrate=2026.6kbits/frame= 2174 fps= 30 q=30.0 size= 21652kB time=00:01:28.22 bitrate=2010.5kbits/frame= 2199 fps= 30 q=30.0 size= 21652kB time=00:01:29.34 bitrate=1985.2kbits/frame= 2234 fps= 31 q=30.0 size= 21652kB time=00:01:30.56 bitrate=1958.6kbits/frame= 2267 fps= 31 q=30.0 size= 24449kB time=00:01:32.19 bitrate=2172.5kbits/frame= 2325 fps= 31 q=30.0 size= 26927kB time=00:01:34.78 bitrate=2327.3kbits/frame= 2360 fps= 32 q=30.0 size= 26987kB time=00:01:36.38 bitrate=2293.7kbits/frame= 2381 fps= 32 q=30.0 size= 26987kB time=00:01:36.70 bitrate=2286.1kbits/frame= 2387 fps= 32 q=30.0 size= 26987kB time=00:01:37.15 bitrate=2275.6kbits/frame= 2406 fps= 32 q=30.0 size= 26987kB time=00:01:37.95 bitrate=2257.0kbits/frame= 2418 fps= 32 q=30.0 size= 26987kB time=00:01:38.65 bitrate=2240.9kbits/frame= 2424 fps= 31 q=30.0 size= 26987kB time=00:01:38.94 bitrate=2234.4kbits/frame= 2438 fps= 31 q=30.0 size= 26987kB time=00:01:39.00 bitrate=2232.9kbits/frame= 2457 fps= 31 q=30.0 size= 27762kB time=00:01:39.68 bitrate=2281.6kbits/frame= 2475 fps= 31 q=30.0 size= 27762kB time=00:01:40.44 bitrate=2264.1kbits/[matroska,webm @ 0x43eab40] Element at 0x30bc9d9 ending at 0x30bcea2 exceeds containing master element ending at 0x30bc9d3
frame= 2484 fps= 31 q=30.0 size= 27762kB time=00:01:40.57 bitrate=2261.3kbits/frame= 2484 fps= 30 q=-1.0 Lsize= 29127kB time=00:01:41.40 bitrate=2353.1kbits/s speed=1.24x
video:26726kB audio:2358kB subtitle:1kB other streams:0kB global headers:0kB muxing overhead: 0.144012%
[libx264 @ 0x44174c0] frame I:21 Avg QP:19.45 size:162120
[libx264 @ 0x44174c0] frame P:904 Avg QP:22.39 size: 20373
[libx264 @ 0x44174c0] frame B:1559 Avg QP:26.64 size: 3556
[libx264 @ 0x44174c0] consecutive B-frames: 2.1% 39.2% 10.4% 48.3%
[libx264 @ 0x44174c0] mb I I16..4: 17.6% 64.0% 18.4%
[libx264 @ 0x44174c0] mb P I16..4: 2.1% 3.4% 0.3% P16..4: 28.1% 6.8% 6.0% 0.0% 0.0% skip:53.3%
[libx264 @ 0x44174c0] mb B I16..4: 0.1% 0.1% 0.0% B16..8: 17.2% 1.0% 0.3% direct: 0.9% skip:80.3% L0:31.9% L1:64.0% BI: 4.1%
[libx264 @ 0x44174c0] 8x8 transform intra:59.6% inter:65.5%
[libx264 @ 0x44174c0] direct mvs spatial:99.8% temporal:0.2%
[libx264 @ 0x44174c0] coded y,uvDC,uvAC intra: 39.5% 48.7% 17.7% inter: 6.0% 7.1% 0.7%
[libx264 @ 0x44174c0] i16 v,h,dc,p: 26% 40% 11% 23%
[libx264 @ 0x44174c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 15% 23% 6% 7% 7% 8% 6% 10%
[libx264 @ 0x44174c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 17% 10% 7% 9% 9% 9% 9% 12%
[libx264 @ 0x44174c0] i8c dc,h,v,p: 48% 30% 16% 6%
[libx264 @ 0x44174c0] Weighted P-Frames: Y:3.2% UV:3.0%
[libx264 @ 0x44174c0] ref P L0: 68.9% 13.4% 12.4% 5.3% 0.1% 0.0%
[libx264 @ 0x44174c0] ref B L0: 83.2% 13.8% 3.0%
[libx264 @ 0x44174c0] ref B L1: 97.5% 2.5%
[libx264 @ 0x44174c0] kb/s:2203.41
root@VMHome:~/bin#
comment:5 by , 6 years ago
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
comment:7 by , 6 years ago
- My initial assessment was of course based upon the command line from the initial post (which involved a transport stream and a private option of the libzvbi_teletextdec decoder, hence my presumption that you are actually copying DVBSUB subtitles despite you claiming your subtitles to be text subtitles).
- Nevermind. It is essentially still the same issue:
a) Your new sample is weird: It only uses SimpleBlocks and only the video track contains keyframes; even the audio blocks are not marked as keyframes. mkvalidator complains a lot about this file and my patch doesn't change it (as it doesn't affect whether SimpleBlocks are considered keyframes or not).
b) Remuxing this file (there is actually no need to transcode the video at all, just drop it) creates a file where the subtitles are written in BlockGroups with a duration of zero. Not good, actually a bug, but not spec-incompliant. And mkvalidator's error message is bonkers, of course. - Btw: If you remux your sample with a current version of mkvmerge, your text subtitles will end up in BlockGroups with proper durations, but also ReferenceBlock elements which marks them as non-keyframes (I already opened an issue for this: https://gitlab.com/mbunkus/mkvtoolnix/issues/2541). If you remux mkvmerge's output with FFmpeg, you'll end up with a normal text subtitle. (But it's probably best not to let current FFmpeg touch the DVB subtitles: It will explicitly set its duration to zero and mkvmerge will keep it that way.)
- Last not least, it seems that fix_sub_duration doesn't do anything here. Which would be a ticket of its own.
Please test current FFmpeg git head and provide the command line you tested together with the complete, uncut console output and an input sample to make this a valid ticket.