Opened 10 years ago

Last modified 7 years ago

#3247 open enhancement

Transparent subtitle outlines (IDX/SUB) upon conversion to XSUB become solid, and colors become b&w

Reported by: userid99 Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: xsub
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:

Transparent subtitle outlines (IDX/SUB) upon conversion to XSUB become solid, and colors become black and white.

How to reproduce:

ffmpeg -v 9 -loglevel 99 -report -i transpidx.avi -i t

ranspidx.idx -vcodec copy -an transpxsub.avi

Attachments (2)

transpidx.idx (1.3 KB ) - added by userid99 10 years ago.
input idx file
transpidx.sub (12.0 KB ) - added by userid99 10 years ago.
input sub file

Download all attachments as: .zip

Change History (7)

by userid99, 10 years ago

Attachment: transpidx.idx added

input idx file

by userid99, 10 years ago

Attachment: transpidx.sub added

input sub file

comment:1 by Carl Eugen Hoyos, 10 years ago

Is this a regression?

in reply to:  1 comment:2 by userid99, 10 years ago

Replying to cehoyos:

Is this a regression?

No

comment:3 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavcodec
Keywords: xsub added
Priority: importantnormal
Reproduced by developer: set

For future tickets:
Please always provide a command line that allows to reproduce the problem including its complete, uncut console output.
Please do not provide output files unless a developer is unable to reproduce and asks for the output file.
Please do not attach more input files than necessary, it imo only leads to confusion.

This is currently a bug because the intended warning in the code is not shown, this will be fixed soon.

$ ffmpeg -f lavfi -i testsrc -i transpidx.idx -scodec xsub -t 14 out.avi
ffmpeg version N-59400-g8335016 Copyright (c) 2000-2013 the FFmpeg developers
  built on Dec 28 2013 22:21:53 with gcc 4.3 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      52. 59.100 / 52. 59.100
  libavcodec     55. 46.100 / 55. 46.100
  libavformat    55. 22.100 / 55. 22.100
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  0.103 /  4.  0.103
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #1, vobsub, from 'transpidx.idx':
  Duration: N/A, bitrate: N/A
    Stream #1:0[0x0](de): Subtitle: dvd_subtitle, 640x480 (default)
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf55.22.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream #0:1(de): Subtitle: xsub (DXSB / 0x42535844), 640x480 (default)
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
  Stream #1:0 -> #0:1 (dvdsub -> xsub)
Press [q] to stop, [?] for help
[avi @ 0x91f31e0] Encoder did not produce proper pts, making some up.
frame=  350 fps=206 q=2.6 Lsize=     559kB time=00:00:14.00 bitrate= 326.9kbi

The following work as expected
$ ffmpeg -f lavfi -i testsrc -i transpidx.idx -scodec dvbsub -t 14 out.ts
$ ffmpeg -f lavfi -i testsrc -i transpidx.idx -scodec dvdsub -t 14 out.vob
although the last frames look different with ffplay indicating a possible problem.

Last edited 10 years ago by Carl Eugen Hoyos (previous) (diff)

comment:4 by Carl Eugen Hoyos, 10 years ago

Priority: normalwish
Status: newopen
Type: defectenhancement

A warning is now - since de40905f - shown (as originally intended) if the transparency gets messed up when encoding xsub.

comment:5 by Elon Musk, 7 years ago

xsub, with tag DXSB does not support alpha. It knows only about background which is always transparent and foreground which is not transparent.
DXSA on other hand have support for alpha, but xsub encoder does not support it.

Note: See TracTickets for help on using tickets.