[FFmpeg-devel] [RFC] Talk about subtitles
nicolas.george at normalesup.org
Tue Nov 29 13:49:48 CET 2011
Le quintidi 5 frimaire, an CCXX, Reimar Döffinger a écrit :
> Well, is someone wants subtitles on a text-only display (e.g. braille)
> they will want to convert them all to plain text.
Do you want to consider including an OCR in the encoding process?
(And this is not a completely stupid idea: most bitmap subtitles are
rendered in a way that makes it possible to do a perfect OCR without too
> Sure, if someone wants to convert CSS with HTML to ASS that's fine.
> But if you want to force people to write a converter from whatever
> strange format to properly formatted ASS they'll just give up on FFmpeg
> and put their support somewhere else.
I wholly agree with that.
> Unless it is a source filter a filter has no business messing with files
> directly. And I don't see why you should need or want any other filter
> than src_movie
I do not agree with that. src_movie has a basic limitation that comes from
libavfilter's design: all filters/sources/sinks must have a fixed number of
input and output pads. Therefore, you can not just write "movie=file.mkv"
and get all streams in the file, you need to write "movie=file.mkv" for the
video and then "smovie=file.mkv" for the subtitles, and possibly also
"amovie=file.mkv" if we want to filter the audio too.
The other side of this problem is that for ffmpeg (the command-line tool),
filters are a per-input thing. We can not write something like that:
-i movie.mpg \
-iname logo -i logo.png \
-vf '[video][logo]overlay' \
-acodec copy movie.avi
And for the same reason, we will not be able to write something like that:
ffmpeg -i movie.mkv -vf '[video] [sub-fr] hardsub' -acodec copy movie.avi
Until that problem is solved, any possible solution will be awkward and
basically a hack.
And I did not even speak about embedded fonts...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel