[FFmpeg-devel] [PATCH] lavc: add text encoder
Clément Bœsch
u at pkh.me
Thu Dec 17 13:56:57 CET 2015
On Thu, Dec 17, 2015 at 01:28:16PM +0100, Moritz Barsnick wrote:
> On Thu, Dec 17, 2015 at 12:30:27 +0100, Clément Bœsch wrote:
> > ---
> > libavcodec/Makefile | 1 +
> > libavcodec/allcodecs.c | 2 +-
> > libavcodec/srtenc.c | 37 +++++++-
> > libavcodec/version.h | 2 +-
> > tests/fate/subtitles.mak | 3 +
> > tests/ref/fate/sub-textenc | 213 +++++++++++++++++++++++++++++++++++++++++++++
> > 6 files changed, 253 insertions(+), 5 deletions(-)
> > create mode 100644 tests/ref/fate/sub-textenc
>
> It this encoding, strictly spreaking, still SRT encoding, without the
> ASS style formatting?
>
It's not actually "srt"/subrip at all since the packet payload will only
contain a text string with no markup, while subrip contains the text
string with the html tag markup.
> That's what I thought from a quick glimpse at the code. I was wondering
> whether the SRT encoder should have just gained an option to disable
> the styling, without making it a new codec named "text".
>
The text codec already exists (you can easily imagine a container that
contain subtitle as text without markup), so I used that. I chose to place
the encoder in the subrip encoder because I'm a lazy bum and didn't want
to duplicate the ass parsing code :)
> Just wondering, no deeper knowledge (than from an arbitrary search
> engine),
> Moritz
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151217/251a36ec/attachment.sig>
More information about the ffmpeg-devel
mailing list