[FFmpeg-trac] #2431(avcodec:new): Detect if subtitle streams do not contain valid utf-8 (was: ffmpeg subtitle encoding of special characters does not working correctly)
FFmpeg
trac at avcodec.org
Fri Apr 5 08:53:14 CEST 2013
#2431: Detect if subtitle streams do not contain valid utf-8
-------------------------------------+-----------------------------------
Reporter: Nick | Owner:
Type: enhancement | Status: new
Priority: wish | Component: avcodec
Version: git-master | Resolution:
Keywords: sub srt | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-----------------------------------
Changes (by cehoyos):
* priority: normal => wish
* type: defect => enhancement
* component: undetermined => avcodec
Comment:
I still see several problems with your approach, so while it is not sure
to get accepted, I guess you could try implementing something:
* Invalid utf-8 files are rare, so not all cases would be covered
* FFmpeg can only scan the first bytes of the subtitle stream to guess the
encoding, this works for the file you uploaded, but not in the general
case
* What about utf-8 encoded subtitles that contain an error (ie a 0xC0 or
0xC1), they would suddenly be broken and users would report a regression.
Since you know the encoding of your subtitle file, I suggest using
-sub_charenc
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2431#comment:11>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list