#6769 closed defect (fixed)
DVB_SUBTITLE convertion fail
Reported by: | Samuel | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | dvbsub |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
While trying to encode the PGS subtitle to DVB_SUBTITLE, and stream copy the video and audio streams into a Matroska container, the subtitle conversion fail.
How to reproduce:
% ffmpeg -fflags +genpts -i Girl_With_The_Dragon_Tattoo_PGS.mkv -c copy -c:s dvb_subtitle -f matroska PGS_DVBSUB.mkv
ffmpeg version N-87263-g86eb50549a Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.4.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-avisynth --enable-fontconfig --enable-gnutls --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-opengl --disable-outdev=sdl2 --enable-w32threads --disable-dxva2 --disable-debug --pkg-config-flags=--static --extra-ldflags=-static --extra-cflags='-mtune=generic -mfpmath=sse -msse' --cpu=i686 --optflags='-O2 -finline-functions' libavutil 55. 74.100 / 55. 74.100 libavcodec 57.105.100 / 57.105.100 libavformat 57. 82.100 / 57. 82.100 libavdevice 57. 8.100 / 57. 8.100 libavfilter 6.105.100 / 6.105.100 libswscale 4. 7.103 / 4. 7.103 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100 Splitting the commandline. Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'. Reading option '-fflags' ... matched as AVOption 'fflags' with argument '+genpts'. Reading option '-i' ... matched as input url with argument 'Girl_With_The_Dragon_Tattoo_PGS.mkv'. Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'. Reading option '-c:s' ... matched as option 'c' (codec name) with argument 'dvb_subtitle'. Reading option '-f' ... matched as option 'f' (force format) with argument 'matroska'. Reading option 'PGS_DVBSUB.mkv' ... matched as output url. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Finished splitting the commandline. Parsing a group of options: global . Applying option v (set logging level) with argument 9. Applying option loglevel (set logging level) with argument 99. Applying option y (overwrite output files) with argument 1. Applying option report (generate a report) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url Girl_With_The_Dragon_Tattoo_PGS.mkv. Successfully parsed a group of options. Opening an input file: Girl_With_The_Dragon_Tattoo_PGS.mkv. [NULL @ 07921300] Opening 'Girl_With_The_Dragon_Tattoo_PGS.mkv' for reading [file @ 07921da0] Setting default whitelist 'file,crypto' [matroska,webm @ 07921300] Format matroska,webm probed with size=2048 and score=100 st:0 removing common factor 1000000 from timebase st:1 removing common factor 1000000 from timebase [matroska,webm @ 07921300] Before avformat_find_stream_info() pos: 813 bytes read:32768 seeks:0 nb_streams:2 [matroska,webm @ 07921300] All info found [matroska,webm @ 07921300] After avformat_find_stream_info() pos: 527733 bytes read:558878 seeks:0 frames:30 Input #0, matroska,webm, from 'Girl_With_The_Dragon_Tattoo_PGS.mkv': Metadata: ENCODER : Lavf52.84.0 Duration: 00:00:02.00, start: 0.042000, bitrate: 2930 kb/s Chapter #0:0: start 0.000000, end 2.000000 Metadata: TITLE : Chapter 14 Stream #0:0, 29, 1/1000: Video: mpeg4 (Simple Profile), 1 reference frame, yuv420p(left), 1920x1080 [SAR 1:1 DAR 16:9], 0/1, 23.98 fps, 23.98 tbr, 1k tbn, 24k tbc (default) Stream #0:1(eng), 1, 1/1000: Subtitle: hdmv_pgs_subtitle, 1920x1080 (default) Successfully opened the file. Parsing a group of options: output url PGS_DVBSUB.mkv. Applying option c (codec name) with argument copy. Applying option c:s (codec name) with argument dvb_subtitle. Applying option f (force format) with argument matroska. Successfully parsed a group of options. Opening an output file: PGS_DVBSUB.mkv. Matched encoder 'dvbsub' for codec 'dvb_subtitle'. [file @ 0794d6c0] Setting default whitelist 'file,crypto' Successfully opened the file. Output #0, matroska, to 'PGS_DVBSUB.mkv': Metadata: encoder : Lavf57.82.100 Chapter #0:0: start 0.000000, end 1.958000 Metadata: TITLE : Chapter 14 Stream #0:0, 0, 1/1000: Video: mpeg4 (Simple Profile), 1 reference frame (FMP4 / 0x34504D46), yuv420p(left), 1920x1080 (0x0) [SAR 1:1 DAR 16:9], 0/1, q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default) Stream #0:1(eng), 0, 1/1000: Subtitle: dvb_subtitle (dvbsub) ([255][255][255][255] / 0xFFFFFFFF), 1920x1080 (default) Metadata: LANGUAGE : eng encoder : Lavc57.105.100 dvbsub Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (hdmv_pgs_subtitle (pgssub) -> dvb_subtitle (dvbsub)) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) Subtitle encoding failed [AVIOContext @ 07ac2460] Statistics: 0 seeks, 0 writeouts [AVIOContext @ 07929f20] Statistics: 591646 bytes read, 0 seeks Conversion failed!
Attachments (2)
Change History (9)
by , 7 years ago
Attachment: | DVBSUB_test_Delay_cutted.ts added |
---|
comment:1 by , 7 years ago
% ffmpeg -fflags +genpts -i Girl_With_The_Dragon_Tattoo_PGS.mkv -c copy -c:s dvb_subtitle -f matroska PGS_DVBSUB.mkv
ffmpeg version N-88042-g72c3d9ae45 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-avisynth --enable-fontconfig --enable-gnutls --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-opengl --enable-w32threads --disable-dxva2 --disable-debug --pkg-config-flags=--static --extra-ldflags=-static --extra-cflags='-mtune=generic -mfpmath=sse -msse' --cpu=i686 --optflags='-O2 -finline-functions'
libavutil 56. 0.100 / 56. 0.100
libavcodec 58. 0.100 / 58. 0.100
libavformat 58. 0.100 / 58. 0.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 0.100 / 7. 0.100
libswscale 5. 0.100 / 5. 0.100
libswresample 3. 0.100 / 3. 0.100
libpostproc 55. 0.100 / 55. 0.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-fflags' ... matched as AVOption 'fflags' with argument '+genpts'.
Reading option '-i' ... matched as input url with argument 'Girl_With_The_Dragon_Tattoo_PGS.mkv'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s' ... matched as option 'c' (codec name) with argument 'dvb_subtitle'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'matroska'.
Reading option 'PGS_DVBSUB.mkv' ... matched as output url.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Applying option loglevel (set logging level) with argument 99.
Applying option y (overwrite output files) with argument 1.
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url Girl_With_The_Dragon_Tattoo_PGS.mkv.
Successfully parsed a group of options.
Opening an input file: Girl_With_The_Dragon_Tattoo_PGS.mkv.
[NULL @ 07941340] Opening 'Girl_With_The_Dragon_Tattoo_PGS.mkv' for reading
[file @ 07941e00] Setting default whitelist 'file,crypto'
[matroska,webm @ 07941340] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
[matroska,webm @ 07941340] Before avformat_find_stream_info() pos: 813 bytes read:32768 seeks:0 nb_streams:2
[matroska,webm @ 07941340] All info found
[matroska,webm @ 07941340] After avformat_find_stream_info() pos: 527733 bytes read:558878 seeks:0 frames:30
Input #0, matroska,webm, from 'Girl_With_The_Dragon_Tattoo_PGS.mkv':
Metadata:
ENCODER : Lavf52.84.0
Duration: 00:00:02.00, start: 0.042000, bitrate: 2930 kb/s
Chapter #0:0: start 0.000000, end 2.000000
Metadata:
TITLE : Chapter 14
Stream #0:0, 29, 1/1000: Video: mpeg4 (Simple Profile), 1 reference frame, yuv420p(left), 1920x1080 [SAR 1:1 DAR 16:9], 0/1, 23.98 fps, 23.98 tbr, 1k tbn, 24k tbc (default)
Stream #0:1(eng), 1, 1/1000: Subtitle: hdmv_pgs_subtitle, 1920x1080 (default)
Successfully opened the file.
Parsing a group of options: output url PGS_DVBSUB.mkv.
Applying option c (codec name) with argument copy.
Applying option c:s (codec name) with argument dvb_subtitle.
Applying option f (force format) with argument matroska.
Successfully parsed a group of options.
Opening an output file: PGS_DVBSUB.mkv.
Matched encoder 'dvbsub' for codec 'dvb_subtitle'.
[file @ 07ad0e00] Setting default whitelist 'file,crypto'
Successfully opened the file.
Output #0, matroska, to 'PGS_DVBSUB.mkv':
Metadata:
encoder : Lavf58.0.100
Chapter #0:0: start 0.000000, end 1.958000
Metadata:
TITLE : Chapter 14
Stream #0:0, 0, 1/1000: Video: mpeg4 (Simple Profile), 1 reference frame (FMP4 / 0x34504D46), yuv420p(left), 1920x1080 (0x0) [SAR 1:1 DAR 16:9], 0/1, q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
Stream #0:1(eng), 0, 1/1000: Subtitle: dvb_subtitle (dvbsub) ([255][255][255][255] / 0xFFFFFFFF), 1920x1080 (default)
Metadata:
LANGUAGE : eng
encoder : Lavc58.0.100 dvbsub
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (hdmv_pgs_subtitle (pgssub) -> dvb_subtitle (dvbsub))
Press [q] to stop, ? for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Subtitle encoding failed
[AVIOContext @ 0796d5c0] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 07949f60] Statistics: 591646 bytes read, 0 seeks
Conversion failed!
comment:2 by , 7 years ago
As a side note:
Convert to == dvd_subtitle == worked, but the subtitle are not "clear" as the original one, the white letters don't have accurate form, black little part are found on the letters of the converted subtitle, making it less nice, less readable.
comment:4 by , 7 years ago
Keywords: | dvbsub added; dvb_subtitle removed |
---|---|
Reproduced by developer: | set |
Status: | new → open |
The original patch that was supposed to fix this issue can be found here:
http://ffmpeg.org/pipermail/ffmpeg-devel/2011-September/115165.html
It was not completely applied:
8a6799d20545e07c74148c67de6c3290a2485269
I have sent a patch that adds the missing hunk and fixes a bug in the rle code (missing line separator). The patch does not allow playback for all players I tested (including FFplay) but since some players show something, I believe the patch is not completely broken.
comment:5 by , 7 years ago
Fixed in 6e1654768585692e327343059b35695b6123444a
A better sample to test is attached to ticket #4637 (needs -fix_sub_duration
).
comment:6 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
comment:7 by , 7 years ago
That was fast. Thank you very much +1
Now, we only miss the PGS encoder ;)
DVB_SUBTITLE_conversion_failure