[FFmpeg-devel] [PATCH] lavc: support subtitles charset conversion.

Nicolas George nicolas.george at normalesup.org
Thu Jan 10 23:22:53 CET 2013


Le primidi 21 nivôse, an CCXXI, Alexander Strasser a écrit :
>     if (codec is a text subtitle codec && sub_charenc != UTF-8) {
>       recode packet from sub_charenc to UTF-8
>     }
>     // decode (as usual)

That will not work if the codec mixes binary and text data for example.

>   IMHO the next important problem is to fix some of the text
> subtitle pseudo-demuxers that assume that the input is encoded
> in an ASCII-like encoding like UTF-8. Currently I believe the
> solution is to share some common routines that allow to read the
> stream and do the recoding to UTF-8. This would avoid more serious
> rewriting of affected demuxers.

Yes, that is the best solution. But what should the demuxers do after that?
Recode the packets back to their original encoding? Ugly and mostly useless.
Leave them in UTF-8 and discard the encoding information? Discarding
information is evil.

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/20130110/3e30e4fc/attachment.asc>


More information about the ffmpeg-devel mailing list