1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
FFmpeg/doc
Clément Bœsch 7c1a002c78 subtitles: introduce ASS codec id and use it.
Currently, we have a AV_CODEC_ID_SSA, which matches the way the ASS/SSA
markup is muxed in a standalone .ass/.ssa file. This means the AVPacket
data starts with a "Dialogue:" string, followed by a timing information
(start and end of the event as string) and a trailing CRLF after each
line. One packet can contain several lines. We'll refer to this layout
as "SSA" or "SSA lines".

In matroska, this markup is not stored as such: it has no "Dialogue:"
prefix, it contains a ReadOrder field, the timing information is not in
the payload, and it doesn't contain the trailing CRLF. See [1] for more
info. We'll refer to this layout as "ASS".

Since we have only one common codec for both formats, the matroska
demuxer is constructing an AVPacket following the "SSA lines" format.
This causes several problems, so it was decided to change this into
clean ASS packets.

Some insight about what is changed or unchanged in this commit:

  CODECS
  ------

  - the decoding process still writes "SSA lines" markup inside the ass
    fields of the subtitles rectangles (sub->rects[n]->ass), which is
    still the current common way of representing decoded subtitles
    markup. It is meant to change later.

  - new ASS codec id: AV_CODEC_ID_ASS (which is different from the
    legacy AV_CODEC_ID_SSA)

  - lavc/assdec: the "ass" decoder is renamed into "ssa" (instead of
    "ass") for consistency with the codec id and allows to add a real
    ass decoder. This ass decoder receives clean ASS lines (so it starts
    with a ReadOrder, is followed by the Layer, etc). We make sure this
    is decoded properly in a new ass-line rectangle of the decoded
    subtitles (the ssa decoder OTOH is doing a simple straightforward
    copy). Using the packet timing instead of data string makes sure the
    ass-line now contains the appropriate timing.

  - lavc/assenc: just like the ass decoder, the "ssa" encoder is renamed
    into "ssa" (instead of "ass") for consistency with the codec id, and
    allows to add a real "ass" encoder.

    One important thing about this encoder is that it only supports one
    ass rectangle: we could have put several dialogue events in the
    AVPacket (separated by a \0 for instance) but this would have cause
    trouble for the muxer which needs not only the start time, but also
    the duration: typically, you have merged events with the same start
    time (stored in the AVPacket->pts) but a different duration. At the
    moment, only the matroska do the merge with the SSA-line codec.

    We will need to make sure all the decoders in the future can't add
    more than one rectangle (and only one Dialogue line in it
    obviously).

  FORMATS
  -------

  - lavf/assenc: the .ass/.ssa muxer can take both SSA and ASS packets.
    In the case of ASS packets as input, it adds the timing based on the
    AVPacket pts and duration, and mux it with "Dialogue:", trailing
    CRLF, etc.

  - lavf/assdec: unchanged; it currently still only outputs SSA-lines
    packets.

  - lavf/mkv: the demuxer can now output ASS packets without the need of
    any "SSA-lines" reconstruction hack. It will become the default at
    next libavformat bump, and the SSA support will be dropped from the
    demuxer. The muxer can take ASS packets since it's muxed normally,
    and still supports the old SSA packets. All the SSA support and
    hacks in Matroska code will be dropped at next lavf bump.

