New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mkv subtitles do not work since ffmpeg 5.1 merge #676
Comments
@bennettpeter What makes a video recording have "mkv subtitles"? Are you referring to the file type, video format or codec? Could you please post a clip illustrating the issue? The reason I ask is that video files with mkv subtitles seem to play fine in the video player on my v33 system, e.g. this mkv clip I made from an Xfinity Monterey ts type recording using Avidemuxer's MKV Muxer output format.
|
On 15/12/2022 3:22 pm, bshanteau wrote:
@bennettpeter <https://github.com/bennettpeter> What makes a video
recording have "mkv subtitles"? Are you referring to the file type,
video format or codec? Could you please post a clip illustrating the
issue?
The reason I ask is that video files with mkv subtitles seem to play
fine in the video player on my v33 system, e.g. this mkv clip I made
from an Xfinity Monterey ts type recording using Avidemuxer's MKV
Muxer output format.
mtb.mkv.zip <https://github.com/MythTV/mythtv/files/10233559/mtb.mkv.zip>
|$ mythffprobe mtb.mkv ffprobe version 5.1 Copyright (c) 2007-2022 the
FFmpeg developers built with gcc 11 (Ubuntu 11.3.0-1ubuntu1~22.04)
configuration: --arch=x86 --sysinclude=/usr/include --cc='ccache gcc'
--cxx='ccache g++' --ld=gcc --cpu=generic --target_os=linux
--pkg_config=pkg-config --prefix=/usr --libdir=/usr/lib --as=gcc
--objcc=gcc --dep_cc=gcc --host_cc=gcc --host_ld=gcc --ar=ar --nm='nm
-g' --ranlib='ranlib -D' --disable-cross-compile --enable-libmp3lame
--enable-libx264 --disable-libx265 --enable-libvpx --disable-libxvid
--enable-vdpau --enable-libxml2 --enable-libass --disable-dxva2
--enable-libbluray --disable-libfontconfig --disable-libfreetype
--disable-libiec61883 --disable-crystalhd --disable-sdl2
--disable-ffplay --enable-vaapi --enable-libdrm --enable-gnutls
--extra-cflags=' -w' --extra-ldflags= --extra-libs= --enable-stripping
--strip='echo skipping strip' --disable-manpages --disable-podpages
--disable-doc --disable-nvenc --enable-shared --disable-static
--enable-gpl --enable-pic --disable-demuxer=mpegtsraw
--disable-indev=dshow libavutil 57. 28.100 / 57. 28.100 libavcodec 59.
37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice
59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6.
7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56.
6.100 / 56. 6.100 [h264 @ 0x55dbc5de11c0] Increasing reorder buffer to
2 [h264 @ 0x55dbc5de11c0] Increasing reorder buffer to 3 Input #0,
matroska,webm, from 'mtb.mkv': Metadata: ENCODER : Lavf58.76.100
Duration: 00:00:20.13, start: 0.005000, bitrate: 3821 kb/s Stream
#0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR
16:9], Closed Captions, 59.94 fps, 59.94 tbr, 1k tbn (default)
Metadata: DURATION : 00:00:20.120000000 Stream #0:1(eng): Audio: ac3,
48000 Hz, 5.1(side), fltp, 128 kb/s (default) Metadata: DURATION :
00:00:20.134000000 Stream #0:2(spa): Audio: ac3, 48000 Hz, stereo,
fltp, 192 kb/s Metadata: DURATION : 00:00:20.133000000 |
—
Reply to this email directly, view it on GitHub
<#676 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOZ36CAN5MAXUNWDG7NMOLWNKMIFANCNFSM6AAAAAASTBGHDY>.
You are receiving this because you are subscribed to this
thread.Message ID: ***@***.***>
Here is an example of one with subs. yes they currently dont work on
HEAD android builds.
Mark
ffprobe version 5.1.2-1 Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-3)
configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, matroska,webm, from 'Reborn.Rich.S01E06.VIU.x264.1080p.mkv':
Metadata:
title : MkvDrama.Org
ENCODED_BY : MkvDrama.Org
creation_time : 2022-11-27T15:44:27.000000Z
COMMENT : Download From - MkvDrama.Org
ENCODER : Lavf59.4.101
Duration: 01:14:06.59, start: 0.000000, bitrate: 1829 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 29.97 fps, 29.97 tbr, 1k tbn (default)
Metadata:
ENCODER : Lavc59.4.101 libx264
BPS : 1756742
DURATION : 01:14:06.409000000
NUMBER_OF_FRAMES: 133259
NUMBER_OF_BYTES : 976399489
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1: Audio: aac (HE-AAC), 48000 Hz, stereo, fltp (default)
Metadata:
ENCODER : Lavc59.4.101 libfdk_aac
BPS : 69818
DURATION : 01:14:06.592000000
NUMBER_OF_FRAMES: 104217
NUMBER_OF_BYTES : 38806521
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:2(eng): Subtitle: subrip (default)
Metadata:
title : English
BPS : 58
DURATION : 01:13:11.020000000
NUMBER_OF_FRAMES: 974
NUMBER_OF_BYTES : 31984
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:3(ind): Subtitle: subrip
Metadata:
title : Indonesian
BPS : 59
DURATION : 01:13:11.020000000
NUMBER_OF_FRAMES: 974
NUMBER_OF_BYTES : 32779
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:4(may): Subtitle: subrip
Metadata:
title : Malay
BPS : 61
DURATION : 01:13:11.020000000
NUMBER_OF_FRAMES: 975
NUMBER_OF_BYTES : 33573
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:5(tha): Subtitle: subrip
Metadata:
title : Thai
BPS : 144
DURATION : 01:13:11.020000000
NUMBER_OF_FRAMES: 974
NUMBER_OF_BYTES : 79347
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:6(chi): Subtitle: subrip
Metadata:
title : Simplified Chinese
BPS : 47
DURATION : 01:12:09.119000000
NUMBER_OF_FRAMES: 981
NUMBER_OF_BYTES : 25819
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:7(chi): Subtitle: subrip
Metadata:
title : Traditional Chinese
BPS : 47
DURATION : 01:12:09.119000000
NUMBER_OF_FRAMES: 981
NUMBER_OF_BYTES : 25664
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
|
@mspieth Where?
|
On 15/12/2022 8:11 pm, bshanteau wrote:
@mspieth <https://github.com/mspieth> Where?
Here is an example of one with subs. yes they currently dont work
on HEAD android builds.
Try #2. It was in my sent mail correctly but formatted.
fprobe version 5.1.2-1 Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-3)
configuration: --prefix=/usr --extra-version=1 --toolchain=hardened
--libdir=/usr/lib/x86_64-linux-gnu
--incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl
--disable-stripping --enable-gnutls --enable-ladspa --enable-libaom
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite
--enable-libfontconfig --enable-libfreetype --enable-libfribidi
--enable-libglslang --enable-libgme --enable-libgsm --enable-libjack
--enable-libmp3lame --enable-libmysofa --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse
--enable-librabbitmq --enable-librist --enable-librubberband
--enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex
--enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora
--enable-libtwolame --enable-libvidstab --enable-libvorbis
--enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2
--enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi
--enable-lv2 --enable-omx --enable-openal --enable-opencl
--enable-opengl --enable-sdl2 --disable-sndio --enable-pocketsphinx
--enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm
--enable-libiec61883 --enable-chromaprint --enable-frei0r
--enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, matroska,webm, from 'test.mkv':
Metadata:
title : Title
ENCODED_BY : Encoder
creation_time : 2022-11-27T15:44:27.000000Z
COMMENT : Comment
ENCODER : Lavf59.4.101
Duration: 01:14:06.59, start: 0.000000, bitrate: 1829 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080,
29.97 fps, 29.97 tbr, 1k tbn (default)
Metadata:
ENCODER : Lavc59.4.101 libx264
BPS : 1756742
DURATION : 01:14:06.409000000
NUMBER_OF_FRAMES: 133259
NUMBER_OF_BYTES : 976399489
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1: Audio: aac (HE-AAC), 48000 Hz, stereo, fltp (default)
Metadata:
ENCODER : Lavc59.4.101 libfdk_aac
BPS : 69818
DURATION : 01:14:06.592000000
NUMBER_OF_FRAMES: 104217
NUMBER_OF_BYTES : 38806521
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:2(eng): Subtitle: subrip (default)
Metadata:
title : English
BPS : 58
DURATION : 01:13:11.020000000
NUMBER_OF_FRAMES: 974
NUMBER_OF_BYTES : 31984
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:3(ind): Subtitle: subrip
Metadata:
title : Indonesian
BPS : 59
DURATION : 01:13:11.020000000
NUMBER_OF_FRAMES: 974
NUMBER_OF_BYTES : 32779
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:4(may): Subtitle: subrip
Metadata:
title : Malay
BPS : 61
DURATION : 01:13:11.020000000
NUMBER_OF_FRAMES: 975
NUMBER_OF_BYTES : 33573
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:5(tha): Subtitle: subrip
Metadata:
title : Thai
BPS : 144
DURATION : 01:13:11.020000000
NUMBER_OF_FRAMES: 974
NUMBER_OF_BYTES : 79347
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:6(chi): Subtitle: subrip
Metadata:
title : Simplified Chinese
BPS : 47
DURATION : 01:12:09.119000000
NUMBER_OF_FRAMES: 981
NUMBER_OF_BYTES : 25819
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:7(chi): Subtitle: subrip
Metadata:
title : Traditional Chinese
BPS : 47
DURATION : 01:12:09.119000000
NUMBER_OF_FRAMES: 981
NUMBER_OF_BYTES : 25664
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-27 15:44:27
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
|
@bshanteau I posted a sample video in my original posting. Look at the end of the first posting which created the issue. There is a link. The video is created using HandBrakeCLI from a MythTV recording. Handbrake converts the CC captions into mkv text subtitles The mythffprobe you posted shows a video that does not have subtitles, only 1 video and 2 audio streams, so I don't understand how you are seeing subtitles with it. You should see something like this in your ffprobe |
The problem is that ffmpeg 4.2 converts the text subtitles to libass format, then mythfrontend uses libass to display them. FFmpeg 5.1 has deprecated the code and now converts them to an ass format that is nowhere documented. Example: subtitle from ffmpeg 5.1 The ffmpeg 4 string corresponds to what is documented for ass subtitle format see http://www.tcax.org/docs/ass-specs.htm ffmpeg docs have no information on this. Comments in the ffmpeg 4 code indicate it is converting to old deprecated format. ffmpeg 5 removes that conversion code. |
This commit offers some hint at why they changed it? Looks like the timing information is now in the AVSubtitles fields. |
@bennettpeter wrote:
I see it now. Thanks.
Subtitles are mentioned in the video stream: This is a screenshot of VLC displaying subtitles as "Sub Track: Closed Captions 1": |
@bshanteau Not to confuse the issue at hand I think you have your closed caption data embedded in the video stream that ATSC broadcasts seem to use. I think it's the CTA-708 standard. Peter is probably expecting the subtitles in a separate data stream which is what we typically see at least here in the UK. |
On 15/12/2022 8:11 pm, bshanteau wrote:
@mspieth <https://github.com/mspieth> Where?
Here is an example of one with subs. yes they currently dont work
on HEAD android builds.
Message ID: ***@***.***>
@bshanteau I dont know why it didnt show up. Must be flagged as spam.
mkv subtitles are working now!
Thank you very much Peter!
Ive got an update to libass in the for android works. Needs harfbuzz.
looks ok so far.
Anything else I should look at during my vacation time?
Also should we change the font or allow the font to be selectable?
courier is a bit hard to read IMO.
Mark
|
On Linux I don't see the font as courier. Perhaps fonts are missing on Android? Input #0, matroska,webm, from '/home/storage/Video/mythtv-local/Videos/coroner.mkv': |
Platform:
Ubuntu 22.04
MythTV version:
v33-Pre-1003-gdc4d4f068d
Package version:
Component:
Player
What steps will reproduce the bug?
Add a mkv format video with text subtitles to the videos storage group. While playing select the menu option to display subtitles. No subtitles appear.
How often does it reproduce? Is there a required condition?
Happens since commit a1868de. Before that it worked correctly.
What is the expected behaviour?
Subttles show
What do you see instead?
No subtitles
Additional information
Sample video: https://drive.google.com/file/d/1z53Zae3TbVXQfDgxIfv6dL2eycI4F1z-/view?usp=share_link
This bug is mentioned in #639 (comment)
The text was updated successfully, but these errors were encountered: