Go to file
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
compat Provide local copies of AviSynth's and AvxSynth's requisite headers in compat/avisynth/. 2013-03-21 04:23:24 +01:00
doc subtitles: introduce ASS codec id and use it. 2013-04-18 23:23:59 +02:00
libavcodec subtitles: introduce ASS codec id and use it. 2013-04-18 23:23:59 +02:00
libavdevice avdevice/lavfi: add error checking for av_opt_set_int_list() 2013-04-12 20:39:07 +02:00
libavfilter colorchannelmixer filter 2013-04-18 15:31:35 +00:00
libavformat subtitles: introduce ASS codec id and use it. 2013-04-18 23:23:59 +02:00
libavresample Merge commit 'b6649ab5037fb55f78c2606f3d23cea0867cdeaa' 2013-03-28 11:20:41 +01:00
libavutil lavu: add av_clipd_c 2013-04-18 14:38:21 +00:00
libpostproc lavfi/pp: switch to an AVOptions-based system. 2013-04-10 23:16:03 +02:00
libswresample swr/rematrix: use av_calloc() 2013-04-15 20:31:06 +02:00
libswscale Fix libswscale compilation with --disable-optimizations on x86-32. 2013-04-18 12:47:16 +02:00
presets presets: specify the codecs. 2012-05-04 18:40:36 +02:00
tests fate: hot fix for gif failure. 2013-04-18 01:41:23 +02:00
tools Merge commit '38f0c0781a6e099f11c0acec07f9b8be742190c4' 2013-04-11 23:50:39 +02:00
.gitignore Merge commit 'a862c7d3368241e72a465ab944afa38ea62a6640' 2013-04-06 13:23:38 +02:00
arch.mak Merge commit 'b326755989b346d0d935e0628e8865f9b2951c30' 2012-12-08 14:24:16 +01:00
Changelog subtitles: introduce ASS codec id and use it. 2013-04-18 23:23:59 +02:00
cmdutils_common_opts.h cmdutils_common_opts: fix indention of #if 2013-04-11 16:07:46 +02:00
cmdutils.c cmdutils: make the "-help filter=" output less confusing 2013-04-18 13:03:00 +02:00
cmdutils.h Merge commit 'e19e8aeeaaff3d4bc8f6065764c93f0298782ac6' 2013-04-12 15:56:20 +02:00
common.mak Integrate lcov/gcov into Libav 2013-04-05 18:55:11 +02:00
configure Fix pgc compilation with --disable-optimizations. 2013-04-18 02:20:04 +02:00
COPYING.GPLv2 Rename COPYING.GPL --> COPYING.GPLv2 and COPYING.LGPL --> COPYING.LGPLv2.1. 2009-06-05 09:51:31 +00:00
COPYING.GPLv3 Add configure option to upgrade (L)GPL to version 3. 2009-06-05 11:04:03 +00:00
COPYING.LGPLv2.1 cosmetics: Delete empty lines at end of file. 2012-02-09 12:26:45 +01:00
COPYING.LGPLv3 Add configure option to upgrade (L)GPL to version 3. 2009-06-05 11:04:03 +00:00
CREDITS CREDITS: redirect to Git log, remove current outdated content 2013-01-31 18:02:52 +01:00
ffmpeg_filter.c Merge commit 'bee2d75b66e2f02e0877796c01202299a4b56cfb' 2013-04-12 15:19:32 +02:00
ffmpeg_opt.c Merge commit 'dc574658d15ad8f171dbdecbdce7197acf9424a0' 2013-04-12 15:33:37 +02:00
ffmpeg.c ffmpeg: show error message in case of av_buffersrc_add_frame_flags() failure 2013-04-14 20:30:37 +02:00
ffmpeg.h Merge commit '38f0c0781a6e099f11c0acec07f9b8be742190c4' 2013-04-11 23:50:39 +02:00
ffplay.c ffplay: use format title metadata to set window caption. 2013-04-17 11:08:49 +02:00
ffprobe.c ffprobe: set writer context to 0 after allocation 2013-03-19 18:00:34 +01:00
ffserver.c ffserver/ctime1: avoid using strcpy() 2013-03-25 23:31:34 +01:00
INSTALL Merge remote branch 'qatar/master' 2011-04-08 02:50:13 +02:00
library.mak Merge commit '472391b9a7e15e3bff33b016e7b6dbfa6a555975' 2013-03-28 12:12:38 +01:00
LICENSE LICENSE: add libutvideo in the GPL libraries list. 2013-03-29 02:08:20 +01:00
MAINTAINERS MAINTAINERS: add opencl maintainer 2013-04-11 13:42:07 +02:00
Makefile Merge commit 'a862c7d3368241e72a465ab944afa38ea62a6640' 2013-04-06 13:23:38 +02:00
README README: be a tiny bit more verbose 2012-04-06 10:23:26 +02:00
RELEASE RELEASE: 1.1.git for master 2013-01-06 21:42:35 +01:00
version.sh version.sh: handle shallow clones and snapshots. 2011-07-22 10:43:59 +02:00

FFmpeg README
-------------

1) Documentation
----------------

* Read the documentation in the doc/ directory in git.
  You can also view it online at http://ffmpeg.org/documentation.html

2) Licensing
------------

* See the LICENSE file.

3) Build and Install
--------------------

* See the INSTALL file.