[1]: http://www.matroska.org/technical/specs/subtitles/ssa.html
2013-04-18 23:23:59 +02:00
..
doxy doc: support the new website layout 2012-10-08 11:22:42 +02:00
examples examples/filtering_audio: fix frame leak. 2013-04-18 17:03:01 +02:00
all-components.texi doc: merge syntax.texi, eval.texi and opencl.texi into utils.texi 2013-04-12 18:21:57 +02:00
APIchanges subtitles: introduce ASS codec id and use it. 2013-04-18 23:23:59 +02:00
authors.texi doc: use a common authors.texi file blurb 2012-12-19 09:33:43 +01:00
avtools-common-opts.texi doc: document -opencl_options option in ff* tools manuals 2013-04-14 20:30:34 +02:00
avutil.txt
bitstream_filters.texi doc: Fix some obsolete references to av* tools as ff* tools 2013-02-18 13:04:29 +01:00
build_system.txt
codecs.texi doc: move ffmpeg-codecs.texi content to separated file 2013-04-05 10:11:57 +02:00
decoders.texi doc/decoders: fix typo in "@Options" 2012-12-06 10:16:10 +01:00
default.css doc/default.css: use ffmpeg.org website CSS 2012-12-22 00:38:48 +01:00
demuxers.texi lavf: add libquvi demuxer. 2013-04-10 12:09:20 +02:00
developer.texi Merge commit 'a862c7d3368241e72a465ab944afa38ea62a6640' 2013-04-06 13:23:38 +02:00
devices.texi doc: move ffmpeg-devices.texi content to separated file 2013-04-05 10:11:57 +02:00
doxy-wrapper.sh doc: add apidoc target for doxygen API documentation 2012-11-02 18:28:56 +01:00
Doxyfile doxygen: dont strip code comments 2013-03-31 22:34:13 +02:00
encoders.texi doc/encoders: Clarify that there are 2 prores encoders 2013-04-11 23:13:34 +02:00
errno.txt
faq.texi lavfi: deprecate aconvert. 2013-04-11 22:13:45 +02:00
fate_config.sh.template doc/fate: Move fate config example into doc subdirectory 2012-09-29 19:27:01 +02:00
fate.texi doc/fate.texi: fix typo 2013-04-03 21:07:15 +02:00
ffmpeg-bitstream-filters.texi doc: extend "See Also" chapters in component manuals 2012-12-19 09:33:44 +01:00
ffmpeg-codecs.texi doc: move ffmpeg-codecs.texi content to separated file 2013-04-05 10:11:57 +02:00
ffmpeg-devices.texi doc: move ffmpeg-devices.texi content to separated file 2013-04-05 10:11:57 +02:00
ffmpeg-filters.texi doc: extend "See Also" chapters in component manuals 2012-12-19 09:33:44 +01:00
ffmpeg-formats.texi doc: move ffmpeg-formats.texi content to separated file 2013-04-05 10:11:57 +02:00
ffmpeg-protocols.texi doc: extend "See Also" chapters in component manuals 2012-12-19 09:33:44 +01:00
ffmpeg-resampler.texi doc: move ffmpeg-resampler.texi content to separated file 2013-04-05 10:11:57 +02:00
ffmpeg-scaler.texi doc: move ffmpeg-scaler.texi content to separated file 2013-04-05 10:11:57 +02:00
ffmpeg-utils.texi doc: merge syntax.texi, eval.texi and opencl.texi into utils.texi 2013-04-12 18:21:57 +02:00
ffmpeg.texi doc: enable compilation of -all tool pages 2013-04-05 10:11:57 +02:00
ffmpeg.txt
ffplay.texi doc: enable compilation of -all tool pages 2013-04-05 10:11:57 +02:00
ffprobe.texi doc: enable compilation of -all tool pages 2013-04-05 10:11:57 +02:00
ffprobe.xsd ffprobe: remove deprecated frame "reference" field 2013-03-17 00:27:48 +01:00
ffserver.conf Merge commit 'bf5f46b4cc47b7a4568119f224057d4ff91b6cdd' 2012-11-16 13:07:10 +01:00
ffserver.texi doc: enable compilation of -all tool pages 2013-04-05 10:11:57 +02:00
filter_design.txt doc: Consistently use 'frame rate' everywhere 2013-03-31 18:22:08 -04:00
filters.texi colorchannelmixer filter 2013-04-18 15:31:35 +00:00
formats.texi doc: move ffmpeg-formats.texi content to separated file 2013-04-05 10:11:57 +02:00
general.texi EVRC decoder 2013-01-21 10:24:45 +00:00
git-howto.texi doc: git-howto: Leave reviewers time to react before pushing patches 2012-11-11 20:43:28 +01:00
git-howto.txt
indevs.texi doc: Consistently use 'frame rate' everywhere 2013-03-31 18:22:08 -04:00
issue_tracker.txt
libavcodec.texi doc: extend "See Also" chapters in library manuals 2012-12-19 09:33:44 +01:00
libavdevice.texi doc: extend "See Also" chapters in library manuals 2012-12-19 09:33:44 +01:00
libavfilter.texi doc: extend "See Also" chapters in library manuals 2012-12-19 09:33:44 +01:00
libavformat.texi doc: extend "See Also" chapters in library manuals 2012-12-19 09:33:44 +01:00
libavutil.texi doc/libavutil: remove include of opencl.texi 2013-04-12 18:21:57 +02:00
libswresample.texi doc: extend "See Also" chapters in library manuals 2012-12-19 09:33:44 +01:00
libswscale.texi doc: extend "See Also" chapters in library manuals 2012-12-19 09:33:44 +01:00
Makefile doc: enable compilation of -all tool pages 2013-04-05 10:11:57 +02:00
metadata.texi
mips.txt mips: Optimization of AAC psychoacoustic model functions 2013-03-23 16:19:38 +01:00
multithreading.txt Merge commit '759001c534287a96dc96d1e274665feb7059145d' 2013-03-12 03:23:28 +01:00
muxers.texi Merge commit '9e6b5e61a0c91e25e298d0a21b189c4c95443795' 2013-04-11 21:50:53 +02:00
nut.texi Drop Snow codec 2013-01-06 16:30:02 +01:00
optimization.txt Merge commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f' 2013-01-23 17:44:56 +01:00
outdevs.texi doc: Fix some obsolete references to av* tools as ff* tools 2013-02-18 13:04:29 +01:00
platform.texi Merge remote-tracking branch 'qatar/master' 2013-03-31 11:31:19 +02:00
print_options.c Merge remote-tracking branch 'qatar/master' 2013-03-18 17:43:43 +01:00
protocols.texi rtsp: add option to set the socket timeout of the lower protocol. 2013-04-08 17:45:13 +02:00
rate_distortion.txt miscellaneous typo fixes 2012-12-21 00:18:34 +01:00
RELEASE_NOTES doc: update release_notes by taking the ones from release/1.2 2013-03-19 16:21:26 +01:00
resampler.texi doc: move ffmpeg-resampler.texi content to separated file 2013-04-05 10:11:57 +02:00
scaler.texi doc: move ffmpeg-scaler.texi content to separated file 2013-04-05 10:11:57 +02:00
snow.txt Drop Snow codec 2013-01-06 16:30:02 +01:00
soc.txt
swresample.txt Fix a few "its" vs "it's" typo. 2013-02-14 23:45:48 +01:00
swscale.txt x86: mmx2 ---> mmxext in comments and messages 2012-10-31 00:37:42 +01:00
t2h.init Merge commit 'f90ff772e7e35b4923c2de429d1fab9f2569b568' 2013-01-27 13:32:56 +01:00
tablegen.txt
texi2pod.pl doc/texi2pod.pl: skip printing chapter names if they are disabled 2013-03-30 16:58:45 +01:00
utils.texi doc/utils: use @code markup for opencl function names. 2013-04-12 23:10:59 +02:00
viterbi.txt miscellaneous typo fixes 2012-12-21 00:18:34 +01:00