[FFmpeg-devel] [PATCH] lavc: make invalid UTF-8 in subtitle output a non-fatal error
Nicolas George
nicolas.george at normalesup.org
Wed Jun 26 15:23:06 CEST 2013
L'octidi 8 messidor, an CCXXI, wm4 a écrit :
> The intention of this error was preventing the generation of broken
> files. But in practice, dropping the output is not very helpful.
IMHO, dropping is wrong, transcoding should stop altogether.
The correct way of dealing with this error is to provide a valid
-suc_charenc option.
> Consider a subtitle file that contains mostly ASCII, but has some
> lines that use special characters (like umlauts or accents) encoded
> in a legacy codepage. Then most lines will be intact in the output
> file, but lines with broken encoding will be missing. The user might
> not even see the error, and it will appear as if the subtitle line
> was missing in the original subtitle file. Surely it's better to
> keep these broken lines, and most of the subtitle text will probably
> still be readable.
You assume that the lost subtitles lines are few and unimportant, because
that suits your point, but you could just as easily assume that they are
important enough as to make the movie unwatchable, while few enough to go
unnoticed on a casual check after encoding.
> Keeping the broken output will also make it easier for the user to
> locate the error, such as by knowing the subtitle event time.
Any decent text editor will give you the information too.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130626/4737303a/attachment.asc>
More information about the ffmpeg-devel
mailing list