[FFmpeg-devel] [PATCH 1/2] clarified the usage of ISO 639 language codes

Michael Niedermayer michaelni at gmx.at
Wed Jan 8 22:49:52 CET 2014


On Wed, Jan 08, 2014 at 04:14:05PM -0500, Helmut Tessarek wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
> 
> On 08.01.14 6:48 , Michael Niedermayer wrote:
> > The code must remap the language codes to what the destination supports, 
> > otherwise it just cant be used, not even copying the language code from 
> > one container to the other could work
> 
> I guess I haven't misunderstood after all.
> 
> Although it seems (according to the discussion in this thread) that the code
> does not do this as of yet.
> On the other side some logic must be already implemented, since language
> tags are retained when copying streams afaik.
> 
> Well, in this case a change in the docs is just of minor usefulness.
> 
> I could look into implementing a language code conversion capability, but
> I'd have to fimiliarize myself with the entire ffmpeg code structure.
> A hint where to start would help a lot (where are all the containers
> defined? where to put a conversion function?) I suspect it should be
> somewhere around the muxer and/or encoder code...

see av_convert_lang_to(), we already have such utility, but likely
its not used in all places where it should be


> It would help to know where in the code the reading/setting of the language
> code is. But I assume that someone who knows the code could implement such a
> functonality in a matter of a couple of hours. It would take me considerably
> longer.

its not hard to implement (see how av_convert_lang_to is used)
the tricky part is probably to find out which is the right type
of language code for each muxer which supports language codes
That would require either finding and reading specs of each format
or to analyze known correct files that contain language codes.

at first one could check which formats actually store anything from
a language specified at the command line

if someone wants to find that out ./ffmpeg -formats shows a list of
formats trying to encode to each with and without a specified language
code and checking if the output differs would make a list which
actually store anything from it.
And these then would have to be checked by hand one by one to check
what is correct for the format and what is actually stored in it
currently

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- 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/20140108/58e929c6/attachment.asc>


More information about the ffmpeg-devel mailing list