[FFmpeg-devel] [PATCH] lavc: make invalid UTF-8 in subtitle output a non-fatal error

Nicolas George nicolas.george at normalesup.org
Fri Jun 28 22:00:14 CEST 2013

Le decadi 10 messidor, an CCXXI, Michael Niedermayer a écrit :
> I cant awnser the question about the scenarios wm4 and others had in
> mind but one scenario that i see is a simple player that displays
> subtitles.
> the user starts the player by clicking on a media file.
> It displays subs as partial gibberish, like messed up umlauts, the
> user sees that and hits the cycle encoding or choose encoding button
> the user is able to guess from the messed up subtitles what the correct
> encoding is
> if theres just an error return the user lacks feedback, if theres

The error return is from the library to the application, not to the user

> an error in the terminal window it will not be seen by 99% of the users
> people use touch screens on theit phones there are no terminal windows
> and the rest use mice with GUI based players.
> A player would need specific code to detect this error case and
> notify the user or take some automated action, that means extra code
> in the player, while for the above case of simply displying giberish
> no extra code is needed in the player

The player needs specific code to allow the user to select the character
encoding. The code to handle the error to open the corresponding popup is
negligible with regards to that.

> also slightly off topic but i like software that just works,
> a simple player file,ext should autodetect the charset/encoding
> if lavc is smart enough to figure out that its not utf8 then it
> should pick something else instead of failing (unless thats damaged
> utf8 in which case it should do some kind of concealing and stay with
> utf8)

I agree. I already told that I had work-in-progress encoding autodetection
somewhere. But wm4's proposal is a step in the wrong direction for that.


  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/20130628/a8f74d23/attachment.asc>

More information about the ffmpeg-devel mailing list