Opened 10 years ago
Closed 9 years ago
#5056 closed defect (fixed)
Empty cues when converting ASS embedded in MKV to SRT
| Reported by: | eelco | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avcodec |
| Version: | git-master | Keywords: | ass |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
For some files, extracting ASS subtitles as SRT fails. All timestamps are in the output, but the text is empty.
I’ve tracked this down to the [Events] section and Format: line not being part of the extradata / subtitle_header. Looking at the specs at http://www.matroska.org/technical/specs/subtitles/ssa.html these lines don’t have to be part of the CodecPrivate element in an MKV, so I expect that’s what’s going on.
% ffmpeg -i sample.mkv -t 150 -f srt pipe:1
ffmpeg version N-76978-gfb1bf44 Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 7.0.0 (clang-700.1.76)
configuration: --prefix=/Users/eelco/Projects/Beamer/FFmpeg/build
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.101 / 57. 16.101
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 18.100 / 6. 18.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
Input #0, matroska,webm, from 'sample.mkv':
Metadata:
ENCODER : Lavf57.19.100
Duration: 00:55:57.79, bitrate: 0 kb/s
Stream #0:0(eng): Subtitle: ass (default)
Metadata:
ENCODER : Lavc57.16.101 ass
DURATION : 00:55:57.790000000
Output #0, srt, to 'pipe:1':
Metadata:
encoder : Lavf57.19.100
Stream #0:0(eng): Subtitle: subrip (srt) (default)
Metadata:
DURATION : 00:55:57.790000000
encoder : Lavc57.16.101 srt
Stream mapping:
Stream #0:0 -> #0:0 (ass (native) -> subrip (srt))
Press [q] to stop, [?] for help
1
00:01:28,948 --> 00:01:30,578
2
00:01:31,743 --> 00:01:33,953
3
00:02:16,496 --> 00:02:18,536
4
00:02:19,499 --> 00:02:21,209
5
00:02:22,710 --> 00:02:24,830
size= 0kB time=00:02:22.71 bitrate= 0.0kbits/s
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Attachments (1)
Change History (4)
by , 10 years ago
| Attachment: | sample.mkv added |
|---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Verified that http://ffmpeg.org/pipermail/ffmpeg-devel/2015-December/184515.html fixes this issue.
comment:3 by , 9 years ago
| Keywords: | srt removed |
|---|---|
| Priority: | important → normal |
| Resolution: | → fixed |
| Status: | new → closed |
Probably fixed by Rodger Combs in 3b32e1313c6d68aa10bc7d97ad505382def833b0



I managed to work around this issue by making sure that in
ff_ass_split_dialogifctx->current_sectionis not the"Events"section, to adjustctx->current_sectionand also setctx->field_orderandctx->field_numberfor the section (to the default).If this is the right direction for a solution, I’d be happy to send a patch to ffmpeg-devel.